Beispiel #1
0
        private void SetDataGridOrdering()
        {
            dgvOrdering.Columns.Clear();


            GridViewUtil.SetDataGridView(dgvOrdering);
            dgvOrdering.AutoGenerateColumns = false;

            DataGridViewCheckBoxColumn chk = new DataGridViewCheckBoxColumn();

            chk.HeaderText = "선택";
            chk.Name       = "chk";
            chk.Width      = 40;
            dgvOrdering.Columns.Add(chk);

            //Point headerLocation = dgvOrdering.GetCellDisplayRectangle(0, -1, true).Location;

            //headerCheckBox1.Location = new Point(headerLocation.X + 8, headerLocation.Y + 2); //그냥 이렇게 주면 위치가 썩 이쁘지않아서 숫자 좀 더 플러스함
            //headerCheckBox1.BackColor = Color.White;
            //headerCheckBox1.Size = new Size(18, 18);
            //headerCheckBox1.Click += new EventHandler(HeaderCheckbox_Click);
            //dgvOrdering.Controls.Add(headerCheckBox1);

            GridViewUtil.AddNewColumnToDataGridView(dgvOrdering, "Plan ID", "plan_id", true, 110);
            GridViewUtil.AddNewColumnToDataGridView(dgvOrdering, "발주업체", "company_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dgvOrdering, "품목", "product_codename", true);
            //GridViewUtil.AddNewColumnToDataGridView(dgvOrdering, "창고", "factory_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dgvOrdering, "품명", "producct_name", true);
            GridViewUtil.AddNewColumnToTextBoxGridView(dgvOrdering, "납기일", "pro_date", true);
            GridViewUtil.AddNewColumnToDataGridView(dgvOrdering, "현재고", "present_count", true, 70, DataGridViewContentAlignment.MiddleRight, true);
            GridViewUtil.AddNewColumnToDataGridView(dgvOrdering, "발주제안수량", "pro_count", true, 110, DataGridViewContentAlignment.MiddleRight, true);
            GridViewUtil.AddNewColumnToTextBoxGridView(dgvOrdering, "발주수량", "", true, 80, DataGridViewContentAlignment.MiddleRight);
        }
Beispiel #2
0
        private void FactoryMgt_Load(object sender, EventArgs e)
        {
            this.ImeMode = ImeMode.Hangul;
            dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "ID", "factory_id", false, 60);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "시설군", "facility_class", true, 80);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "시설구분", "facility_type", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "시설타입", "facility_value", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "시설코드", "factory_code", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "시설명", "factory_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "상위시설", "factory_parent", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "업체명", "company_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "사용유무", "factory_yn", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "수정자", "factory_uadmin", false);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "수정시간", "factory_udate", true);
            GridViewUtil.SetDataGridView(dataGridView1);
            LoadData();
            CommonCodeService Common_service = new CommonCodeService();

            common_list = Common_service.GetCommonCodeAll();

            var mCode = (from item in common_list
                         where item.common_type == "facility_class_id"
                         select item).ToList();

            ComboUtil.ComboBinding <CommonVO>(cboSearchFacilityGroup, mCode, "common_value", "common_name", "미선택");

            panel1.Focus();
            dataGridView1.CurrentCell = null;

            dataGridView1.ClearSelection();
        }
Beispiel #3
0
        private void InitControl()
        {
            OrderService order_service = new OrderService();

            #region 업체cbo
            List <CompanyVO> company_list = order_service.GetCompanyAll("CUSTOMER");
            ComboUtil.ComboBinding(cboCompany, company_list, "company_id", "company_name", "전체");
            #endregion

            price_service = new PriceService();
            pricelist     = price_service.GetPriceInfo("COOPERATIVE");

            dgvMUPM.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            dgvMUPM.Columns.Add("Number", "No.");
            dgvMUPM.Columns[0].Width   = 53;
            dgvMUPM.Columns[0].Visible = false;

            #region DGV바인딩
            GridViewUtil.AddNewColumnToDataGridView(dgvMUPM, "업체", "company_code", true, 170, DataGridViewContentAlignment.MiddleLeft);
            GridViewUtil.AddNewColumnToDataGridView(dgvMUPM, "업체명", "company_name", true, 200, DataGridViewContentAlignment.MiddleLeft);
            GridViewUtil.AddNewColumnToDataGridView(dgvMUPM, "품목", "product_codename", true, 180, DataGridViewContentAlignment.MiddleLeft);
            GridViewUtil.AddNewColumnToDataGridView(dgvMUPM, "품명", "product_name", true, 240, DataGridViewContentAlignment.MiddleLeft);
            GridViewUtil.AddNewColumnToDataGridView(dgvMUPM, "단위", "product_unit", true, 100, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvMUPM, "현재단가", "price_present", true, 150, DataGridViewContentAlignment.MiddleRight, true);
            GridViewUtil.AddNewColumnToDataGridView(dgvMUPM, "이전단가", "price_past", true, 150, DataGridViewContentAlignment.MiddleRight, true);
            GridViewUtil.AddNewColumnToDataGridView(dgvMUPM, "시작일", "price_sdate", true, 150, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvMUPM, "종료일", "price_edate", true, 150, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvMUPM, "비고", "price_comment", true, 170, DataGridViewContentAlignment.MiddleLeft);
            GridViewUtil.AddNewColumnToDataGridView(dgvMUPM, "사용유무", "price_yn", true, 100, DataGridViewContentAlignment.MiddleCenter);
            #endregion
            GridViewUtil.SetDataGridView(dgvMUPM);
            dgvMUPM.AutoGenerateColumns = false;
            dgvMUPM.DataSource          = pricelist;
        }
