private void LineTypeUpdate_Load(object sender, EventArgs e)
        {
            //this.WindowState = FormWindowState.Maximized;
            string cname = "", cnamemes = "", saletypename = "", workshop = "";
            int    id = 0, saletypeid = 0, workshopid = 0;
            ConnDB conn = new ConnDB();

            LineTypeQuery.GetInfo(ref id, ref cname, ref cnamemes, ref saletypeid, ref saletypename, ref workshopid, ref workshop);
            string sql  = "select * from cost_saletype where cid = " + saletypeid + " and isnull(forbidden,'false') = 'true'";
            int    rows = conn.ReturnRecordCount(sql);

            Common.BasicDataBind("cost_saletype", comboBoxSaleType);
            BindWorkShop();
            if (cname != "" || cnamemes != "")
            {
                textEditName.Text    = cname;
                textEditNameMes.Text = cnamemes;
                if (rows == 0)
                {
                    comboBoxSaleType.SelectedIndex = -1;
                    comboBoxSaleType.SelectedValue = saletypeid;
                }
                comboBoxWorkShop.SelectedIndex = -1;
                comboBoxWorkShop.SelectedValue = workshopid;
                textEditID.Text         = id.ToString();
                textEditSaleTypeID.Text = saletypeid.ToString();
            }
        }
Exemple #2
0
        private void IndirectLabourUpdate_Load(object sender, EventArgs e)
        {
            string cno = "", cname = "", positionname = "", deptname = "";
            int    id = 0, positionid = 0, deptid = 0, person_level = 0;

            IndirectLabourQuery.GetInfo(ref id, ref cno, ref cname, ref positionid, ref positionname, ref person_level, ref deptid, ref deptname);
            PositionBind();
            Common.BasicDataBind("cost_dept", comboBoxDept);
            ConnDB conn  = new ConnDB();
            string sql   = "select * from cost_dept where cid = " + deptid + " and isnull(forbidden,'false') = 'true'";
            int    rows  = conn.ReturnRecordCount(sql);
            string sql2  = "select * from cost_position where cid = " + positionid + " and isnull(forbidden,'false') = 'true'";
            int    rows2 = conn.ReturnRecordCount(sql);

            if (cno != "")
            {
                textEditNo.Text    = cno;
                textEditName.Text  = cname;
                textEditLevel.Text = person_level.ToString();
                if (rows == 0)
                {
                    comboBoxDept.SelectedIndex = -1;
                    comboBoxDept.SelectedValue = deptid;
                }
                if (rows2 == 0)
                {
                    comboBoxPosition.SelectedIndex = -1;
                    comboBoxPosition.SelectedValue = positionid;
                }
                textEditID.Text = id.ToString();
            }
        }
        private void StandardPointUpdate_Load(object sender, EventArgs e)
        {
            string  yyyymm = "";
            int     id = 0, saletypeid = 0, deptid = 0;
            decimal deptstandardpoint = 0;

            DeptStandardPointQuery.GetInfo(ref id, ref yyyymm, ref saletypeid, ref deptid, ref deptstandardpoint);
            Common.BasicDataBind("cost_saletype", comboBoxSaleType);
            BindDept();
            if (id != 0)
            {
                comboBoxSaleType.SelectedIndex = -1;
                comboBoxSaleType.SelectedValue = saletypeid;
                comboBoxDept.SelectedIndex     = -1;
                comboBoxDept.SelectedValue     = deptid;
                dateTimePicker1.Text           = yyyymm;
                textEditDeptStandardPoint.Text = deptstandardpoint.ToString();
                textEditID.Text = id.ToString();
            }
            DateTime dt         = DateTime.Now;
            DateTime startMonth = dt.AddDays(1 - dt.Day);  //本月月初

            this.dateTimePicker1.Value = startMonth;

            dateTimePicker1.Focus();
            SendKeys.Send("{RIGHT} ");
        }
        private void CostRateUpdate_Load(object sender, EventArgs e)
        {
            string   yyyy = "";
            int      id = 0, saletypeid = 0, quarterid = 0, deptid = 0;
            decimal  costrate   = 0;
            DateTime dt         = DateTime.Now;
            DateTime startMonth = dt.AddDays(1 - dt.Day);  //本月月初

            this.dateTimePicker1.Value = startMonth;
            CostDeptRateQuery.GetInfo(ref id, ref yyyy, ref quarterid, ref saletypeid, ref deptid, ref costrate);
            Common.BasicDataBind("cost_saletype", comboBoxSaleType);
            Common.BasicDataBind("cost_quarter", comboBoxQuarter);
            BindDept();
            if (id != 0)
            {
                comboBoxSaleType.SelectedIndex = -1;
                comboBoxSaleType.SelectedValue = saletypeid;
                comboBoxQuarter.SelectedIndex  = -1;
                comboBoxQuarter.SelectedValue  = quarterid;
                comboBoxDept.SelectedIndex     = -1;
                comboBoxDept.SelectedValue     = deptid;
                dateTimePicker1.Value          = Convert.ToDateTime(yyyy + "-01");
                textEditCostRate.Text          = costrate.ToString();
                textEditID.Text = id.ToString();
            }
        }
 private void DirectLabourAttendance_Load(object sender, EventArgs e)
 {
     dateEditDate.Text = DateTime.Now.ToString("yyyy-MM-dd");
     Common.BasicDataBind("cost_dept", comboBoxDept);
     Common.BasicDataBind("cost_work_type", comboBoxWorkType);
     showDetail();
 }
