本文整理汇总了C#中EventArgs类的典型用法代码示例。如果您正苦于以下问题:C# EventArgs类的具体用法?C# EventArgs怎么用?C# EventArgs使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EventArgs类属于命名空间,在下文中一共展示了EventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: lbtnBindToUser_Click
protected void lbtnBindToUser_Click(object sender, EventArgs e)
{
if (txtBindedId != null && txtBankName != null && txtBankCardId != null)
{
WMUsers user = WMUsers.Get(Helper.User.Id);
if (user != null)
{
//user.OpenId = txtBankCardId.Text;
user.BankName = txtBankName.Text;
user.BankCard = txtBankCardId.Text;
user.RoleId = 102;
if (user.Update())
{
//BindWeixin = null;
IsBinded = null;
BindMessage = null;
JsResponse = Success();
}
else
{
JsResponse = Fail();
}
}
UserBind();
}
}
示例2: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
btnImport.Attributes["onclick"] = "return IfExp();";
}
}
示例3: LinkButton_Download_Click
//protected void Button1_Click(object sender, EventArgs e)
//{
// MembershipUser user = Membership.GetUser(HttpContext.Current.User.Identity.Name);
// String user_id = user.ProviderUserKey.ToString();
// new Controller().Test(user_id);
//}
protected void LinkButton_Download_Click(object sender, EventArgs e)
{
Response.ContentType = "Application/pdf";
Response.AppendHeader("Content-Disposition", "attachment; filename=User_Manual.pdf");
Response.TransmitFile(Server.MapPath("~/Admin/PDFs/20100622_User_Manual_2.0_ForWEBSITE.pdf"));
Response.End();
}
示例4: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Label1.Text = "初始录入结束时间为" + WebConfigurationManager.AppSettings.Get(theKeyName);
}
}
示例5: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
ExamDbModel.ExamDbEntities x = new ExamDbModel.ExamDbEntities();
var chaps = x.Questions.Select(p => new
{
ChapterID = p.ChapterID,
QuestionID = p.QuestionID,
QuestionType = p.QuestionBlank != null ? "Blank" : p.QuestionBool != null ? "Bool" : "MCQ",
Question = p
}).GroupBy(p => new { p.ChapterID, p.QuestionType });
List<Object > list = new List<Object>();
foreach (var t in chaps)
{
/* list.Add(new
{
ChapterID=t.Key.ChapterID,
QuestionType=t.Key.QuestionType,
Count = t.Count()
});*/
foreach (var k in t.OrderBy(p=>p.QuestionID*rnd.Next()).Take(3))
{
list.Add(k);
}
}
GridView1.DataSource = list; //chaps.ToList();
GridView1.DataBind();
}
示例6: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (User.Identity.Name == "")
{
Response.Redirect("createUser.aspx");
}
}
示例7: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
try
{
if (!IsPostBack)
{
IncludeCss("StoreTaxes", "/Templates/" + TemplateName + "/css/GridView/tablesort.css", "/Templates/" + TemplateName + "/css/MessageBox/style.css", "/Templates/" + TemplateName + "/css/PopUp/style.css");
IncludeJs("StoreTaxes", "/js/GridView/jquery.grid.js", "/js/GridView/SagePaging.js", "/js/GridView/jquery.global.js",
"/js/GridView/jquery.dateFormat.js", "/js/DateTime/date.js", "/js/MessageBox/jquery.easing.1.3.js", "/js/MessageBox/alertbox.js", "/js/PopUp/custom.js", "/js/ExportToCSV/table2CSV.js", "/Modules/AspxCommerce/AspxTaxManagement/js/StoreTax.js", "/js/CurrencyFormat/jquery.formatCurrency-1.4.0.js",
"/js/CurrencyFormat/jquery.formatCurrency.all.js");
StoreID = GetStoreID;
PortalID = GetPortalID;
Username = GetUsername;
CultureName = GetCurrentCultureName;
UserModuleID = SageUserModuleID;
}
IncludeLanguageJS();
}
catch (Exception ex)
{
ProcessException(ex);
}
}
示例8: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
int id;
if (!int.TryParse(Request.QueryString["id"], out id))
{
Response.Redirect("~/MediaCenter.aspx");
}
Database db = new Database();
Lang lang = new Lang();
db.AddParameter("@lang", lang.getCurrentLang());
db.AddParameter("@id", id);
DataTable dt = db.ExecuteDataTable("select top(3) * from Report where [email protected] and (not [email protected]) Order by id desc");
Repeater1.DataSource = dt;
Repeater1.DataBind();
db.AddParameter("@lang", lang.getCurrentLang());
dt = db.ExecuteDataTable("select top(3) * from SocialEvent where [email protected] Order by id desc");
Repeater2.DataSource = dt;
Repeater2.DataBind();
db.AddParameter("@lang", lang.getCurrentLang());
db.AddParameter("@id", id);
dt = db.ExecuteDataTable("select * from Report where [email protected] and [email protected]");
Repeater3.DataSource = dt;
Repeater3.DataBind();
if (dt.Rows.Count == 0)
{
Response.Redirect("~/MediaCenter.aspx");
}
}
}
示例9: OnPreInit
protected override void OnPreInit(EventArgs e)
{
base.OnPreInit(e);
// Check security
CheckSecurity();
// Set cultures
SetCulture();
IFormatProvider culture = DateTimeHelper.DefaultIFormatProvider;
IFormatProvider currentCulture = new CultureInfo(Thread.CurrentThread.CurrentUICulture.IetfLanguageTag);
// Get report info
string reportName = ValidationHelper.GetString(Request.QueryString["reportname"], "");
ReportInfo report = ReportInfoProvider.GetReportInfo(reportName);
if (report != null)
{
// Get report parameters
string parameters = QueryHelper.GetString("parameters", "");
DataRow drParameters = ReportHelper.GetReportParameters(report, parameters, AnalyticsHelper.PARAM_SEMICOLON, culture, currentCulture);
// Init report
if (drParameters != null)
{
DisplayReport1.LoadFormParameters = false;
DisplayReport1.ReportParameters = drParameters;
}
DisplayReport1.ReportName = report.ReportName;
DisplayReport1.DisplayFilter = false;
Page.Title = GetString("Report_Print.lblPrintReport") + " " + HTMLHelper.HTMLEncode(report.ReportDisplayName);
}
}
示例10: btnUserSearch_Click
protected void btnUserSearch_Click(object sender, EventArgs e)
{
bool searchByEmail = ddlUserSearchTypes.SelectedValue == "E-mail";
gvUsers.Attributes.Add("SearchText","%" + txtUserSearch.Text + "%");
gvUsers.Attributes.Add("SearchByEmail", searchByEmail.ToString());
BindAllUsers(false);
}
示例11: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
lblTitleofUSS.Text = System.Configuration.ConfigurationManager.AppSettings["ussName"];
// Get User Name
if (Session["UserName"] != null)
{
lblUserNameBanner.Visible = true;
lblUserNameBanner.Text = "User: " + Session["userName"].ToString();
}
else
{
lblUserNameBanner.Visible = false;
}
// Get Group Name
if (Session["GroupName"] != null)
{
lblGroupNameBanner.Text = "Group: " + Session["groupName"].ToString();
lblGroupNameBanner.Visible = true;
}
else
{
lblGroupNameBanner.Visible = false;
}
}
示例12: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindRoles();
}
}
示例13: OnPreInit
/// <summary>
/// OnPreInit
/// </summary>
protected override void OnPreInit(EventArgs e)
{
PortalContext.ViewMode = ViewModeEnum.Preview;
DocumentManager.RedirectForNonExistingDocument = false;
base.OnPreInit(e);
}
示例14: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
HakAkses();
isiPeriode();
bool normal = true;
if (normal && (Request.Params["sm"] is object)) normal = ServiceSelect(Request.Params["sm"].ToString());
}
示例15: EditForm_OnAfterValidate
private void EditForm_OnAfterValidate(object sender, EventArgs e)
{
// Validate ToDate > FromDate
FormEngineUserControl fromField = EditForm.FieldControls["CampaignOpenFrom"] as FormEngineUserControl;
FormEngineUserControl toField = EditForm.FieldControls["CampaignOpenTo"] as FormEngineUserControl;
DateTime from = DateTimeHelper.ZERO_TIME;
DateTime to = DateTimeHelper.ZERO_TIME;
if (fromField != null)
{
from = ValidationHelper.GetDateTime(fromField.Value, DateTimeHelper.ZERO_TIME);
}
if (toField != null)
{
to = ValidationHelper.GetDateTime(toField.Value, DateTimeHelper.ZERO_TIME);
}
if ((from != DateTimeHelper.ZERO_TIME) && (to != DateTimeHelper.ZERO_TIME) && (from > to))
{
EditForm.StopProcessing = true;
EditForm.DisplayErrorLabel("CampaignOpenFrom", GetString("campaign.wronginterval"));
}
}