Пример #1
0
 private void Initialize()
 {
     cmbParent.Items.Clear();
     ExtItem item = new ExtItem("无", null);
     cmbParent.Items.Add(item);
     try
     {
         List<Department> depts = icompany.getAllDept();
         foreach (Department dept in depts)
         {
             item = new ExtItem(dept.Name + " " + dept.Code, dept.DeptId);
             cmbParent.Items.Add(item);
         }
         cmbParent.SelectedIndex = 0;
     }
     catch (BIZException be)
     {
         MessageBox.Show("构建部门列表失败:" + be.Message);
     }
     catch (DAOException de)
     {
         MessageBox.Show("构建部门列表失败:" + de.Message);
     }
 }
Пример #2
0
        private void InitControls()
        {
            List<Department> depts = icompany.getAllDept();
            foreach (Department dept in depts)
            {
                ExtItem item = new ExtItem(dept.Name, dept.DeptId);
                form.sLstDept.Items.Add(item);
            }

            List<EmpType> empTypes = iemployee.getAllEmpType();
            foreach (EmpType type in empTypes)
            {
                ExtItem item = new ExtItem(type.Name, type.EmpTypeID);
                form.sLstEmpType.Items.Add(item);
            }

            {
                ExtItem item = new ExtItem("在职", WorkStatus.OnWork);
                form.sLstWorkStatus.Items.Add(item);
                item = new ExtItem("离职", WorkStatus.Left);
                form.sLstWorkStatus.Items.Add(item);
            }
        }
Пример #3
0
        private void ShowPayrollItem()
        {
            ClearItemList();
            int group = cmbItemGroup.SelectedIndex;

            if (items != null)
            {
                foreach (PayrollItem item in items)
                {
                    if (group == item.Group)
                    {
                        ExtItem ei = new ExtItem(item.ItemName, item.ItemId);
                        lstItem.Items.Add(ei);
                    }
                }
            }
        }
Пример #4
0
 private void ShowFixedItem()
 {
     ClearItemList();
     string[,] fixedItem = PayrollItemDef.Instance.FixedItems;
     for (int i = 0; i < fixedItem.GetLength(0); i++)
     {
         ExtItem item = new ExtItem(fixedItem[i, 1], fixedItem[i, 0]);
         lstItem.Items.Add(item);
     }
 }
Пример #5
0
 private void ShowCalcFlag()
 {
     ClearItemList();
     if (calcFlags != null)
     {
         foreach (CalcFlag flag in calcFlags)
         {
             ExtItem item = new ExtItem(flag.FlagName, flag.FlagId);
             lstItem.Items.Add(item);
         }
     }
 }
Пример #6
0
 private void InitControls()
 {
     // 收货人列表
     List<Employee> emps = iemployee.getAllEmp();
     foreach (Employee emp in emps)
     {
         ExtItem item = new ExtItem(emp.Name, emp.EmpID);
         cmbPayEmp.Items.Add(item);
     }
 }
Пример #7
0
        private void InitControls()
        {
            form.sCmbCommoName.Items.Add(new ExtItem(string.Empty, string.Empty));
            Hashtable htCommName = icommodity.getListComdName();
            foreach (DictionaryEntry objDe in htCommName)
            {
                ExtItem item = new ExtItem(objDe.Value.ToString(), objDe.Value.ToString());
                form.sCmbCommoName.Items.Add(item);
            }
            form.sCmbCommoName.SelectedIndex = -1;

            form.sCmbOrderStatus.Items.Add(new ExtItem(string.Empty, -1));
            form.sCmbOrderStatus.Items.Add(new ExtItem(EnumString.GetPurOrderStatusString(0), 0));
            form.sCmbOrderStatus.Items.Add(new ExtItem(EnumString.GetPurOrderStatusString(1), 1));
            form.sCmbOrderStatus.Items.Add(new ExtItem(EnumString.GetPurOrderStatusString(2), 2));
            form.sCmbOrderStatus.Items.Add(new ExtItem(EnumString.GetPurOrderStatusString(3), 3));
            form.sCmbOrderStatus.SelectedIndex = -1;

            form.sCmbDeliveryStatus.Items.Add(new ExtItem(string.Empty, -1));
            form.sCmbDeliveryStatus.Items.Add(new ExtItem(EnumString.GetDeliveryStatusString(true), 1));
            form.sCmbDeliveryStatus.Items.Add(new ExtItem(EnumString.GetDeliveryStatusString(false), 0));
            form.sCmbDeliveryStatus.SelectedIndex = -1;

            form.sCmbPayStatus.Items.Add(new ExtItem(string.Empty, -1));
            form.sCmbPayStatus.Items.Add(new ExtItem(EnumString.GetPayStatusString(true), 1));
            form.sCmbPayStatus.Items.Add(new ExtItem(EnumString.GetPayStatusString(false), 0));
            form.sCmbPayStatus.SelectedIndex = -1;
        }
Пример #8
0
        private void ResetSCmbStandard()
        {
            sCmbStandard.Items.Clear();

            if (null == sCmbCommoName.SelectedItem)
            {
                return;
            }

            // 商品规格列表
            sCmbStandard.Items.Add(new ExtItem(string.Empty, string.Empty));
            Hashtable tbStandard = icommodity.getListComdStandard((sCmbCommoName.SelectedItem as ExtItem).Tag.ToString());
            foreach (DictionaryEntry objDe in tbStandard)
            {
                ExtItem item = new ExtItem(objDe.Value.ToString(), objDe.Key.ToString());
                sCmbStandard.Items.Add(item);
            }
            sCmbStandard.SelectedIndex = 0;
        }
