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


C# System.EventArgs类代码示例

本文整理汇总了C#中System.EventArgs的典型用法代码示例。如果您正苦于以下问题:C# EventArgs类的具体用法?C# EventArgs怎么用?C# EventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


EventArgs类属于System命名空间,在下文中一共展示了EventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: submitFacility

        protected void submitFacility(Object sender, EventArgs e)
        {
            //If null then this is creating a facility to add
            if (selected_facility == null)
            {
                selected_facility = new facility();
                selected_address = new address();
                selected_address.line_1 = Address1.Text;
                selected_address.line_2 = Address2.Text;
                selected_address.city = CityName.Text;
                selected_address.state = StateName.Text;
                selected_address.zip = ZipName.Text;
                db.addresses.InsertOnSubmit(selected_address);
                db.SubmitChanges();
                selected_facility.user_id = user_id;
                selected_facility.name = FacilityName.Text;
                selected_facility.address_id = selected_address.id;
                selected_facility.add_date = DateTime.Now;
                db.facilities.InsertOnSubmit(selected_facility);
                db.SubmitChanges();

            }
            //If not then we are editing an existing facility
            else
            {
                selected_facility.name = FacilityName.Text;
                selected_address.line_1 = Address1.Text;
                selected_address.line_2 = Address2.Text;
                selected_address.city = CityName.Text;
                selected_address.state = StateName.Text;
                selected_address.zip = ZipName.Text;
                db.SubmitChanges();
            }
            Response.Redirect("~/Pages/Inventory/Facilities.aspx");
        }
开发者ID:bgrantdev,项目名称:asset-tracker-web,代码行数:35,代码来源:AddEditFacility.aspx.cs

示例2: OnLoad

 protected override void OnLoad(EventArgs e)
 {
     ctlEditor.DocumentReady += new EventHandler<EventArgs<MonoSoftware.MonoX.DAL.EntityClasses.DocumentEntity>>(ctlEditor_DocumentReady);
     if (UrlParams.HtmlEditorDocumentContentId.HasValue)
         ctlEditor.ContentId = UrlParams.HtmlEditorDocumentContentId.Value;
     base.OnLoad(e);
 }
开发者ID:swapnilphalak,项目名称:MonoX-Demo-Pages,代码行数:7,代码来源:Content.aspx.cs

示例3: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            // string value = Request.QueryString["pid"];
            string pid=Request.QueryString["pid"];
            pid2 = Convert.ToInt32(pid);
            string addcart = Request.QueryString["addcart"];
            //Item item3 = new Item(pid2);
            //item3.Views+=1
            if (pid==null)
            {
                //System.Threading.Thread.SpinWait(5);
               Response.Redirect("default.aspx");
                //Response.AppendHeader("REFRESH", "5;URL=default.aspx");
            }
            if (addcart == "1")
            {
                ArrayList cartItems = new ArrayList();

                if ((ArrayList)Session["cartItem"] != null)
                {
                    cartItems = (ArrayList)Session["cartItem"];
                }

                item1 = new Item(pid2);
                cartItems.Add(item1);
                Session["cartItem"] = cartItems;
                Response.Redirect("cart.aspx");
            }
        }
开发者ID:jackhac,项目名称:teamproj,代码行数:29,代码来源:item.aspx.cs

示例4: Session_End

 void Session_End(object sender, EventArgs e)
 {
     // Code that runs when a session ends.
     // Note: The Session_End event is raised only when the sessionstate mode
     // is set to InProc in the Web.config file. If session mode is set to StateServer
     // or SQLServer, the event is not raised.
 }
开发者ID:williamyip,项目名称:ForGoodAspx,代码行数:7,代码来源:Global.asax.cs