Beispiel #4
0
        private void SetDataGridCompany()
        {
            dgvCompany.Columns.Clear();

            GridViewUtil.SetDataGridView(dgvCompany);
            dgvCompany.AutoGenerateColumns = false;

            //DataGridViewCheckBoxColumn chk = new DataGridViewCheckBoxColumn();
            //chk.HeaderText = "선택";
            //chk.Name = "chk";
            //chk.Width = 40;
            //dgvCompany.Columns.Add(chk);

            //Point headerLocation = dgvCompany.GetCellDisplayRectangle(0, -1, true).Location;

            //headerCheckBox2.Location = new Point(headerLocation.X + 8, headerLocation.Y + 2); //그냥 이렇게 주면 위치가 썩 이쁘지않아서 숫자 좀 더 플러스함
            //headerCheckBox2.BackColor = Color.White;
            //headerCheckBox2.Size = new Size(18, 18);
            //headerCheckBox2.Click += new EventHandler(HeaderCheckbox_Click2);
            //dgvCompany.Controls.Add(headerCheckBox2);

            //GridCheckBox(dgvCompany);
            //GridViewUtil.AddNewColumnToDataGridView(dgvCompany, "No.", "count", true, 30);
            GridViewUtil.AddNewColumnToDataGridView(dgvCompany, "발주업체", "company_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dgvCompany, "업체코드", "company_order_code", true, 78);
        }
Beispiel #5
0
        private void SetDataGrid()
        {
            dataGridView1.Columns.Clear();

            GridViewUtil.SetDataGridView(dataGridView1);
            dataGridView1.AutoGenerateColumns = false;

            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "고객WO", "so_wo_id", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "고객사코드", "company_code", true, 130);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "고객사명", "company_name", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "도착지코드", "company_code", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "도착지명", "company_name", true, 150);
            //GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "고객주문유형", "", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "품목", "product_codename", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "품명", "product_name", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "등록일", "so_sdate", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "생산납기일", "so_edate", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "주문수량", "so_pcount", true, 150, DataGridViewContentAlignment.MiddleRight, true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "출고수량", "so_ocount", true, 150, DataGridViewContentAlignment.MiddleRight, true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "취소수량", "so_ccount", true, 150, DataGridViewContentAlignment.MiddleRight, true);
            //GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "발주구분", "", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "비고", "so_comment", true, 150);
            //GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "수정자", "so_uadmin", true, 150);
            //GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "수정일", "so_udate", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "so_id", "so_id", false, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "plan_id", "plan_id", false, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "company_type", "company_type", false, 150);
        }
Beispiel #6
0
        private void SetDataGridResult()
        {
            dgvResult.Columns.Clear();


            GridViewUtil.SetDataGridView(dgvResult);
            dgvResult.AutoGenerateColumns = false;

            DataGridViewCheckBoxColumn chk = new DataGridViewCheckBoxColumn();

            chk.HeaderText = "";
            chk.Name       = "chk";
            chk.Width      = 30;
            dgvResult.Columns.Add(chk);

            Point headerLocation = dgvResult.GetCellDisplayRectangle(0, -1, true).Location;

            headerCheckBox2.Location  = new Point(headerLocation.X + 8, headerLocation.Y + 2); //그냥 이렇게 주면 위치가 썩 이쁘지않아서 숫자 좀 더 플러스함
            headerCheckBox2.BackColor = Color.White;
            headerCheckBox2.Size      = new Size(18, 18);
            headerCheckBox2.Click    += new EventHandler(HeaderCheckbox_Click2);
            dgvResult.Controls.Add(headerCheckBox2);

            GridViewUtil.AddNewColumnToDataGridView(dgvResult, "발주시리얼", "order_serial", true, 110);
            GridViewUtil.AddNewColumnToDataGridView(dgvResult, "발주일자", "order_ddate", true, 200);
            GridViewUtil.AddNewColumnToDataGridView(dgvResult, "발주업체", "company_name", true, 200);
            GridViewUtil.AddNewColumnToDataGridView(dgvResult, "품목", "product_codename", true, 200);
            GridViewUtil.AddNewColumnToDataGridView(dgvResult, "품명", "product_name", true, 200);
            GridViewUtil.AddNewColumnToDataGridView(dgvResult, "발주량", "order_count", true, 200);
            GridViewUtil.AddNewColumnToTextBoxGridView(dgvResult, "입고일자", "order_pdate", true, 200);
            GridViewUtil.AddNewColumnToTextBoxGridView(dgvResult, "출발일", "order_sdate", true, 200);
            GridViewUtil.AddNewColumnToDataGridView(dgvResult, "주문상태", "common_name", true, 200);
        }
