コード例 #1
0
        private void SpecialDealUpdate_Load(object sender, EventArgs e)
        {
            BindOrg(comboBoxOrg);
            BindOrg(comboBoxToOrg);
            string   yyyymm = "", taskname = "";
            int      id = 0, organizationid = 0, toorganizationid = 0;
            DateTime dt         = DateTime.Now;
            DateTime startMonth = dt.AddDays(1 - dt.Day);  //本月月初

            this.dateTimePicker1.Value = startMonth;
            SpecialDealQuery.GetInfo(ref id, ref yyyymm, ref taskname, ref organizationid, ref toorganizationid);
            if (id != 0)
            {
                comboBoxOrg.SelectedIndex   = -1;
                comboBoxOrg.SelectedValue   = organizationid;
                comboBoxToOrg.SelectedIndex = -1;
                comboBoxToOrg.SelectedValue = toorganizationid;
                dateTimePicker1.Text        = yyyymm;
                textEditTask.Text           = taskname;
                textEditID.Text             = id.ToString();
            }

            dateTimePicker1.Focus();
            SendKeys.Send("{RIGHT} ");
        }
コード例 #2
0
ファイル: SpecialDeal.cs プロジェクト: Heuvelmann/work-back
        private void barButtonItem修改_ItemClick(object sender, ItemClickEventArgs e)
        {
            string yyyymm = "", taskname = "";
            int    id = 0, organizationid = 0, toorganizationid = 0;

            SpecialDealQuery.GetInfo(ref id, ref yyyymm, ref taskname, ref organizationid, ref toorganizationid);
            if (id != 0)
            {
                SpecialDealUpdate Frm = new SpecialDealUpdate();
                Frm.TopLevel = false;
                Frm.Parent   = this;
                Frm.Show();
                Frm.BringToFront();
            }
        }