Beispiel #1
0
        private void ComboBoxBinding()
        {
            //TODO 메서드 하나로 모듈화
            ProductService      product_service  = new ProductService();
            ResourceService     resource_service = new ResourceService();
            List <FactoryDB_VO> f_list           = new List <FactoryDB_VO>();

            common_service = new CommonCodeService();
            codelist       = common_service.GetCommonCodeAll();

            List <UserVO> user_list = product_service.GetUserAll();

            List <CommonVO> _cboUnit = (from item in codelist
                                        where item.common_type == "item_unit"
                                        select item).ToList();

            ComboUtil.ComboBinding(cboProductUnit, _cboUnit, "common_value", "common_name", "선택");


            List <CommonVO> _cboUseFlag = (from item in codelist
                                           where item.common_type == "user_flag"
                                           select item).ToList();

            ComboUtil.ComboBinding(cboIsUsed, _cboUseFlag, "common_value", "common_name", "선택");


            List <CommonVO> _commonlist = (from item in codelist
                                           where item.common_type == "item_type"
                                           select item).ToList();

            ComboUtil.ComboBinding(cboProductType, _commonlist, "common_value", "common_name", "선택");

            List <CommonVO> _commonmeastype = (from item in codelist
                                               where item.common_type == "meastype"
                                               select item).ToList();

            ComboUtil.ComboBinding(cboMeasType, _commonmeastype, "common_value", "common_name", "선택");

            #region 담당자cbo

            ComboUtil.ComboBinding(cboAdmin, user_list, "user_id", "user_name", "선택");
            #endregion

            #region 입고창고cbo
            f_list = resource_service.GetFactoryAll();
            List <FactoryDB_VO> _cboInSector = (from item in f_list
                                                where item.facility_value == "FAC200" || item.facility_value == "FAC400"
                                                select item).ToList();
            ComboUtil.ComboBinding(cboInSector, _cboInSector, "factory_code", "factory_name", "선택");
            #endregion

            #region 출고창고cbo
            List <FactoryDB_VO> _cboOutSector = (from item in f_list
                                                 where item.facility_value == "FAC100"
                                                 select item).ToList();
            ComboUtil.ComboBinding(cboOutSector, _cboOutSector, "factory_code", "factory_name", "선택");
            #endregion


            #region 발주방식cbo
            _commonlist = (from item in codelist
                           where item.common_type == "order_method"
                           select item).ToList();
            ComboUtil.ComboBinding(cboOrderType, _commonlist, "common_value", "common_name", "선택");
            #endregion

            #region 납품업체cbo
            List <CompanyVO> company_list  = new List <CompanyVO>();
            OrderService     order_service = new OrderService();
            company_list = order_service.GetCompanyAll("COOPERATIVE");
            ComboUtil.ComboBinding(cboSupplyCompany, company_list, "company_code", "company_name", "선택");
            #endregion

            #region 발주업체cbo
            company_list = order_service.GetCompanyAll("CUSTOMER");
            ComboUtil.ComboBinding(cboDemandCompany, company_list, "company_code", "company_name", "선택");

            List <UserVO> user_vo = new List <UserVO>();
            #endregion
        }