Beispiel #7
0
        private void ShiftMain_Load(object sender, EventArgs e)
        {
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "ID", "s_id", false, 60);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "설비코드", "m_code", true, 80);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "설비명", "m_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "Shift", "common_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "시작시간", "shift_stime", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "완료시간", "shift_etime", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "적용시작일", "shift_sdate", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "적용완료일", "shift_edate", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "사용유무", "shift_yn", true);

            dataGridView1.AllowUserToAddRows = false;
            dataGridView1.SelectionMode      = DataGridViewSelectionMode.FullRowSelect;
            //     ShiftService S_service = new ShiftService();
            LoadData();

            ResourceService  R_service = new ResourceService();
            List <MachineVO> m_list    = R_service.GetMachineAll();

            ComboUtil.ComboBinding(cboMachine, m_list, "m_id", "m_name", "미선택");

            CommonCodeService C_service = new CommonCodeService();


            List <CommonVO> c_list     = C_service.GetCommonCodeAll();
            var             shift_code = (from shift in c_list
                                          where shift.common_type == "shift_code"
                                          select shift).ToList();

            ComboUtil.ComboBinding(cboShift, shift_code, "common_value", "common_name", "전체");

            GridViewUtil.SetDataGridView(dataGridView1);
        }
        private void DMRMgt_Load(object sender, EventArgs e)
        {
            {
                ResourceService  R_survice = new ResourceService();
                List <MachineVO> lst       = R_survice.GetMachineAll();
                ComboUtil.ComboBinding <MachineVO>(comboBox1, lst, "m_id", "m_name", "미선택");
            }
            dataGridView1.RowHeadersVisible = false;
            dataGridView1.ReadOnly          = true;

            dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
            DataGridViewCheckBoxColumn checkBoxColumn = new DataGridViewCheckBoxColumn();

            checkBoxColumn.AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
            checkBoxColumn.Name         = "ck";
            checkBoxColumn.HeaderText   = "선택";
            checkBoxColumn.MinimumWidth = 50;
            dataGridView1.Columns.Add(checkBoxColumn);

            GridViewUtil.AddNewColumnToTextBoxGridView(dataGridView1, "pro_id", "pro_id", false, 100, DataGridViewContentAlignment.MiddleLeft);  //f
            GridViewUtil.AddNewColumnToTextBoxGridView(dataGridView1, "플랜id", "plan_id", false, 100, DataGridViewContentAlignment.MiddleLeft);   //f
            GridViewUtil.AddNewColumnToTextBoxGridView(dataGridView1, "계획시작일자", "pro_date", true, 100, DataGridViewContentAlignment.MiddleLeft); //f
            GridViewUtil.AddNewColumnToTextBoxGridView(dataGridView1, " ", "so_sdate", false, 100, DataGridViewContentAlignment.MiddleLeft);     //f
            GridViewUtil.AddNewColumnToTextBoxGridView(dataGridView1, "설비코드", "m_code", true, 100, DataGridViewContentAlignment.MiddleLeft);
            GridViewUtil.AddNewColumnToTextBoxGridView(dataGridView1, "설비명", "m_name", true, 100, DataGridViewContentAlignment.MiddleLeft);      //
            GridViewUtil.AddNewColumnToTextBoxGridView(dataGridView1, "상태", "pro_state", false, 100, DataGridViewContentAlignment.MiddleLeft);   //ff
            GridViewUtil.AddNewColumnToTextBoxGridView(dataGridView1, "상태", "common_name", true, 100, DataGridViewContentAlignment.MiddleLeft);
            GridViewUtil.AddNewColumnToTextBoxGridView(dataGridView1, "상품코드", "product_codename", true, 100, DataGridViewContentAlignment.MiddleLeft);
            GridViewUtil.AddNewColumnToTextBoxGridView(dataGridView1, "상품명", "producct_name", true, 100, DataGridViewContentAlignment.MiddleLeft);
            GridViewUtil.AddNewColumnToTextBoxGridView(dataGridView1, "소요창고", "m_use_sector", true, 100, DataGridViewContentAlignment.MiddleLeft);
            GridViewUtil.AddNewColumnToTextBoxGridView(dataGridView1, "양품창고", "m_ok_sector", true, 100, DataGridViewContentAlignment.MiddleLeft);
            GridViewUtil.AddNewColumnToTextBoxGridView(dataGridView1, "불량창고", "m_ng_sector", true, 100, DataGridViewContentAlignment.MiddleLeft);
            GridViewUtil.AddNewColumnToTextBoxGridView(dataGridView1, "계획수량", "pro_count", true, 100, DataGridViewContentAlignment.MiddleLeft);
            GridViewUtil.AddNewColumnToTextBoxGridView(dataGridView1, "", "pro_pcount", false, 100, DataGridViewContentAlignment.MiddleLeft);
            GridViewUtil.AddNewColumnToTextBoxGridView(dataGridView1, "", "pro_mcount", false, 100, DataGridViewContentAlignment.MiddleLeft);



            DateTime today = DateTime.Now;

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

            dt = P_service.GetProductionPlanCheckHis(dateTimePicker1.Value.ToShortDateString(), dateTimePicker2.Value.ToShortDateString());
            //  dataGridView1.DataSource =
            DataView  dv    = dt.DefaultView;
            DataTable table = new DataTable();

            dv.RowFilter = "pro_state = 'COMMAND' ";
            if (dv.Count > 0)
            {
                table = dv.ToTable();
                dataGridView1.DataSource = table;
            }
            GridViewUtil.SetDataGridView(dataGridView1);
        }
Beispiel #9
0
        private void SetDataGrid()
        {
            dataGridView1.Columns.Clear();

            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "날짜", "date", true);
            //GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "수량", "", true, 130);
            GridViewUtil.AddNewColumnToTextBoxGridView(dataGridView1, "수량", "", true, 130);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "주중/주말", "plan_type", false, 130);
        }
