本文整理匯總了C#中System.Web.UI.ImageClickEventArgs類的典型用法代碼示例。如果您正苦於以下問題:C# ImageClickEventArgs類的具體用法?C# ImageClickEventArgs怎麽用?C# ImageClickEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ImageClickEventArgs類屬於System.Web.UI命名空間,在下文中一共展示了ImageClickEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: deleteMessage_Click
protected void deleteMessage_Click(object sender, ImageClickEventArgs e)
{
try
{
foreach (RepeaterItem item in listMessage.Controls)
{
if ((item.FindControl("selectMessage") as CheckBox).Checked)
{
if (WhatList.Value.ToLower() == "new")
{
Mail.DeleteInputMessage(int.Parse((item.FindControl("message_id") as HiddenField).Value));
}
else if (WhatList.Value.ToLower() == "sent")
{
Mail.DeleteOutputMessage(int.Parse((item.FindControl("message_id") as HiddenField).Value));
}
}
}
}
catch (Exception ex) {
MessageError.Text = ex.Message;
MessageError.Visible = true;
}
refreshMessage_Click(sender, e);
}
示例2: ImageButton2_Click
protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
{
if (Request.QueryString["mid"] != null)
{
Response.Redirect("~//topcare/admin//SubscriptionFeePayments.aspx?mid=" + Request.QueryString["mid"]);
}
}
示例3: OKButton_Click
protected void OKButton_Click(object sender, ImageClickEventArgs e)
{
if (OKClicked != null)
OKClicked();
Close();
}
示例4: PDFButtonClick
protected void PDFButtonClick(object sender, ImageClickEventArgs e)
{
string t = string.Empty;
string t2 = string.Empty;
if ((!string.IsNullOrEmpty(HiddenToField.Value)))
{
t = String.Format("{0:MM/dd/yyyy}", Convert.ToDateTime(HiddenToField.Value));
}
if ((!string.IsNullOrEmpty(HiddenFromField.Value)))
{
t2 = String.Format("{0:MM/dd/yyyy}", Convert.ToDateTime(HiddenFromField.Value));
}
//if (!string.IsNullOrEmpty(t))
// {
// t = null;
// }
// if (!string.IsNullOrEmpty(t2))
// {
// t2 = null;
// }
Response.Redirect("IFrame/ExecutiveDownload.aspx?t1=" + t + "&t2=" + t2);
}
示例5: IbtnEnter_Click
protected void IbtnEnter_Click(object sender, ImageClickEventArgs e)
{
B_User bll = new B_User();
string vCode = this.Session["ValidateCode"].ToString();
if (string.IsNullOrEmpty(vCode))
{
function.WriteErrMsg("<li>驗證碼無效,請刷新驗證碼重新登錄</li>", "/User/Login.aspx");
}
if (string.Compare(this.TxtValidateCode.Text.Trim(), vCode, true) != 0)
{
function.WriteErrMsg("<li>驗證碼不正確</li>", "Login.aspx");
}
//根據用戶名和密碼驗證會員身份,並取得會員信息
string AdminName = this.TxtUserName.Text.Trim();
string AdminPass = this.TxtPassword.Text.Trim();
M_UserInfo info = bll.AuthenticateUser(AdminName, AdminPass);
//如果用戶Model是空對象則表明登錄失敗
if (info.IsNull)
{
function.WriteErrMsg("<li>用戶名或密碼錯誤!</li>", "/User/Login.aspx");
}
else
{
if (SiteConfig.UserConfig.AdminCheckReg)
{
if (info.Status != 0)
{
function.WriteErrMsg("<li>你的帳戶未通過驗證,請與超級管理員聯係</li>", "/User/Login.aspx");
}
}
bll.SetLoginState(info);
HttpContext.Current.Response.Redirect("Default.aspx");
}
}
示例6: imgNovo_Click
protected void imgNovo_Click(object sender, ImageClickEventArgs e)
{
pnlDadosModelo.Visible = true;
hfIdModelo.Value = string.Empty;
LimpaCampos();
lblMsg.Text = "Criando novo modelo...";
}
示例7: btnApprove_Click
//Approve expense if expense exceeded show warning
protected void btnApprove_Click(object sender, ImageClickEventArgs e)
{
ImageButton btn = (ImageButton)(sender);
string[] arg = new string[2];
arg = btn.CommandArgument.ToString().Split(',');
int expenseId = Convert.ToInt32(arg[0]);
decimal expenseTotal = Convert.ToDecimal(arg[1]);
comBudget.CompanyBudget();
//if (expenseTotal > comBudget.RemainingAmountAccounts)
if (comBudget.IsBudgetExceeded(expenseTotal))
{
//DialogResult UserReply = MessageBox.Show("Approving this expense " + expenseTotal + " will cross the total monthly budget of the company. Do you want to approve?", "Important Question", MessageBoxButtons.YesNoCancel);
//if (UserReply.ToString() == "Yes")
//{
// expReportBuilder.AccountantActionOnExpenseReport(expenseId, emp.UserId, ReportStatus.ApprovedByAccounts.ToString());
//}
//else if (UserReply.ToString() == "No")
//{
// expReportBuilder.AccountantActionOnExpenseReport(expenseId, emp.UserId, ReportStatus.RejectedByAccounts.ToString());
//}
lblBudgetWarning.Text = "Approving this expense for " + String.Format("{0:c}", expenseTotal) + " will result in the monthly company budget being exceeded, do you want to approve?";
hdnExpenseId.Value = expenseId.ToString();
ClientScript.RegisterStartupScript(this.GetType(), "BudgetWarningModal", "ShowBudgetWarningModal();", true);
}
else
{
expReportBuilder.AccountantActionOnExpenseReport(expenseId, emp.UserId, ReportStatus.ApprovedByAccounts.ToString());
}
InitializeRepeater();
}
示例8: btn_deletepic_Click
protected void btn_deletepic_Click(object sender, ImageClickEventArgs e)
{
string picurl = string.Empty;
ImageButton button = (ImageButton)sender;
GridViewRow row = (GridViewRow)button.Parent.Parent;
picurl = row.Cells[3].Text.ToString();
string FilePath = Server.MapPath("pic/") + picurl;
try
{
File.Delete(FilePath);
string commandString = String.Format("delete from t_image where urlname='{0}' ", picurl);
string result = dbkit.insertandUpdate(commandString);
if (result.Split('@')[0] == "true")
{
getinfo();
clearinfo();
dbkit.Show(this, "刪除成功");
getpicinfo();
}
else
{
dbkit.Show(this, "刪除失敗");
}
}
catch (Exception ee)
{
string aaaaaaaaa = ee.Message;
}
}
示例9: btnUpdate_Click
protected void btnUpdate_Click(object sender, ImageClickEventArgs e)
{
float f = 0;
TextBox TxCosto = (TextBox)FormViewArticolo.FindControl("txCosto");
TxCosto.Text = TxCosto.Text.Replace(".", ",");
FormViewArticolo.UpdateItem(true);
TextBox TxIDArticolo = (TextBox)FormViewArticolo.FindControl("txIDArticolo");
TextBox TxImporto = (TextBox)FormViewArticolo.FindControl("txImporto");
string sql = @"UPDATE ListinoRighe
SET Importo = @IMPORTO, DateMod = GETDATE()
WHERE (IDArticolo = @IDArticoli) AND (IDListino = '1221/gen1')";
SqlConnection cnn = new SqlConnection(SqlDataSource1.ConnectionString);
SqlCommand cmd = new SqlCommand(sql, cnn);
TxImporto.Text = TxImporto.Text.Replace(".", ",");
float.TryParse(TxImporto.Text, out f);
SqlParameter parImporto = new SqlParameter("@Importo", f);
cmd.Parameters.Add(parImporto);
SqlParameter parIDArticolo = new SqlParameter("@IDArticoli", TxIDArticolo.Text);
cmd.Parameters.Add(parIDArticolo);
cnn.Open();
cmd.ExecuteNonQuery();
cnn.Close();
Response.Redirect(ViewState["PreviousPage"].ToString());
}
示例10: btnDelete1_Click
protected void btnDelete1_Click(object sender, ImageClickEventArgs e)
{
string strLink = "";
try
{
var n_info = DB.GetTable<ESHOP_NEWS_ATT>().Where(n => n.NEWS_ATT_ID == m_att_id);
if (n_info.ToList().Count > 0)
{
if (!string.IsNullOrEmpty(n_info.ToList()[0].NEWS_ATT_FILE))
{
string imagePath = Server.MapPath(PathFiles.GetPathNews(m_news_id) + n_info.ToList()[0].NEWS_ATT_FILE);
n_info.ToList()[0].NEWS_ATT_FILE = "";
DB.SubmitChanges();
if (File.Exists(imagePath))
File.Delete(imagePath);
strLink = "news_attachment.aspx?type="+_type+"&att_id=" + m_att_id + "&news_id=" + m_news_id;
}
}
}
catch (Exception ex)
{
clsVproErrorHandler.HandlerError(ex);
}
finally
{
if (!string.IsNullOrEmpty(strLink))
Response.Redirect(strLink);
}
}
示例11: ImageButton2_Click
//重置
protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
{
this.txtUname.Text = "";
this.txtPwd.Text = "";
this.txtPwdagain.Text = "";
this.txtUname.Focus();
}
示例12: btnOk_Click
protected void btnOk_Click(object sender, ImageClickEventArgs e)
{
Model.User sessionUser = Session["User"] as Model.User;
Model.User u = new Model.User() { UserName = sessionUser.UserName , UserPassword = txtOldPwd.Text};
if (String.IsNullOrEmpty(u.UserName) || String.IsNullOrEmpty(u.UserPassword) || !cvPwd.IsValid)
{
return;
}
u.UserPassword = Common.SecurityHelper.Encrypt(u.UserPassword);
if (!sessionUser.UserPassword.Equals(u.UserPassword))
{
Response.Write("<script>alert('密碼修改失敗!原密碼有誤')</script>");
return;
}
BLL.UserBLL helper = new BLL.UserBLL();
u.UserPassword = Common.SecurityHelper.Encrypt(txtPwd.Text);
if (helper.Update(u))
{
Session.Abandon();
Response.Write("<script>alert('密碼修改成功!請重新登錄~~');location.href='/Admin/login.html'</script>");
}
else
{
Response.Write("<script>alert('密碼修改失敗!請稍後重試')</script>");
}
}
示例13: deptButton_Click
protected void deptButton_Click(object sender, ImageClickEventArgs e)
{
System.Web.UI.WebControls.ImageButton imgButton = (System.Web.UI.WebControls.ImageButton)sender;
if (imgButton != null)
{
if (imgButton.ID.Contains("department"))
{
drdDepartment.ClearSelection();
drdDepartment_SelectionChanged(null, null);
}
else if (imgButton.ID.Contains("employee"))
{
drdEmployee.ClearSelection();
drdEmployee_SelectionChanged(null, null);
}
else if (imgButton.ID.Contains("requisition"))
{
drdRequisitions.ClearSelection();
drdRequisitions_SelectionChanged(null, null);
}
else if (imgButton.ID.Contains("items"))
{
drdItems.ClearSelection();
drdItems_SelectionChanged(null, null);
}
}
}
示例14: OKButton_Click
protected void OKButton_Click(object sender, ImageClickEventArgs e)
{
try
{
var itemKey = ViewState["QueueItem"] as ServerEntityKey;
var controller = new DuplicateSopEntryController();
ProcessDuplicateAction action = ProcessDuplicateAction.OverwriteAsIs;
if (UseExistingSopRadioButton.Checked)
action = ProcessDuplicateAction.OverwriteUseExisting;
else if (UseDuplicateRadioButton.Checked)
action = ProcessDuplicateAction.OverwriteUseDuplicates;
else if (DeleteDuplicateRadioButton.Checked)
action = ProcessDuplicateAction.Delete;
else if (ReplaceAsIsRadioButton.Checked)
action = ProcessDuplicateAction.OverwriteAsIs;
controller.Process(itemKey, action);
}
catch (Exception ex)
{
MessageBox.Message = String.Format(ErrorMessages.ActionNotAllowedAtThisTime, ex.Message);
MessageBox.MessageType = MessageBox.MessageTypeEnum.ERROR;
MessageBox.Show();
}
//((Default) Page).UpdateUI();
Close();
}
示例15: IBtn_Empty_Click
/// <summary>
/// 清空
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void IBtn_Empty_Click(object sender, ImageClickEventArgs e)
{
txt_biaoshiNo.Value = "";
Pager_DocumentShare.CurrentPageIndex = 1;
LoadDataBind(strWhere);
UP_DocumentShare.Update();
}