Exemplo n.º 1
0
        private void frmBill_Load(object sender, EventArgs e)
        {
            BeginDate.Text = DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString() + "-01";
            endDate.Text   = DateTime.Now.ToShortDateString();


            LoadBill();

            //绑定仓库
            DepotManage DepotManage = new DepotManage();
            DataTable   dtl         = DepotManage.GetDepotData();

            cboDepot.Items.Add("");
            for (int i = 0; i < dtl.Rows.Count; i++)
            {
                cboDepot.Items.Add(dtl.Rows[i]["仓库名称"].ToString());
            }


            //绑定类型
            dtl = DepotManage.GetStorageTypeData("I");
            cboStorageType.Items.Add("");
            for (int i = 0; i < dtl.Rows.Count; i++)
            {
                cboStorageType.Items.Add(dtl.Rows[i]["StorageTypeName"].ToString());
            }


            //绑定部门
            DeptManage DeptManage = new DeptManage();

            dtl = DeptManage.GetDeptData();
            cboDept.Items.Add("");
            for (int i = 0; i < dtl.Rows.Count; i++)
            {
                cboDept.Items.Add(dtl.Rows[i]["部门名称"].ToString());
            }


            //绑定经手人
            EmployeeManage EmployeeManage = new EmployeeManage();

            dtl = EmployeeManage.GetEmployeeData();
            cboHandlePerson.Items.Add("");
            for (int i = 0; i < dtl.Rows.Count; i++)
            {
                cboHandlePerson.Items.Add(dtl.Rows[i]["员工姓名"].ToString());
            }


            //绑定供应商
            SupplierManage SupplierManage = new SupplierManage();

            dtl = SupplierManage.GetSupplierData();
            cboSupplier.Items.Add("");
            for (int i = 0; i < dtl.Rows.Count; i++)
            {
                cboSupplier.Items.Add(dtl.Rows[i]["供应商名称"].ToString());
            }
        }
Exemplo n.º 2
0
        private void frmCheckBill_Load(object sender, EventArgs e)
        {
            BeginDate.Text = DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString() + "-01";
            endDate.Text   = DateTime.Now.ToShortDateString();

            LoadBill();

            //绑定调出仓库
            DepotManage DepotManage = new DepotManage();
            DataTable   dtl         = DepotManage.GetDepotData();

            cboDepot.Items.Add("");
            for (int i = 0; i < dtl.Rows.Count; i++)
            {
                cboDepot.Items.Add(dtl.Rows[i]["仓库名称"].ToString());
            }

            //绑定经手人
            EmployeeManage EmployeeManage = new EmployeeManage();

            dtl = EmployeeManage.GetEmployeeData();
            cboHandlePerson.Items.Add("");
            for (int i = 0; i < dtl.Rows.Count; i++)
            {
                cboHandlePerson.Items.Add(dtl.Rows[i]["员工姓名"].ToString());
            }
        }
Exemplo n.º 3
0
        private void CboBind()
        {
            //绑定仓库
            DepotManage DepotManage = new DepotManage();
            DataTable   dtl         = DepotManage.GetDepotData();

            cboDepotOut.Items.Add("");
            for (int i = 0; i < dtl.Rows.Count; i++)
            {
                cboDepotOut.Items.Add(dtl.Rows[i]["仓库名称"].ToString());
            }


            //绑定仓库
            dtl = DepotManage.GetDepotData();
            cboDepotIn.Items.Add("");
            for (int i = 0; i < dtl.Rows.Count; i++)
            {
                cboDepotIn.Items.Add(dtl.Rows[i]["仓库名称"].ToString());
            }

            //绑定经手人
            EmployeeManage EmployeeManage = new EmployeeManage();

            dtl = EmployeeManage.GetEmployeeData();
            cboHandlePerson.Items.Add("");
            for (int i = 0; i < dtl.Rows.Count; i++)
            {
                cboHandlePerson.Items.Add(dtl.Rows[i]["员工姓名"].ToString());
            }
        }
Exemplo n.º 4
0
        //载入货品数据
        public void LoadEmployee()
        {
            DataTable dtl = EmployeeManage.GetEmployeeData();

            gridControl1.DataSource = dtl;

            gridView1.Columns[0].Visible = false;
        }