Beispiel #10
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            dataGridView1.DataSource = null;
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "설비", "m_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "공정", "bor_route", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "상품코드", "product_codename", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "상품명", "producct_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "영업마스터ID", "plan_id", false);

            string    Machine = cboMachine.Text;
            DataTable dt      = service.GetProductPlan(cboPlanID.Text, dateTimePicker1.Value.ToShortDateString(), dateTimePicker2.Value.ToShortDateString());
            DataTable table   = new DataTable();

            try
            {
                //if (Machine == "전체" && txtProduct.Text == "") //둘다 빈값
                //{
                //    dataGridView1.DataSource = dt;
                //}
                if (txtProduct.Text == "" && Machine == "전체") // 둘다 빈값
                {
                    dataGridView1.DataSource = dt;
                }
                else if (txtProduct.Text != "" && Machine == "전체")  //product만 입력
                {
                    table =
                        dt.AsEnumerable().Where(Row =>
                                                Row.Field <string>("product_codename") == txtProduct.Text).CopyToDataTable();
                    dataGridView1.DataSource = table;
                }
                else if (Machine != "" && txtProduct.Text == "") //설비만 입력
                {
                    table =
                        dt.AsEnumerable().Where(Row =>
                                                Row.Field <string>("m_name") == cboMachine.Text).CopyToDataTable();
                    dataGridView1.DataSource = table;
                }
                else if (Machine != "" && txtProduct.Text != "") //둘다 입력
                {
                    table =
                        dt.AsEnumerable().Where(Row =>
                                                Row.Field <string>("m_name") == cboMachine.Text && Row.Field <string>("product_codename") == txtProduct.Text).CopyToDataTable();
                    dataGridView1.DataSource = table;
                }
                dataGridView1.ClearSelection();
            }

            catch (InvalidOperationException)
            {
                SetBottomStatusLabel("해당 조건의 검색결과가 없습니다");
                MessageBox.Show("해당 조건의 검색결과가 없습니다");
            }
            catch (Exception err)
            {
                string str = err.Message;
            }
        }
        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;
        }
Beispiel #12
0
        private void LoadDGV()
        {
            dgvProductList.RowHeadersVisible = false;
            //품목 가져오기
            ProductService   product_service = new ProductService();
            List <ProductVO> list            = product_service.GetAllProducts();
            ProductVO        vo = new ProductVO();


            dgvProductList.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            dgvProductList.Columns.Add("Number", "No.");
            dgvProductList.Columns[0].Width = 53;


            GridViewUtil.AddNewColumnToDataGridView(dgvProductList, "품목유형", "product_type", true, 100, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvProductList, "품목", "product_codename", true, 130);
            GridViewUtil.AddNewColumnToDataGridView(dgvProductList, "품명", "product_name", true, 220);
            GridViewUtil.AddNewColumnToDataGridView(dgvProductList, "단위", "product_unit", true, 100, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvProductList, "단위수량", "product_unit_count", true, 100, DataGridViewContentAlignment.MiddleRight);
            GridViewUtil.AddNewColumnToDataGridView(dgvProductList, "발주방식", "product_ordertype", true, 100, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvProductList, "최소발주수량", "product_lorder_count", true, 130, DataGridViewContentAlignment.MiddleRight);
            GridViewUtil.AddNewColumnToDataGridView(dgvProductList, "안전재고수량", "product_safety_count", true, 130, DataGridViewContentAlignment.MiddleRight);
            GridViewUtil.AddNewColumnToDataGridView(dgvProductList, "사용여부", "product_yn", true, 100, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvProductList, "담당자", "product_admin", true, 100);
            GridViewUtil.AddNewColumnToDataGridView(dgvProductList, "입고창고", "product_in_sector", true, 130, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvProductList, "출고창고", "product_out", true, 130, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvProductList, "납품업체", "product_supply_com", true, 130, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvProductList, "발주업체", "product_demand_com", true, 130, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvProductList, "측정방식", "product_meastype", true, 100, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvProductList, "LeadTime", "product_leadtime", true, 100, DataGridViewContentAlignment.MiddleRight);
            #region visible_false
            GridViewUtil.AddNewColumnToDataGridView(dgvProductList, "최솟값", "product_lsl", false, 130);
            GridViewUtil.AddNewColumnToDataGridView(dgvProductList, "최댓값", "product_usl", false, 130);
            GridViewUtil.AddNewColumnToDataGridView(dgvProductList, "아이템코드", "product_itemcode", false, 130);
            GridViewUtil.AddNewColumnToDataGridView(dgvProductList, "품번", "product_id", false, 130);
            GridViewUtil.AddNewColumnToDataGridView(dgvProductList, "품명코드", "product_code", false, 130);

            GridViewUtil.AddNewColumnToDataGridView(dgvProductList, "수정일", "product_udate", false, 130);
            GridViewUtil.AddNewColumnToDataGridView(dgvProductList, "비고", "product_comment", false, 130);

            #endregion
            //dgvProductList.Columns[0].SortMode = DataGridViewColumnSortMode.Automatic;


            GridViewUtil.SetDataGridView(dgvProductList);
            dgvProductList.AutoGenerateColumns = false;
            dgvProductList.DataSource          = list;
        }
Beispiel #13
0
        private void dgvColumnSet()
        {
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "ID", "bor_id", false);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "bom_id", "bom_id", false);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "품명", "product_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "품목", "product_codename", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "공정", "common_type", false);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "공정명", "common_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "설비", "m_code", true);

            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "설비명", "m_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "Tack Time", "bor_tacktime", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "공정선행시간", "bor_readytime", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "사용유무", "bor_yn", false);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "비고", "bor_comment", true);
        }
