private void StandardPointUpdate_Load(object sender, EventArgs e) { string yyyymm = ""; int id = 0, saletypeid = 0, deptid = 0; decimal deptstandardpoint = 0; DeptStandardPointQuery.GetInfo(ref id, ref yyyymm, ref saletypeid, ref deptid, ref deptstandardpoint); Common.BasicDataBind("cost_saletype", comboBoxSaleType); BindDept(); if (id != 0) { comboBoxSaleType.SelectedIndex = -1; comboBoxSaleType.SelectedValue = saletypeid; comboBoxDept.SelectedIndex = -1; comboBoxDept.SelectedValue = deptid; dateTimePicker1.Text = yyyymm; textEditDeptStandardPoint.Text = deptstandardpoint.ToString(); textEditID.Text = id.ToString(); } DateTime dt = DateTime.Now; DateTime startMonth = dt.AddDays(1 - dt.Day); //本月月初 this.dateTimePicker1.Value = startMonth; dateTimePicker1.Focus(); SendKeys.Send("{RIGHT} "); }
private void barButtonItem修改_ItemClick(object sender, ItemClickEventArgs e) { string yyyymm = ""; int id = 0, saletypeid = 0, deptid = 0; decimal deptstandardpoint = 0; DeptStandardPointQuery.GetInfo(ref id, ref yyyymm, ref saletypeid, ref deptid, ref deptstandardpoint); if (id != 0) { DeptStandardPointUpdate Frm = new DeptStandardPointUpdate(); Frm.TopLevel = false; Frm.Parent = this; Frm.Show(); Frm.BringToFront(); } }