Exemplo n.º 5
0
        private void frmBill_Load(object sender, EventArgs e)
        {
            LoadBill();

            //绑定仓库
            DepotManage DepotManage = new DepotManage();
            DataTable   dtl         = DepotManage.GetDepotData();

            cboDepot.Items.Add("");
            for (int i = 0; i < dtl.Rows.Count; i++)
            {
                cboDepot.Items.Add(dtl.Rows[i]["仓库名称"].ToString());
            }


            //绑定类型
            dtl = DepotManage.GetStorageTypeData("E");
            cboStorageType.Items.Add("");
            for (int i = 0; i < dtl.Rows.Count; i++)
            {
                cboStorageType.Items.Add(dtl.Rows[i]["StorageTypeName"].ToString());
            }


            //绑定部门
            DeptManage DeptManage = new DeptManage();

            dtl = DeptManage.GetDeptData();
            cboDept.Items.Add("");
            for (int i = 0; i < dtl.Rows.Count; i++)
            {
                cboDept.Items.Add(dtl.Rows[i]["部门名称"].ToString());
            }


            //绑定经手人
            EmployeeManage EmployeeManage = new EmployeeManage();

            dtl = EmployeeManage.GetEmployeeData();
            cboHandlePerson.Items.Add("");
            for (int i = 0; i < dtl.Rows.Count; i++)
            {
                cboHandlePerson.Items.Add(dtl.Rows[i]["员工姓名"].ToString());
            }

            //绑定客户
            ClientManage ClientManage = new ClientManage();

            dtl = ClientManage.GetClientData();
            cboSupplier.Items.Add("");
            for (int i = 0; i < dtl.Rows.Count; i++)
            {
                cboSupplier.Items.Add(dtl.Rows[i]["客户名称"].ToString());
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// 加载数据
        /// </summary>
        /// <param name="MaterialGuid"></param>
        private void FillData(string EmployeeGuid)
        {
            EmployeeManage Employeemanage = new EmployeeManage();
            DataTable      dtl            = Employeemanage.GetEmployeeData(EmployeeGuid);

            if (dtl.Rows.Count > 0)
            {
                txtGuid.Text      = dtl.Rows[0]["EmpGuid"].ToString();
                txtEmpId.Text     = dtl.Rows[0]["EmpID"].ToString();
                txtEmpName.Text   = dtl.Rows[0]["EmpName"].ToString();
                txtTelephone.Text = dtl.Rows[0]["Telephone"].ToString();
                txtCardID.Text    = dtl.Rows[0]["CardID"].ToString();
                txtAddress.Text   = dtl.Rows[0]["Address"].ToString();
                txtDept.Text      = dtl.Rows[0]["Dept"].ToString();
                txtSex.Text       = dtl.Rows[0]["Sex"].ToString();
            }

            this.ShowDialog();
        }
Exemplo n.º 7
0
        /// <summary>
        /// 加载数据
        /// </summary>
        /// <param name="MaterialGuid"></param>
        private void FillData(string EmployeeGuid)
        {
            //绑定部门
            cboDataBind(cboDept);

            EmployeeManage Employeemanage = new EmployeeManage();
            DataTable      dtl            = Employeemanage.GetEmployeeData(EmployeeGuid);

            if (dtl.Rows.Count > 0)
            {
                txtGuid.Text      = dtl.Rows[0]["EmpGuid"].ToString();
                txtEmpId.Text     = dtl.Rows[0]["EmpID"].ToString();
                txtEmpName.Text   = dtl.Rows[0]["EmpName"].ToString();
                txtTelephone.Text = dtl.Rows[0]["Telephone"].ToString();
                txtCardID.Text    = dtl.Rows[0]["CardID"].ToString();
                txtAddress.Text   = dtl.Rows[0]["Address"].ToString();
                txtSex.Text       = dtl.Rows[0]["Sex"].ToString();
                if (dtl.Rows[0]["IsEnable"].ToString() == "1")
                {
                    chkIsEnable.Checked = true;
                }
                else
                {
                    chkIsEnable.Checked = false;
                }


                for (int i = 0; i < cboDept.Items.Count; i++)
                {
                    ListItem item = cboDept.Items[i] as ListItem;
                    if (item.Value.Trim() == dtl.Rows[0]["Dept"].ToString().Trim())
                    {
                        cboDept.SelectedIndex = i;
                        break;
                    }
                }
            }

            this.ShowDialog();
        }
Exemplo n.º 8
0
        private void CboBind(string flag)
        {
            //绑定仓库
            DepotManage DepotManage = new DepotManage();
            DataTable   dtl         = DepotManage.GetDepotData();

            cboDepot.Items.Add("");
            for (int i = 0; i < dtl.Rows.Count; i++)
            {
                cboDepot.Items.Add(dtl.Rows[i]["仓库名称"].ToString());
            }


            //绑定类型
            dtl = DepotManage.GetStorageTypeData(flag);
            cboStorageType.Items.Add("");
            for (int i = 0; i < dtl.Rows.Count; i++)
            {
                cboStorageType.Items.Add(dtl.Rows[i]["StorageTypeName"].ToString());
            }


            //绑定部门
            DeptManage DeptManage = new DeptManage();

            dtl = DeptManage.GetDeptData();
            cboDept.Items.Add("");
            for (int i = 0; i < dtl.Rows.Count; i++)
            {
                cboDept.Items.Add(dtl.Rows[i]["部门名称"].ToString());
            }


            //绑定经手人
            EmployeeManage EmployeeManage = new EmployeeManage();

            dtl = EmployeeManage.GetEmployeeData();
            cboHandlePerson.Items.Add("");
            for (int i = 0; i < dtl.Rows.Count; i++)
            {
                cboHandlePerson.Items.Add(dtl.Rows[i]["员工姓名"].ToString());
            }

            //绑定供应商
            if (flag == "I")
            {
                SupplierManage SupplierManage = new SupplierManage();
                dtl = SupplierManage.GetSupplierData();
                cboSupplier.Items.Add("");
                for (int i = 0; i < dtl.Rows.Count; i++)
                {
                    cboSupplier.Items.Add(dtl.Rows[i]["供应商名称"].ToString());
                }
            }
            else
            {
                ClientManage ClientManage = new ClientManage();
                dtl = ClientManage.GetClientData();
                cboSupplier.Items.Add("");
                for (int i = 0; i < dtl.Rows.Count; i++)
                {
                    cboSupplier.Items.Add(dtl.Rows[i]["客户名称"].ToString());
                }
            }
        }