Beispiel #14
0
        private void SetDataGrid()
        {
            dataGridView1.Columns.Clear();

            GridViewUtil.SetDataGridView(dataGridView1);
            dataGridView1.AutoGenerateColumns = false;

            //GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "No.", "count", true, 100);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "창고코드", "factory_code", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "창고", "factory_name", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "품목", "product_codename", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "품명", "product_name", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "품목유형", "product_type", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "재고량", "w_count_present", true, 150);

            GridViewUtil.SetDoNotSort(dataGridView1);
        }
        private void GOO_Load(object sender, EventArgs e)
        {
            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", "미선택");
            }
            dataGridView1.SelectionMode      = DataGridViewSelectionMode.FullRowSelect;
            dataGridView1.AllowUserToAddRows = false;

            dateTimePicker1.Value = DateTime.Now.AddDays(-7);
            dateTimePicker2.Value = DateTime.Now.AddDays(7);
            ResourceService  R_service = new ResourceService();
            List <MachineVO> m_list    = R_service.GetMachineAll();

            ComboUtil.ComboBinding(cboMachine, m_list, "m_code", "m_name", "미선택");

            DataGridViewCheckBoxColumn checkBoxColumn = new DataGridViewCheckBoxColumn();

            checkBoxColumn.AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
            checkBoxColumn.HeaderText   = "선택";
            dataGridView1.Columns.Add(checkBoxColumn);

            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "작업지시번호", "WorkID", true, 60);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "품목", "product_codename", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "품명", "product_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "상태", "common_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "상태", "pro_state", false);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "설비코드", "m_code", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "설비명", "m_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "계획수량", "pro_count", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "지시수량", "pro_pcount", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "계획시작일", "pro_date", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "마스터ID", "plan_id", false);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "상품ID", "pro_id", false);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "소요시간", "use_time", true);
            GridViewUtil.SetDataGridView(dataGridView1);


            LoadData();
        }
Beispiel #16
0
        private void SetDataGrid()
        {
            dataGridView1.Columns.Clear();

            GridViewUtil.SetDataGridView(dataGridView1);
            dataGridView1.AutoGenerateColumns = false;

            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "HISTORY 번호", "wh_id", false, 110);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "창고번호", "w_id", false, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "제품번호", "product_id", false, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "Plan ID", "plan_id", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "품명", "product_name", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "품목", "product_codename", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "수량", "wh_product_count", true, 150);
            GridViewUtil.AddNewColumnToTextBoxGridView(dataGridView1, "수정일", "wh_udate", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "잔량", "wh_comment", false, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "카테고리", "common_name", true, 150);
        }
Beispiel #17
0
        //데이터그리드뷰 칼럼 세팅
        private void SetDataGrid()
        {
            dataGridView1.Columns.Clear();

            dataGridView1.RowsDefaultCellStyle.BackColor            = Color.FromArgb(240, 240, 240);
            dataGridView1.AlternatingRowsDefaultCellStyle.BackColor = Color.White;
            dataGridView1.DefaultCellStyle.SelectionBackColor       = Color.Gray; //Color.DimGray;
            dataGridView1.DefaultCellStyle.SelectionForeColor       = Color.White;

            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "planDate", "", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "순번", "", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "WORK_ORDER_ID", "", true, 130);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "업체코드", "", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "납품처", "", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "입고P/NO", "", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "품명", "", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "계획수량합계", "", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "납기일", "", true);
        }
Beispiel #18
0
        private void facilityMgt_Load(object sender, EventArgs e)
        {
            dataGridView1.RowHeadersVisible   = false;
            dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
            dataGridView2.RowHeadersVisible   = false;
            dataGridView2.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
            dataGridView1.SelectionMode       = DataGridViewSelectionMode.FullRowSelect;
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "ID", "mgrade_id", false, 60);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "설비군 코드", "mgrade_code", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "설비군명", "mgrade_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "사용유무", "mgrade_yn", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "수정자", "mgrade_uadmin", false);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "수정시간", "mgrade_udate", false);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "시설설명", "mgrade_comment", false);
            GridViewUtil.SetDataGridView(dataGridView1);

            dataGridView2.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "ID", "m_id", false, 60);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "설비ID", "mgrade_id", false);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "설비군코드", "mgrade_code", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "설비코드", "m_code", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "설비명", "m_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "소진창고", "m_use_sector", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "양품창고", "m_ok_sector", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "불량창고", "m_ng_sector", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "외주여부", "m_os_yn", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "특이사항", "m_check", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "비고", "m_comment", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "사용유무", "m_yn", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "수정자", "m_uadmin", false);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "수정시간", "m_udate", true);
            GridViewUtil.SetDataGridView(dataGridView2);



            R_service = new ResourceService();
            LoadData();
            dataGridView1.ClearSelection();
            dataGridView2.ClearSelection();
        }
Beispiel #19
0
        private void LoadDGV()
        {
            BomService service = new BomService();

            BOM_list = service.GetBomAll();

            dgvBom.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            dgvBom.Columns.Add("Number", "No.");
            dgvBom.Columns[0].Width   = 53;
            dgvBom.Columns[0].Visible = false;

            #region DGV바인딩
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "품목유형", "bom_type", true, 130, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "품목", "bom_codename", true, 150, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "품명", "bom_name", true, 220);
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "단위", "bom_unit", true, 100, DataGridViewContentAlignment.MiddleCenter);

            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "사용여부", "bom_yn", true, 100, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "소요계획", "plan_yn", true, 100, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "시작일", "bom_sdate", true, 130, DataGridViewContentAlignment.MiddleRight);
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "종료일", "bom_edate", true, 130, DataGridViewContentAlignment.MiddleRight);
            //GridViewUtil.AddNewColumnToDataGridView(dgvBom, "수정자", "bom_uadmin", true, 130, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "수정일", "bom_udate", true, 130, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "비고", "bom_comment", true, 150, DataGridViewContentAlignment.MiddleLeft);
            #endregion

            #region visible_false
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "품번", "product_id", false, 100, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "BOM레벨", "bom_level", false, 80, DataGridViewContentAlignment.MiddleRight);
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "소요량", "bom_use_count", false, 80, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "BomID", "bom_id", false, 100, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "상위품목", "bom_parent_id", false, 130);
            #endregion
            GridViewUtil.SetDataGridView(dgvBom);
            dgvBom.AutoGenerateColumns = false;
            dgvBom.DataSource          = BOM_list;
            dgvBom.ClearSelection();
        }