示例5: btnTouzhu_Click

        private void btnTouzhu_Click(object sender, EventArgs e)
        {
            DataGridViewRow row = dgvTaocan.SelectedRows[0];

            TouzhuTaocan taocan = new TouzhuTaocan();
            string type = row.Cells["Type"].Value.ToString();
            int leixing = 0;
            if (type == "专家推荐套餐")
            {
                leixing = 0;
            }
            else if (type == "数据模型套餐")
            {
                leixing = 1;
            }
            taocan.Touzhuleixing = leixing;
            taocan.Touzhumingcheng = type;
            taocan.Touzhuid = Convert.ToInt32(row.Cells["ID"].Value.ToString()) ;
            int beishu = Convert.ToInt32(txtBeishu.Text);
            double touru = Convert.ToDouble(row.Cells["Touru"].Value);
            double jiangjin = Convert.ToDouble(row.Cells["Jiangjin"].Value);

            taocan.Touzhubeishu = beishu;
            taocan.Touzhujin = beishu*touru;
            taocan.Jiangjin = jiangjin* beishu;
            taocan.Lucky = -1;
            taocan.Touzhuqishu = Convert.ToInt32(row.Cells["Qishu"].Value.ToString());
            taocan.Touzhushijian = Convert.ToDateTime(row.Cells["riqi"].Value);
            taocan.OperateTime = DateTime.Now;
            taocan.Operator = "system";

            new TouzhuTaocanDAL().InsertTouzhutaocan(taocan);
            MessageBox.Show("投注成功!");
        }
开发者ID:xiaobeixin50,项目名称:test,代码行数:34,代码来源:TaocanTouzhuForm.cs

示例6: opeation_Click

 private void opeation_Click(object sender, EventArgs e)
 {
     Button btn = sender as Button;
     firstNumber = double.Parse(display.Text);
     state = State.WaitingForSecondNumber;
     operation = btn.Text;
 }
开发者ID:Beisenbek,项目名称:PT2016_week5G1,代码行数:7,代码来源:Form1.cs

示例7: btnDelete_Click

 private void btnDelete_Click(object sender, EventArgs e)
 {
     DialogResult result = MessageBox.Show("Delete " + customer.Name + "?",
         "Confirm Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
     if (result == DialogResult.Yes)
     {
         try
         {
             if (!CustomerDB.DeleteCustomer(customer))
             {
                 MessageBox.Show("Another user has updated or deleted " +
                     "that customer.", "Database Error");
                 this.GetCustomer(customer.CustomerID);
                 if (customer != null)
                     this.DisplayCustomer();
                 else
                     this.ClearControls();
             }
             else
                 this.ClearControls();
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message, ex.GetType().ToString());
         }
     }
 }
开发者ID:fakeshark,项目名称:CSharpProjects,代码行数:27,代码来源:frmCustomerMaintenance.cs

示例8: OnLoad

 protected override void OnLoad(EventArgs e)
 {
     TextBoxAppender.SetTextBox(txtConsole);
     //HACK to force a write of buffered logs
     LoggingService.Info("Console Initialized"); 
     base.OnLoad(e);
 }
开发者ID:stophun,项目名称:fdotoolbox,代码行数:7,代码来源:ConsolePane.cs

示例9: btnSearch_Click

		protected void btnSearch_Click(object sender, EventArgs e)
		{
			// Get reference to the Search textbox.
			TextBox txtSearch = (TextBox)this.GalleryPage.FindControlRecursive(dgSearch, "txtSearch");

			Util.Redirect(PageId.search, String.Format("aid={0}&search={1}", this.GalleryPage.GetAlbum().Id, Util.UrlEncode(txtSearch.Text)));
		}
开发者ID:haimon74,项目名称:KanNaim,代码行数:7,代码来源:search.ascx.cs

示例10: btImportSelected_Click

 private void btImportSelected_Click(object sender, EventArgs e)
 {
     foreach (string s in lbAvailableProfileList.CheckedItems)
     {
         importer.ImportProfile(s);
     }
 }
