示例#1
0
        private void cbofacilitiesGroup_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cboFactoryGrade.SelectedIndex == 3) //창고
            {
                List <FactoryDB_VO> F_list = R_service.GetFactoryAll();
                var High = (from H_Item in F_list
                            where H_Item.facility_class != "창고"
                            select H_Item).ToList();
                ComboUtil.ComboBinding <FactoryDB_VO>(cboParent, High, "factory_id", "factory_name");

                if (mode == EditMode.Update)
                {
                    cboParent.Text = txtpr.Text;
                }
            }
            else if (cboFactoryGrade.SelectedIndex == 2) //공장
            {
                List <FactoryDB_VO> F_list = R_service.GetFactoryAll();
                var High = (from H_Item in F_list
                            where H_Item.facility_class == "회사"
                            select H_Item).ToList();
                ComboUtil.ComboBinding <FactoryDB_VO>(cboParent, High, "factory_id", "factory_name");

                if (mode == EditMode.Update)
                {
                    cboParent.Text = txtpr.Text;
                }
            }

            else if (cboFactoryGrade.SelectedIndex == 1)
            {
                cboParent.Text       = "";
                cboParent.DataSource = null;
            }
        }
示例#2
0
        private void ComboBinding()
        {
            common_service  = new CommonCodeService();
            codelist        = common_service.GetCommonCodeAll();
            product_service = new ProductService();

            List <FactoryDB_VO> f_list           = new List <FactoryDB_VO>();
            ResourceService     resource_service = new ResourceService();

            f_list = resource_service.GetFactoryAll();

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

            #region 사용여부cbo
            List <CommonVO> _cboUseFlag = (from item in codelist
                                           where item.common_type == "user_flag"
                                           select item).ToList();
            ComboUtil.ComboBinding(cboIsUsed, _cboUseFlag, "common_value", "common_name", "선택");
            #endregion

            #region 품목유형cbo
            _cboUseFlag = (from item in codelist
                           where item.common_type == "item_type"
                           select item).ToList();
            ComboUtil.ComboBinding(cboProductType, _cboUseFlag, "common_value", "common_name", "선택");
            #endregion

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

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

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

            #region 담당자cbo

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

            #region 입고창고cbo
            List <FactoryDB_VO> _cboInSector = (from item in f_list
                                                where item.facility_value == "FAC200"
                                                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
        }
示例#3
0
        private void FacilitieInfoPop_Load(object sender, EventArgs e)
        {
            txtModifyTime.Text = string.Format("{0:yyyy-MM-dd HH:mm:ss}", today);
            //콤보박스 바인딩
            {
                service = new CommonCodeService();
                list    = service.GetCommonCodeAll();
                {
                    //사용유무
                    var mCode = (from item in list
                                 where item.common_type == "user_flag"
                                 select item).ToList();

                    ComboUtil.ComboBinding <CommonVO>(cboIsUsed, mCode, "common_value", "common_name");
                }
                {
                    var mCode = (from item in list
                                 where item.common_type == "user_flag"
                                 select item).ToList();

                    mCode.Reverse();
                    ComboUtil.ComboBinding <CommonVO>(cboIsOS, mCode, "common_value", "common_name");
                }
                R_service = new ResourceService();
                var Fatory_list = R_service.GetFactoryAll();

                var WH1 = (from wh1 in Fatory_list
                           where wh1.facility_class == "창고"
                           select wh1).ToList();
                ComboUtil.ComboBinding <FactoryDB_VO>(cboUseWH, WH1, "factory_id", "factory_name", "미선택");
                var WH2 = (from wh1 in Fatory_list
                           where wh1.facility_class == "창고"
                           select wh1).ToList();
                ComboUtil.ComboBinding <FactoryDB_VO>(cboOkWH, WH2, "factory_id", "factory_name", "미선택");
                var WH3 = (from wh1 in Fatory_list
                           where wh1.facility_class == "창고"
                           select wh1).ToList();
                ComboUtil.ComboBinding <FactoryDB_VO>(cboNgWH, WH3, "factory_id", "factory_name", "미선택");
            }
            if (mode == EditMode.Update)
            {
                MachineVO vo = this.VO;
                lblID.Text           = VO.m_id.ToString();
                lblGrCodeID.Text     = VO.mgrade_id.ToString();
                txtMgrade_code.Text  = VO.mgrade_code;
                txtCodeFacility.Text = VO.m_code;
                txtNameFacility.Text = VO.m_name;
                cboUseWH.Text        = VO.m_use_sector;
                cboOkWH.Text         = VO.m_ok_sector;
                cboNgWH.Text         = VO.m_ng_sector;
                cboIsUsed.Text       = VO.m_yn;
                cboIsOS.Text         = VO.m_os_yn;
                txtModifier.Text     = VO.m_uadmin;
                txtModifyTime.Text   = VO.m_udate;
                txtCheck.Text        = VO.m_check;
                txtComment.Text      = VO.m_comment;
            }
        }
示例#4
0
        private void SOO_Load(object sender, EventArgs e)
        {
            radioButton6.Checked = true;
            ResourceService   R_service = new ResourceService();
            CommonCodeService C_service = new CommonCodeService();
            List <CommonVO>   c_list    = C_service.GetCommonCodeAll();

            {
                var list_c = (from item in c_list
                              where item.common_type == "create_work_order"
                              select item).ToList();

                ComboUtil.ComboBinding(cboStatus, list_c, "common_value", "common_name", "미선택");
            }
            {
                var R_list = (from item in R_service.GetFactoryAll()
                              where item.facility_class == "창고"
                              select item).ToList();
                ComboUtil.ComboBinding(cboWH, R_list, "factory_id", "factory_name", "미선택");
            }
            {
                ComboUtil.ComboBinding(cboMachine, R_service.GetMachineAll(), "m_id", "m_name", "미선택");
            }

            dateTimePicker1.Value = today.AddDays(-10);
            dateTimePicker2.Value = today.AddDays(20);


            dt = P_service.GetProductionPlanCheckHis(dateTimePicker1.Value.ToShortDateString(), dateTimePicker2.Value.ToShortDateString());


            GridViewUtil.SetDataGridView(dataGridView1);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "상품ID", "pro_id", false);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "투입일", "pro_date", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "지시일", "so_sdate", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "설비코드", "m_code", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "설비명", "m_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "상태", "common_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "상태", "pro_state", false);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "품목", "product_codename", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "품명", "producct_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "소진창고", "m_use_sector", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "양품창고", "m_ok_sector", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "불량창고", "m_ng_sector", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "계획수량", "pro_count", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "지시수량", "pro_pcount", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "수량", "pro_mcount", true);
            GridViewUtil.SetDataGridView(dataGridView1);
            dataGridView1.DataSource = dt;
        }
示例#5
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
        }
示例#6
0
 private void LoadData()
 {
     list = service.GetFactoryAll();
     dataGridView1.DataSource  = list;
     dataGridView1.CurrentCell = null;
 }