Beispiel #20
0
        private void businessMgt_Load(object sender, EventArgs e)
        {
            dataGridView2.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "업체ID", "company_id", false);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "업체코드", "company_code", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "업체명", "company_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "업체타입", "common_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "업체타입", "company_type", false);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "대표자명", "company_ceo", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "사업자등록번호", "company_cnum", true);

            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "업종", "company_btype", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "업태", "company_gtype", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "담당자", "user_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "담당자id", "user_id", false);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "이메일", "company_email", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "전화번호", "company_phone", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "팩스", "company_fax", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "수정자", "company_uadmin", false);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "수정시간", "company_udate", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "업체정보", "company_comment", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "사용유무", "company_yn", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "업체발주코드", "company_order_code", false);
            GridViewUtil.SetDataGridView(dataGridView2);

            LoadData();

            common_service = new CommonCodeService();
            common_list    = common_service.GetCommonCodeAll();
            {
                //사용유무
                var mCode = (from item in common_list
                             where item.common_type == "vendor_type"
                             select item).ToList();

                ComboUtil.ComboBinding <CommonVO>(cboTypeCompany, mCode, "common_value", "common_name", "미선택");
            }
        }
Beispiel #21
0
        private void dgvBom_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            dgvBomDetail.DataSource = null;
            dgvBomDetail.Columns.Clear();
            //dgvBom[11, dgvBom.CurrentRow.Index].Value.ToString()
            bom_service = new BomService();
            List <BomVO> bomDetail = bom_service.GetBomAll(Convert.ToInt32(dgvBom[11, dgvBom.CurrentRow.Index].Value));

            dgvBomDetail.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            dgvBomDetail.Columns.Add("Number", "No.");
            dgvBomDetail.Columns[0].Width   = 53;
            dgvBomDetail.Columns[0].Visible = false;

            #region DGV바인딩
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "상위품목", "bom_parent_codename", true, 130);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "품목", "bom_codename", true, 130);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "품명", "bom_name", true, 220);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "품목유형", "bom_type", true, 130);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "단위", "bom_unit", true, 78, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "소요량", "bom_use_count", true, 80, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "BOM레벨", "bom_level", true, 100, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "시작일", "bom_sdate", true, 130, DataGridViewContentAlignment.MiddleRight);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "종료일", "bom_edate", true, 130, DataGridViewContentAlignment.MiddleRight);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "사용여부", "bom_yn", true, 100, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "소요계획", "plan_yn", true, 100, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "수정자", "bom_uadmin", true, 130, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "수정일", "bom_udate", true, 130, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "비고", "bom_comment", true, 130, DataGridViewContentAlignment.MiddleCenter);
            #endregion

            #region visible_false
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "품번", "product_id", false, 100, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "BomID", "bom_id", false, 100, DataGridViewContentAlignment.MiddleCenter);
            #endregion
            dgvBomDetail.AutoGenerateColumns = false;
            dgvBomDetail.DataSource          = bomDetail;
            dgvBomDetail.ClearSelection();
        }
Beispiel #22
0
        private void BOR_Load(object sender, EventArgs e)
        {
            this.ImeMode = ImeMode.Hangul;
            GridViewUtil.SetDataGridView(dataGridView1);
            dgvColumnSet();



            LoadData();
            dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect; // 셀 클릭하면 행 전체가 선택


            common_service = new CommonCodeService();
            common_list    = common_service.GetCommonCodeAll();
            {
                //사용유무
                var mCode = (from item in common_list
                             where item.common_type == "route"
                             select item).ToList();

                ComboUtil.ComboBinding <CommonVO>(cboProcess, mCode, "common_value", "common_name", "미선택");
            }
        }
Beispiel #23
0
        private void SetDataGrid()
        {
            dataGridView1.Columns.Clear();

            GridViewUtil.SetDataGridView(dataGridView1);

            dataGridView1.AutoGenerateColumns = false;

            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "입출고일", "wh_udate", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "번호", "wh_id", true, 100);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "카테고리", "wh_category", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "창고", "factory_name", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "품목", "product_codename", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "품명", "product_name", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "품목형태", "product_type", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "발주시리얼", "order_id", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "수량", "wh_product_count", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "단가", "price_present", true, 150, DataGridViewContentAlignment.MiddleRight, true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "금액", "totalprice", true, 150, DataGridViewContentAlignment.MiddleRight, true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "비고", "wh_comment", true, 150);

            GridViewUtil.SetDoNotSort(dataGridView1);
        }
Beispiel #24
0
        private void SetDataGrid()
        {
            dataGridView1.Columns.Clear();

            GridViewUtil.SetDataGridView(dataGridView1);
            dataGridView1.AutoGenerateColumns = false;

            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "고객WO", "so_wo_id", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "고객사코드", "company_code", true, 130);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "고객사명", "company_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "도착지코드", "company_code", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "도착지명", "company_name", true);
            //GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "고객주문유형", "", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "품목", "product_codename", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "품명", "product_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "등록일", "so_sdate", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "생산납기일", "so_edate", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "주문수량", "so_pcount", true);
            //GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "발주구분", "", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "so_id", "so_id", false);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "plan_id", "plan_id", false);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "company_type", "company_type", false);
        }
