コード例 #1
0
        private void barButtonItem修改_ItemClick(object sender, ItemClickEventArgs e)
        {
            string  yyyymm = "";
            int     id = 0, saletypeid = 0;
            decimal depreciation = 0;

            DepreciationQuery.GetInfo(ref id, ref yyyymm, ref saletypeid, ref depreciation);
            if (id != 0)
            {
                DepreciationUpdate Frm = new DepreciationUpdate();
                Frm.TopLevel = false;
                Frm.Parent   = this;
                Frm.Show();
                Frm.BringToFront();
            }
        }
コード例 #2
0
        private void DepreciationUpdate_Load(object sender, EventArgs e)
        {
            string   yyyymm = "";
            int      id = 0, saletypeid = 0;
            decimal  depreciation = 0;
            DateTime dt           = DateTime.Now;
            DateTime startMonth   = dt.AddDays(1 - dt.Day); //本月月初

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

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