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

            CostRateQuery.GetInfo(ref id, ref yyyy, ref quarterid, ref saletypeid, ref standardpoint);
            if (id != 0)
            {
                CostRateUpdate Frm = new CostRateUpdate();
                Frm.TopLevel = false;
                Frm.Parent   = this;
                Frm.Show();
                Frm.BringToFront();
            }
        }
示例#2
0
        private void CostRateUpdate_Load(object sender, EventArgs e)
        {
            string   yyyy = "";
            int      id = 0, saletypeid = 0, quarterid = 0;
            decimal  costrate   = 0;
            DateTime dt         = DateTime.Now;
            DateTime startMonth = dt.AddDays(1 - dt.Day);  //本月月初

            this.dateTimePicker1.Value = startMonth;
            CostRateQuery.GetInfo(ref id, ref yyyy, ref quarterid, ref saletypeid, ref costrate);
            Common.BasicDataBind("cost_saletype", comboBoxSaleType);
            Common.BasicDataBind("cost_quarter", comboBoxQuarter);
            if (id != 0)
            {
                comboBoxSaleType.SelectedIndex = -1;
                comboBoxSaleType.SelectedValue = saletypeid;
                comboBoxQuarter.SelectedIndex  = -1;
                comboBoxQuarter.SelectedValue  = quarterid;
                dateTimePicker1.Value          = Convert.ToDateTime(yyyy + "-01");
                textEditCostRate.Text          = costrate.ToString();
                textEditID.Text = id.ToString();
            }
        }