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

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

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

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