开发者ID:faylite,项目名称:wifi-manager,代码行数:7,代码来源:MainWindow.cs

示例11: ArrayList

            ArrayList Dep = new ArrayList(); /**/
            Dep = (ArrayList)newUser.popDept();
            cmbxDep.Items.Clear();
            for (int x = 0; x < Dep.Count; x++)
            {
                cmbxDep.Items.Add(Dep[x].ToString());
            }

            InitializeGrid();
            PopulateCombo();
            setDataSource();
            //InitializeState();

        }

        public int state; //this is to know which use case it is currently being used for

        System.Windows.Forms.DataGridView dtgList;

        RegisteredUser curUser;

        public MainUI main;



        public void InitializeGrid()
        {
            dtgList = this.FindName("gridView") as System.Windows.Forms.DataGridView;
            RegisteredUser.loadDataSet(main.curUser);
            dtgList.ReadOnly = true;
            dtgList.DataSource = RegisteredUser.UserDT;
            dtgList.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(dtgList_CellClick);
            dtgList.Refresh();
            grbList.DataContext = RegisteredUser.UserDT;

        }

        /* private void Start_SelectedDateChanged(object sender, SelectionChangedEventArgs e)
         {

             txtROCEnd.DisplayDateEnd = new DateTime(2200, 1, 1);
             txtROCEnd.DisplayDateStart = txtROCStart.SelectedDate;
         }
         private void End_SelectedDateChanged(object sender, SelectionChangedEventArgs e)
         {
             txtROCStart.DisplayDateStart = new DateTime(1900, 1, 1);
             txtROCStart.DisplayDateEnd = txtROCEnd.SelectedDate;
         }*/


        private void dtgList_CellClick(object sender, EventArgs e)
        {
            try
            {


                int pos = dtgList.CurrentRow.Index;

                if (pos < RegisteredUser.UserDT.Rows.Count)
                {
                    String sysID = dtgList.CurrentRow.Cells[0].Value.ToString();


                    curUser = RegisteredUser.GetUser(sysID);


                    //curJour = Journal.JournalDS[pos]; //this was if i was using a list
                }
                btnUpdate.Visibility = Visibility.Visible;
                setDataSource();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

        }
开发者ID:Ceasius,项目名称:University,代码行数:77,代码来源:MaintainUser.xaml.cs

示例12: AddValue

        protected void AddValue(object sender, EventArgs e)
        {

            CommonDao<Safezhuan> newmgr = new CommonDao<Safezhuan>();
            Safezhuan safezhuan = new Safezhuan();
            safezhuan.ZhuanName = this.TextBoxName.Text.Trim().ToString();


            int count =int.Parse(newmgr.GetTotalCount("zhuanname='"+safezhuan.ZhuanName.ToString()+"'"));
            if (count == 0)
            {

                if (newmgr.Add(safezhuan))
                {


                    Alert("热点专题添加成功!");
                    BindGridView();
                }
                else
                {
                    Alert("热点专题添加失败!请重试。");

                }
            }
            else {

                Alert("热点专题名称不能重复。");
            }

        }
开发者ID:huaminglee,项目名称:Code,代码行数:31,代码来源:SafeZhuan.aspx.cs

示例13: Page_Load

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

示例14: OnRemoveFromFavorites

		private void OnRemoveFromFavorites(object sender, EventArgs e)
		{
			if (_menuHitInfo == null) return;
			var imageItem = imageListView.Items[_menuHitInfo.ItemIndex];
			var imageSource = imageItem.Tag as BaseImageSource;
			imageSource?.DeleteFromFavs();
		}
开发者ID:w01f,项目名称:VolgaTeam.SalesLibrary,代码行数:7,代码来源:FavoritesImagesContainer.cs

示例15: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         LoadSystemInf();
     }
 }
开发者ID:ChalmerLin,项目名称:dnt_v3.6.711,代码行数:7,代码来源:systeminf.aspx.cs


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