Пример #9
0
        private void InitControls()
        {
            Hashtable htCommName = icommodity.getListComdName();
            foreach (DictionaryEntry objDe in htCommName)
            {
                ExtItem item = new ExtItem(objDe.Value.ToString(), objDe.Value.ToString());
                form.sCmbCommoName.Items.Add(item);
            }

            form.sCmbPayStatus.Items.Add(new ExtItem(EnumString.GetPayStatusString(true), 1));
            form.sCmbPayStatus.Items.Add(new ExtItem(EnumString.GetPayStatusString(false), 0));

            form.sCmbRecStatus.Items.Add(new ExtItem(EnumString.GetRecStatusString(true), 1));
            form.sCmbRecStatus.Items.Add(new ExtItem(EnumString.GetRecStatusString(false), 0));

            form.sCmbPurStatus.Items.Add(new ExtItem(EnumString.GetPurOrderStatusString(0), 0));
            form.sCmbPurStatus.Items.Add(new ExtItem(EnumString.GetPurOrderStatusString(1), 1));
            form.sCmbPurStatus.Items.Add(new ExtItem(EnumString.GetPurOrderStatusString(2), 2));
            form.sCmbPurStatus.Items.Add(new ExtItem(EnumString.GetPurOrderStatusString(3), 3));
        }
Пример #10
0
        private void ResetCmbStandard()
        {
            cmbStandard.Items.Clear();

            if (null == cmbCommo.SelectedItem)
            {
                return;
            }

            // 商品规格列表
            Hashtable tbStandard = icommodity.getListComdStandard((cmbCommo.SelectedItem as ExtItem).Tag.ToString());
            foreach (DictionaryEntry objDe in tbStandard)
            {
                ExtItem item = new ExtItem(objDe.Value.ToString(), objDe.Key.ToString());
                cmbStandard.Items.Add(item);
            }
            if (cmbStandard.Items.Count > 0)
            {
                cmbStandard.SelectedIndex = 0;
            }
            else
            {
                cmbStandard.SelectedIndex = -1;
            }
        }
Пример #11
0
        private void ResetCmbCus()
        {
            cmbCus.Items.Clear();
            if (null == cmbCusType.SelectedItem)
            {
                return;
            }

            // 顾客列表
            CusSearchTerm cusSearchTerm = new CusSearchTerm();
            cusSearchTerm.CusTypeID = (cmbCusType.SelectedItem as ExtItem).Tag.ToString();
            List<Customer> cusList = icustomer.getCusByMultiFilter(cusSearchTerm);
            foreach (Customer cus in cusList)
            {
                ExtItem item;

                if (cus.CompanyName != string.Empty)
                {
                    item = new ExtItem(cus.CompanyName, cus.CustomId);
                }
                else
                {
                    item = new ExtItem(cus.Name, cus.CustomId);
                }
                cmbCus.Items.Add(item);
            }
        }
Пример #12
0
        private void InitControls()
        {
            // 顾客类型列表
            List<CusType> cusTypeList = icustomer.getAllCusType();

            cmbCusType.Items.Add(new ExtItem(string.Empty, string.Empty));
            foreach (CusType cusType in cusTypeList)
            {
                ExtItem item;
                item = new ExtItem(cusType.Name, cusType.CusTypeId);
                cmbCusType.Items.Add(item);
            }
            cmbCusType.SelectedIndex = 0;

            // 顾客列表
            //ResetCmbCus();

            // 业务员列表
            List<Employee> emps = iemployee.getAllEmp();
            foreach (Employee emp in emps)
            {
                ExtItem item = new ExtItem(emp.Name, emp.EmpID);
                cmbEmp.Items.Add(item);
            }

            // 商品列表
            Hashtable tbCommoName = icommodity.getListComdName();
            foreach (DictionaryEntry objDe in tbCommoName)
            {
                ExtItem item = new ExtItem(objDe.Value.ToString(), objDe.Key.ToString());
                cmbCommo.Items.Add(item);
            }
        }
        private void InitControls()
        {
            chklDept.Items.Clear();
            List<Department> depts = icomp.getAllDept();
            foreach (Department dept in depts)
            {
                ExtItem item = new ExtItem(dept.Name, dept.DeptId);
                chklDept.Items.Add(item);
            }

            chklEmpType.Items.Clear();
            List<EmpType> empTypes = iemp.getAllEmpType();
            foreach (EmpType type in empTypes)
            {
                ExtItem item = new ExtItem(type.Name, type.EmpTypeID);
                chklEmpType.Items.Add(item);
            }

            chklWorkStatus.Items.Clear();
            {
                ExtItem item = new ExtItem("在职", WorkStatus.OnWork);
                chklWorkStatus.Items.Add(item);
                item = new ExtItem("离职", WorkStatus.Left);
                chklWorkStatus.Items.Add(item);
            }
        }
Пример #14
0
        private void InitControls()
        {
            // 业务员列表
            List<Employee> emps = iemployee.getAllEmp();
            foreach (Employee emp in emps)
            {
                ExtItem item = new ExtItem(emp.Name, emp.EmpID);
                cmbEmp.Items.Add(item);
            }

            // 商品列表
            Hashtable tbCommoName = icommodity.getListComdName();
            foreach (DictionaryEntry objDe in tbCommoName)
            {
                ExtItem item = new ExtItem(objDe.Value.ToString(), objDe.Key.ToString());
                cmbCommo.Items.Add(item);
            }
        }