Exemple #6
0
        private void CostRateInsert_Load(object sender, EventArgs e)
        {
            Common.BasicDataBind("cost_quarter", comboBoxQuarter);
            DateTime dt         = DateTime.Now;
            DateTime startMonth = dt.AddDays(1 - dt.Day);  //本月月初

            this.dateTimePicker1.Value = startMonth;
        }
Exemple #7
0
 private void IndirectLabourQuery_Load(object sender, EventArgs e)
 {
     Common.BasicDataBind("cost_dept", comboBoxDept);
     //this.WindowState = FormWindowState.Maximized;
     showDetail();
     this.Height = ParentForm.Height;
     this.Width  = ParentForm.Width;
     this.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right;
 }
 private void PositionQuery_Load(object sender, EventArgs e)
 {
     Common.BasicDataBind("cost_person_type", comboBoxPersonType);
     //this.WindowState = FormWindowState.Maximized;
     showDetail();
     this.Height = ParentForm.Height;
     this.Width  = ParentForm.Width;
     this.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right;
 }
        private void StandardPointInsert_Load(object sender, EventArgs e)
        {
            Common.BasicDataBind("cost_saletype", comboBoxSaleType);
            DateTime dt         = DateTime.Now;
            DateTime startMonth = dt.AddDays(1 - dt.Day);  //本月月初

            this.dateTimePicker1.Value = startMonth;

            dateTimePicker1.Focus();
            SendKeys.Send("{RIGHT} ");
        }
        private void IndirectLabourPriceInsert_Load(object sender, EventArgs e)
        {
            this.WindowState             = FormWindowState.Maximized;
            IndirectLabourPrice.savetype = "insert";
            Common.BasicDataBind("cost_dept", comboBoxDept);
            BindIndirectLabour();
            Exist();
            ShowDetail();
            DateTime dt         = DateTime.Now;
            DateTime startMonth = dt.AddDays(1 - dt.Day);  //本月月初

            this.dateTimePicker1.Value = startMonth;
        }
        private void CostRateQuery_Load(object sender, EventArgs e)
        {
            //this.WindowState = FormWindowState.Maximized;
            Common.BasicDataBind("cost_quarter", comboBoxQuarter);
            showDetail();
            this.Height = ParentForm.Height;
            this.Width  = ParentForm.Width;
            this.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right;
            DateTime dt         = DateTime.Now;
            DateTime startMonth = dt.AddDays(1 - dt.Day);  //本月月初

            this.dateTimePicker1.Value = startMonth;
        }
