当前位置: 首页>>代码示例>>C#>>正文


C# EventArgs类代码示例

本文整理汇总了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();
     }
 }
开发者ID:honj51,项目名称:micro-emall,代码行数:26,代码来源:usercenter.aspx.cs

示例2: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         btnImport.Attributes["onclick"] = "return IfExp();";
     }        
 }
开发者ID:kosmos-zhang,项目名称:erp-aspnet,代码行数:7,代码来源:CustCall_Info.aspx.cs

示例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();
 }
开发者ID:jennyngoclan,项目名称:Original_APF_Incident_System,代码行数:13,代码来源:Admin_Home.aspx.cs

示例4: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Label1.Text = "初始录入结束时间为" + WebConfigurationManager.AppSettings.Get(theKeyName);
     }
 }
开发者ID:uwitec,项目名称:yxwz,代码行数:7,代码来源:InitInputSetting.aspx.cs

示例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();
    }
开发者ID:adatapost,项目名称:exam-singlepage,代码行数:32,代码来源:Test1.aspx.cs

示例6: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     if (User.Identity.Name == "")
     {
         Response.Redirect("createUser.aspx");
     }
 }
开发者ID:andeic,项目名称:Project-LimitBreaker,代码行数:7,代码来源:changePassword.aspx.cs

示例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);
        }
    }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:25,代码来源:StoreTaxes.ascx.cs

示例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");
            }
        }
    }
开发者ID:samercs,项目名称:NCSS,代码行数:34,代码来源:ReportDetails.aspx.cs

示例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);
        }
    }
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:35,代码来源:Analytics_Print.aspx.cs

示例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);
 }
开发者ID:negonicrac,项目名称:seniorproject2009,代码行数:7,代码来源:Default.aspx.cs

示例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;
        }
    }
开发者ID:gumpyoung,项目名称:ilabproject-code,代码行数:25,代码来源:Banner.ascx.cs

示例12: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         BindRoles();
     }
 }
开发者ID:phiree,项目名称:testttt,代码行数:7,代码来源:RoleManage.aspx.cs

示例13: OnPreInit

    /// <summary>
    /// OnPreInit
    /// </summary>
    protected override void OnPreInit(EventArgs e)
    {
        PortalContext.ViewMode = ViewModeEnum.Preview;
        DocumentManager.RedirectForNonExistingDocument = false;

        base.OnPreInit(e);
    }
开发者ID:kbuck21991,项目名称:kentico-blank-project,代码行数:10,代码来源:View.aspx.cs

示例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());
 }
开发者ID:VikySihabudin,项目名称:Landai,代码行数:7,代码来源:PemberkasanSatuList.aspx.cs

示例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"));
        }
    }
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:25,代码来源:New.aspx.cs


注:本文中的EventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。