本文整理汇总了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");
}
示例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);
}
示例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");
}
}
示例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.
}
示例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("投注成功!");
}
示例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;
}
示例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());
}
}
}
示例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);
}
示例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)));
}
示例10: btImportSelected_Click
private void btImportSelected_Click(object sender, EventArgs e)
{
foreach (string s in lbAvailableProfileList.CheckedItems)
{
importer.ImportProfile(s);
}
}
示例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);
}
}
示例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("热点专题名称不能重复。");
}
}
示例13: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindGridView();
}
}
示例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();
}
示例15: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
LoadSystemInf();
}
}