Beispiel #1
0
        private void barButtonItem修改_ItemClick(object sender, ItemClickEventArgs e)
        {
            string  yyyymm = "";
            int     id = 0, saletypeid = 0;
            decimal standardpoint = 0;

            StandardPointQuery.GetInfo(ref id, ref yyyymm, ref saletypeid, ref standardpoint);
            if (id != 0)
            {
                StandardPointUpdate Frm = new StandardPointUpdate();
                Frm.TopLevel = false;
                Frm.Parent   = this;
                Frm.Show();
                Frm.BringToFront();
            }
        }
        private void StandardPointUpdate_Load(object sender, EventArgs e)
        {
            string   yyyymm = "";
            int      id = 0, saletypeid = 0;
            decimal  standardpoint = 0;
            DateTime dt            = DateTime.Now;
            DateTime startMonth    = dt.AddDays(1 - dt.Day); //本月月初

            this.dateTimePicker1.Value = startMonth;
            StandardPointQuery.GetInfo(ref id, ref yyyymm, ref saletypeid, ref standardpoint);
            Common.BasicDataBind("cost_saletype", comboBoxSaleType);
            if (id != 0)
            {
                comboBoxSaleType.SelectedIndex = -1;
                comboBoxSaleType.SelectedValue = saletypeid;
                dateTimePicker1.Text           = yyyymm;
                textEditStandardPoint.Text     = standardpoint.ToString();
                textEditID.Text = id.ToString();
            }

            dateTimePicker1.Focus();
            SendKeys.Send("{RIGHT} ");
        }