Beispiel #25
0
        private void SetDataGrid()
        {
            dataGridView1.Columns.Clear();

            GridViewUtil.SetDataGridView(dataGridView1);
            dataGridView1.AutoGenerateColumns = false;

            DataGridViewCheckBoxColumn chk = new DataGridViewCheckBoxColumn();

            chk.HeaderText = "선택";
            chk.Name       = "chk";
            chk.Width      = 45;
            dataGridView1.Columns.Add(chk);

            //Point headerLocation = dataGridView1.GetCellDisplayRectangle(0, -1, true).Location;

            //headerCheckBox.Location = new Point(headerLocation.X + 8, headerLocation.Y + 2); //그냥 이렇게 주면 위치가 썩 이쁘지않아서 숫자 좀 더 플러스함
            //headerCheckBox.BackColor = Color.White;
            //headerCheckBox.Size = new Size(18, 18);
            //headerCheckBox.Click += new EventHandler(HeaderCheckbox_Click);
            //dataGridView1.Controls.Add(headerCheckBox);

            //GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "No.", "count", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "발주시리얼", "order_serial", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "PlanID", "plan_id", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "납품업체", "company_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "주문상태", "common_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "품목", "product_codename", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "품명", "product_name", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "납기일", "order_pdate", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "발주량", "order_count", true);
            //GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "입고량", "", true);
            //GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "출발량", "company_order_code", true);
            GridViewUtil.AddNewColumnToTextBoxGridView(dataGridView1, "취소량", "", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "취소가능량", "order_count", true);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "발주일", "order_ddate", true);
        }
        private void SetDataGrid()
        {
            dataGridView1.Columns.Clear();

            GridViewUtil.SetDataGridView(dataGridView1);
            dataGridView1.AutoGenerateColumns = false;

            DataGridViewCheckBoxColumn chk = new DataGridViewCheckBoxColumn();

            chk.HeaderText = "선택";
            chk.Name       = "chk";
            chk.Width      = 40;
            dataGridView1.Columns.Add(chk);

            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "발주시리얼", "order_serial", true, 110);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "입고일", "order_pdate", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "입고창고", "factory_name", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "품목", "product_codename", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "품명", "product_name", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "입고량", "order_qcount", true, 150);
            GridViewUtil.AddNewColumnToTextBoxGridView(dataGridView1, "취소량", "", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "잔량", "order_qcount", true, 150);
            GridViewUtil.AddNewColumnToDataGridView(dataGridView1, "업체", "company_name", true, 150);
        }
Beispiel #27
0
 private void dgvResult_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
 {
     GridViewUtil.SetDgvTextBoxColor(dgvResult, 7);
     GridViewUtil.SetDgvTextBoxColor(dgvResult, 8);
 }
 private void dataGridView1_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
 {
     GridViewUtil.SetDgvTextBoxColor(dataGridView1, 7);
 }
        private void btnAdd_Click(object sender, EventArgs e)
        {
            try
            {
                dataGridView2.DataSource = null;
                dataGridView2.Columns.Clear();
                dataGridView2.DataSource = null;
                ndt = null;

                List <DMRVO>   lst       = new List <DMRVO>();
                ProcessService P_service = new ProcessService();
                DMRVO          vo        = new DMRVO();
                try
                {
                    for (int i = 0; i < dataGridView1.Rows.Count; i++)
                    {
                        if (Convert.ToBoolean(dataGridView1.Rows[i].Cells[0].Value) == true)                    //체크박스가 true?
                        {
                            vo.product_codename = dataGridView1.Rows[i].Cells[9].Value.ToString();              //제품코드네임

                            vo.factory_name = dataGridView1.Rows[i].Cells[11].Value.ToString();                 //창고명
                            vo.pro_id       = Convert.ToInt32(dataGridView1.Rows[i].Cells[1].Value.ToString()); //pro_id
                            vo.plan_id      = dataGridView1.Rows[i].Cells[2].Value.ToString();                  //plan_id
                            if (P_service.GetDMRMgt(vo).Count >= 5)
                            {
                                lst = (P_service.GetDMRMgt(vo));
                            }
                        }
                    }
                    for (int i = 0; i < lst.Count; i++)
                    {
                        lst[i].req_date = DateTime.Now.ToShortDateString();
                    }
                    //  lst = P_service.GetDMRMgt(vo);
                    //dt = P_service.GetProductionPlanCheckHis(dateTimePicker1.Value.ToShortDateString(), dateTimePicker2.Value.ToShortDateString());
                    GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "pro_id", "pro_id", false, 100, DataGridViewContentAlignment.MiddleLeft);         //f
                    GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "플랜id", "plan_id", false, 100, DataGridViewContentAlignment.MiddleLeft);          //f
                    GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "product_id", "product_id", false, 100, DataGridViewContentAlignment.MiddleLeft); //f
                    GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "제품코드명", "product_codename", true, 100, DataGridViewContentAlignment.MiddleLeft); //f
                    GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "제품명", "product_name", true, 100, DataGridViewContentAlignment.MiddleLeft);
                    GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "", "factory_id", false, 100, DataGridViewContentAlignment.MiddleLeft);           //
                    GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "창고명", "factory_name", true, 100, DataGridViewContentAlignment.MiddleLeft);       //ff
                    GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "계획수량", "pro_count", true, 100, DataGridViewContentAlignment.MiddleLeft);
                    GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "소요량", "bom_use_count", true, 100, DataGridViewContentAlignment.MiddleLeft);
                    GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "소요수량", "plan_count", true, 100, DataGridViewContentAlignment.MiddleLeft);

                    GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "자재창고 재고", "w_count_present", true, 100, DataGridViewContentAlignment.MiddleLeft);
                    GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "이전재고", "w_count_past", false, 100, DataGridViewContentAlignment.MiddleLeft);
                    GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "요청창고id", "req_factory_id", false, 100, DataGridViewContentAlignment.MiddleLeft);
                    GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "요청창고", "req_factory", true, 100, DataGridViewContentAlignment.MiddleLeft);
                    GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "요청창고 재고", "nam", false, 100, DataGridViewContentAlignment.MiddleLeft);
                    GridViewUtil.AddNewColumnToTextBoxGridView(dataGridView2, "요청량", "req_count", true, 100, DataGridViewContentAlignment.MiddleLeft);
                    GridViewUtil.AddNewColumnToTextBoxGridView(dataGridView2, "사유", "reason", true, 100, DataGridViewContentAlignment.MiddleLeft);

                    GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "요청일", "req_date", true, 100, DataGridViewContentAlignment.MiddleLeft);
                    GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "w_id", "w_id", false, 100, DataGridViewContentAlignment.MiddleLeft);
                    GridViewUtil.AddNewColumnToDataGridView(dataGridView2, "", "order_id", false, 100, DataGridViewContentAlignment.MiddleLeft);

                    dataGridView2.RowsDefaultCellStyle.BackColor            = Color.FromArgb(240, 240, 240);
                    dataGridView2.AlternatingRowsDefaultCellStyle.BackColor = Color.White;
                    dataGridView2.DefaultCellStyle.SelectionBackColor       = Color.Gray; //Color.DimGray;
                    dataGridView2.DefaultCellStyle.SelectionForeColor       = Color.White;

                    dataGridView2.DataSource = lst;
                }
                catch (Exception err)
                {
                    string st = err.Message;
                }
            }
            catch (Exception err)
            {
                LoggingUtility.GetLoggingUtility(err.Message, Level.Error);
            }
        }