Exemple #12
0
        private void PointCountRaw_Load(object sender, EventArgs e)
        {
            Common.BasicDataBind("cost_saletype", comboBoxSaleType);
            DateTime dt         = DateTime.Now;
            DateTime startMonth = dt.AddDays(1 - dt.Day);  //本月月初

            this.dateTimePickerMonth.Value = startMonth;
            showDetailLocal();
            this.Height = ParentForm.Height;
            this.Width  = ParentForm.Width;
            this.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right;

            dateTimePickerMonth.Focus();
            SendKeys.Send("{RIGHT} ");
        }
        private void PositionUpdate_Load(object sender, EventArgs e)
        {
            //this.WindowState = FormWindowState.Maximized;
            string cname = "", persontypename = "";
            int    id = 0, persontypeid = 0;

            PositionQuery.GetInfo(ref id, ref cname, ref persontypeid, ref persontypename);
            Common.BasicDataBind("cost_person_type", comboBoxPersonType);
            if (cname != "")
            {
                textEditName.Text = cname;
                comboBoxPersonType.SelectedIndex = -1;
                comboBoxPersonType.SelectedValue = persontypeid;
                textEditID.Text           = id.ToString();
                textEditPersonTypeID.Text = persontypeid.ToString();
            }
        }
Exemple #14
0
        private void DeptMapUpdate_Load(object sender, EventArgs e)
        {
            //this.WindowState = FormWindowState.Maximized;
            int    deptid = 0;
            string cname = "", attendance = "", attendance3rd = "", attendance4th = "";

            DeptMapQuery.GetInfo(ref deptid, ref cname, ref attendance, ref attendance3rd, ref attendance4th);
            Common.BasicDataBind("cost_dept", comboBoxDept);
            if (cname != "")
            {
                textEdit2nd.Text           = attendance;
                textEdit3rd.Text           = attendance3rd;
                textEdit4th.Text           = attendance4th;
                comboBoxDept.SelectedIndex = -1;
                comboBoxDept.SelectedValue = deptid;
                textEditID.Text            = deptid.ToString();
            }
        }
        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} ");
        }
Exemple #16
0
 private void DeptInsert_Load(object sender, EventArgs e)
 {
     //this.WindowState = FormWindowState.Maximized;
     Common.BasicDataBind("cost_saletype", comboBoxSaleType);
 }
 private void DirectLabourInsert_Load(object sender, EventArgs e)
 {
     PositionBind();
     Common.BasicDataBind("cost_dept", comboBoxDept);
     LineTypeBind();
 }
Exemple #18
0
 private void PositionInsert_Load(object sender, EventArgs e)
 {
     //this.WindowState = FormWindowState.Maximized;
     Common.BasicDataBind("cost_person_type", comboBoxPersonType);
 }
 private void TempWorkerInsert_Load(object sender, EventArgs e)
 {
     dateEditDate.Text = DateTime.Now.ToString("yyyy-MM-dd");
     Common.BasicDataBind("cost_saletype", comboBoxSaleType);
     BindDept();
 }
Exemple #20
0
 private void DeptMapInsert_Load(object sender, EventArgs e)
 {
     //this.WindowState = FormWindowState.Maximized;
     Common.BasicDataBind("cost_dept", comboBoxDept);
 }
 private void CostTransferInsert_Load(object sender, EventArgs e)
 {
     dateEditDate.Text = DateTime.Now.ToString("yyyy-MM-dd");
     Common.BasicDataBind("cost_saletype", comboBoxSaleType);
     Common.BasicDataBind("cost_transfer_type", comboBoxTransferType);
 }