Beispiel #30
0
        private void dgvBomDetail_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            foreach (DataGridViewRow row in this.dgvBomDetail.SelectedRows)
            {
                BomVO vo = new BomVO();
                vo = row.DataBoundItem as BomVO;
                if (vo.bom_typevalue == "RM")
                {
                    BomPop frm = new BomPop(BomPop.EditMode.Update, vo);
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        bom_service = new BomService();
                        List <BomVO> newBOMlist = bom_service.GetBomAll();    //등록후 다시 조회
                        dgvBom.DataSource = newBOMlist;
                        dgvBom.ClearSelection();
                        SetBottomStatusLabel("BOM 수정이 완료되었습니다.");
                    }
                    SetBottomStatusLabel("원자재는 선택할 수 없습니다.");
                    return;
                }
            }



            int product_id = Convert.ToInt32(dgvBomDetail[15, dgvBomDetail.CurrentRow.Index].Value);

            bom_service = new BomService();

            List <BomVO> newBom = bom_service.GetBomAll(0, product_id);

            dgvBom.DataSource = null;
            dgvBom.Columns.Clear();

            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "품목유형", "bom_type", true, 130, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "품목", "bom_codename", true, 150, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "품명", "bom_parent_name", true, 220);
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "단위", "bom_unit", true, 100, DataGridViewContentAlignment.MiddleCenter);

            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "사용여부", "bom_yn", true, 100, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "소요계획", "plan_yn", true, 100, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "시작일", "bom_sdate", true, 130, DataGridViewContentAlignment.MiddleRight);
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "종료일", "bom_edate", true, 130, DataGridViewContentAlignment.MiddleRight);
            //GridViewUtil.AddNewColumnToDataGridView(dgvBom, "수정자", "bom_uadmin", true, 130, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "수정일", "bom_udate", true, 130, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "비고", "bom_comment", true, 150, DataGridViewContentAlignment.MiddleLeft);


            #region visible_false
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "품번", "product_id", false, 100, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "BOM레벨", "bom_level", false, 80, DataGridViewContentAlignment.MiddleRight);
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "소요량", "bom_use_count", false, 80, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "BomID", "bom_id", false, 100, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBom, "상위품목", "bom_parent_id", false, 130);
            #endregion
            dgvBom.AutoGenerateColumns = false;
            dgvBom.DataSource          = newBom;
            dgvBom.ClearSelection();

            int          bom_id       = Convert.ToInt32(dgvBomDetail[15, dgvBomDetail.CurrentRow.Index].Value);
            List <BomVO> newBomDetail = bom_service.GetBomAll(0, bom_id);

            dgvBomDetail.DataSource = null;
            dgvBomDetail.Columns.Clear();

            dgvBomDetail.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            dgvBomDetail.Columns.Add("Number", "No.");
            dgvBomDetail.Columns[0].Width   = 53;
            dgvBomDetail.Columns[0].Visible = false;

            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "상위품목", "bom_parent_name", true, 130);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "품목", "bom_codename", true, 130);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "품명", "bom_name", true, 220);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "품목유형", "bom_type", true, 130);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "단위", "bom_unit", true, 78, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "소요량", "bom_use_count", true, 80, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "BOM레벨", "bom_level", true, 100, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "시작일", "bom_sdate", true, 130, DataGridViewContentAlignment.MiddleRight);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "종료일", "bom_edate", true, 130, DataGridViewContentAlignment.MiddleRight);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "사용여부", "bom_yn", true, 120, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "소요계획", "plan_yn", true, 120, DataGridViewContentAlignment.MiddleCenter);
            //GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "수정자", "bom_uadmin", true, 130, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "수정일", "bom_udate", true, 130, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "비고", "bom_comment", true, 130, DataGridViewContentAlignment.MiddleCenter);

            #region visible_false
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "품번", "product_id", false, 100, DataGridViewContentAlignment.MiddleCenter);
            GridViewUtil.AddNewColumnToDataGridView(dgvBomDetail, "BomID", "bom_id", false, 100, DataGridViewContentAlignment.MiddleCenter);
            #endregion

            dgvBomDetail.AutoGenerateColumns = false;
            dgvBomDetail.DataSource          = newBomDetail;
            dgvBomDetail.ClearSelection();
            SetBottomStatusLabel("BOM을 선택하세요");
        }