private void SettingDefectiveType() { UtilClass.SettingDgv(dgvDefectiveType); UtilClass.AddNewColum(dgvDefectiveType, "불량유형번호", "DefecID", false, 130); UtilClass.AddNewColum(dgvDefectiveType, "불량유형명", "DefecName", true, 130); UtilClass.AddNewColum(dgvDefectiveType, "불량유형설명", "DefecExplain", true, 300); }
private void LoadData() { UtilClass.SettingDgv(dgv_StockStatus); UtilClass.AddNewColum(dgv_StockStatus, "품번", "Product_ID", true); UtilClass.AddNewColum(dgv_StockStatus, "품명", "Product_Name", true, 300); UtilClass.AddNewColum(dgv_StockStatus, "카테고리", "CodeTable_CodeName", true); UtilClass.AddNewColum(dgv_StockStatus, "창고코드", "Warehouse_ID", true); UtilClass.AddNewColum(dgv_StockStatus, "창고명", "Warehouse_Name", true, 160); UtilClass.AddNewColum(dgv_StockStatus, "단가", "Product_Price", true); UtilClass.AddNewColum(dgv_StockStatus, "재고량", "Product_Qty", true, 90); UtilClass.AddNewColum(dgv_StockStatus, "안전재고량", "Product_Safety", true, 110); UtilClass.AddNewColum(dgv_StockStatus, "차이수량", "Count_Subtract", true); UtilClass.AddNewColum(dgv_StockStatus, "삭제여부", "Product_DeletedYN", false); dgv_StockStatus.Columns[5].DefaultCellStyle.Format = "#,#0원"; dgv_StockStatus.Columns[5].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; dgv_StockStatus.Columns[6].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; dgv_StockStatus.Columns[6].DefaultCellStyle.Format = "#,#0개"; dgv_StockStatus.Columns[7].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; dgv_StockStatus.Columns[7].DefaultCellStyle.Format = "#,#0개"; dgv_StockStatus.Columns[8].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; dgv_StockStatus.Columns[8].DefaultCellStyle.Format = "#,#0개"; try { StockStatus_AllList = service.GetStockStatus(); } catch (Exception err) { Log.WriteError(err.Message, err); } }
private void SettingDgvDefectiveHandle() { UtilClass.SettingDgv(dgvDefectiveHandle); UtilClass.AddNewColum(dgvDefectiveHandle, "불량처리유형번호", "HandleID", false, 170); UtilClass.AddNewColum(dgvDefectiveHandle, "불량처리유형명", "HandleName", true, 150); UtilClass.AddNewColum(dgvDefectiveHandle, "불량처리유형설명", "HandleExplain", true, 300); }
private void SettingDgvDowntimeType() { UtilClass.SettingDgv(dgvDowntimeType); UtilClass.AddNewColum(dgvDowntimeType, "비가동유형번호", "DownID", false, 170); UtilClass.AddNewColum(dgvDowntimeType, "비가동유형명", "DownName", true, 130); UtilClass.AddNewColum(dgvDowntimeType, "비가동유형설명", "DownExplain", true, 300); }
// 그리드 뷰 디자인 private void InitGridView() { UtilClass.SettingDgv(dgvFactory); UtilClass.AddNewColum(dgvFactory, "공장코드", "Factory_ID", true, 100); UtilClass.AddNewColum(dgvFactory, "공장이름", "Factory_Name", true, 100); UtilClass.AddNewColum(dgvFactory, "공장구분ID", "Factory_Division", false, 100); UtilClass.AddNewColum(dgvFactory, "공장구분", "Factory_Division_Name", true, 100); UtilClass.AddNewColum(dgvFactory, "전화번호", "Factory_Number", true, 100); UtilClass.AddNewColum(dgvFactory, "FAX번호", "Factory_Fax", true, 100); UtilClass.AddNewColum(dgvFactory, "우편번호", "Factory_AddrNumber", true, 100); UtilClass.AddNewColum(dgvFactory, "주소", "Factory_Address", true, 100); dgvFactory.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells; UtilClass.SettingDgv(dgvLine); UtilClass.AddNewColum(dgvLine, "공정코드", "Line_ID", true, 100); UtilClass.AddNewColum(dgvLine, "라인이름", "Line_Name", true, 100); UtilClass.AddNewColum(dgvLine, "공장ID", "Factory_ID", true, 100); UtilClass.AddNewColum(dgvLine, "공장이름", "Factory_Name", true, 100); UtilClass.AddNewColum(dgvLine, "비가동상태", "Line_Downtome_Name", true, 100); dgvLine.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells; }
private void SettingDgvUserAuth() { UtilClass.SettingDgv(dgvEmpList); UtilClass.AddNewColum(dgvEmpList, "사원번호", "ID"); UtilClass.AddNewColum(dgvEmpList, "사원명", "Name"); UtilClass.SettingDgv(dgvAuthList); UtilClass.AddNewColum(dgvAuthList, "메뉴명", "Form"); DataGridViewCheckBoxColumn cbx = new DataGridViewCheckBoxColumn(); cbx.DataPropertyName = "Auth"; cbx.Width = 30; dgvAuthList.Columns.Add(cbx); dgvAuthList.Columns[1].MinimumWidth = 30; Point headerLocation = dgvAuthList.GetCellDisplayRectangle(1, -1, true).Location; headerbox.Location = new Point(headerLocation.X + 8, headerLocation.Y + 5); headerbox.BackColor = Color.FromArgb(55, 113, 138); headerbox.Size = new Size(16, 16); headerbox.Click += new EventHandler(headerbox_Click); dgvAuthList.Controls.Add(headerbox); dgvAuthList.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.None; }
private void SearchForm_Load(object sender, EventArgs e) { UtilClass.SettingDgv(dgvSearch); SettingData(); this.ActiveControl = txtSearch; txtSearch.Select(); }
private void LoadData() { UtilClass.SettingDgv(dgv_Stock); UtilClass.AddNewColum(dgv_Stock, "수불번호", "StockReceipt_ID", true); UtilClass.AddNewColum(dgv_Stock, "수불유형", "StockReceipt_Division1", true); UtilClass.AddNewColum(dgv_Stock, "처리일시", "StockReceipt_Date", true, 170); UtilClass.AddNewColum(dgv_Stock, "창고코드", "Warehouse_ID", true); UtilClass.AddNewColum(dgv_Stock, "창고명", "Warehouse_Name", true, 160); UtilClass.AddNewColum(dgv_Stock, "품번", "Product_ID", true, 70); UtilClass.AddNewColum(dgv_Stock, "품명", "Product_Name", true, 300); UtilClass.AddNewColum(dgv_Stock, "수불수량", "StockReceipt_Quantity", true); UtilClass.AddNewColum(dgv_Stock, "등록사원", "Employees_Name", true); UtilClass.AddNewColum(dgv_Stock, "창고유형", "Warehouse_Division", false); dgv_Stock.Columns[1].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dgv_Stock.Columns[2].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dgv_Stock.Columns[2].DefaultCellStyle.Format = "yyyy-MM-dd HH:mm"; dgv_Stock.Columns[7].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; dgv_Stock.Columns[7].DefaultCellStyle.Format = "#,#0개"; try { StockReceipt_AllList = service.GetStockReceipts(true); }// 수불내역 갱신 catch (Exception err) { Log.WriteError(err.Message, err); } Search_Period.Startdate.BackColor = Color.LightYellow; Search_Period.Enddate.BackColor = Color.LightYellow; Group_Rdo.Enabled = false; }
private void LoadData() { UtilClass.SettingDgv(dgv_BaljuCompleted); UtilClass.AddNewColum(dgv_BaljuCompleted, "발주지시번호", "Balju_ID", true, 130); UtilClass.AddNewColum(dgv_BaljuCompleted, "거래처코드", "Company_ID", true, 110); UtilClass.AddNewColum(dgv_BaljuCompleted, "거래처명칭", "Company_Name", true, 200); UtilClass.AddNewColum(dgv_BaljuCompleted, "발주요청일시", "Balju_Date", true, 170); UtilClass.AddNewColum(dgv_BaljuCompleted, "요청등록사원", "Employees_Name", true, 150); UtilClass.AddNewColum(dgv_BaljuCompleted, "수령일시", "Balju_ReceiptDate", true, 170); UtilClass.AddNewColum(dgv_BaljuCompleted, "수령사원", "ReceiptEmployees_Name", true, 150); UtilClass.AddNewColum(dgv_BaljuCompleted, "총액", "Total", true, 170); UtilClass.AddNewColum(dgv_BaljuCompleted, "삭제여부", "Balju_DeletedYN", false); dgv_BaljuCompleted.Columns[3].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dgv_BaljuCompleted.Columns[3].DefaultCellStyle.Format = "yyyy-MM-dd HH:mm"; dgv_BaljuCompleted.Columns[5].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dgv_BaljuCompleted.Columns[5].DefaultCellStyle.Format = "yyyy-MM-dd HH:mm"; dgv_BaljuCompleted.Columns[7].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; dgv_BaljuCompleted.Columns[7].DefaultCellStyle.Format = "#,#0원"; try { BaljuCompleted_AllList = service.GetBalju_CompletedList(); }// 발주리스트 갱신 catch (Exception err) { Log.WriteError(err.Message, err); } UtilClass.SettingDgv(dgv_BaljuDetail); UtilClass.AddNewColum(dgv_BaljuDetail, "발주지시번호", "Balju_ID", false, 130); UtilClass.AddNewColum(dgv_BaljuDetail, "품목코드", "Product_ID", true); UtilClass.AddNewColum(dgv_BaljuDetail, "품목명", "Product_Name", true, 500); UtilClass.AddNewColum(dgv_BaljuDetail, "발주요청수량", "BaljuDetail_Qty", true, 130); dgv_BaljuDetail.Columns[3].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; dgv_BaljuDetail.Columns[3].DefaultCellStyle.Format = "#,#0개"; Search_ReceiptPeriod.Startdate.BackColor = Color.LightYellow; Search_ReceiptPeriod.Enddate.BackColor = Color.LightYellow; }
private void LoadData() { UtilClass.SettingDgv(dgv_Shipment); UtilClass.AddNewColum(dgv_Shipment, "출하번호", "Shipment_ID", true, 110); UtilClass.AddNewColum(dgv_Shipment, "주문번호", "Order_ID", true, 110); UtilClass.AddNewColum(dgv_Shipment, "주문일시", "Order_Date", true, 170); UtilClass.AddNewColum(dgv_Shipment, "주문처리일시", "OrderCompleted_Date", true, 170); UtilClass.AddNewColum(dgv_Shipment, "고객ID", "Customer_userID", true, 90); UtilClass.AddNewColum(dgv_Shipment, "고객성명", "Customer_Name", true, 110); UtilClass.AddNewColum(dgv_Shipment, "출하요청일자", "Shipment_RequiredDate", true, 130); UtilClass.AddNewColum(dgv_Shipment, "출하지시자", "Employees_Name", true, 120); dgv_Shipment.Columns[2].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dgv_Shipment.Columns[2].DefaultCellStyle.Format = "yyyy-MM-dd HH:mm"; dgv_Shipment.Columns[3].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dgv_Shipment.Columns[3].DefaultCellStyle.Format = "yyyy-MM-dd HH:mm"; dgv_Shipment.Columns[6].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dgv_Shipment.Columns[6].DefaultCellStyle.Format = "yyyy-MM-dd"; try { Shipment_AllList = service.GetShipmentList(); } catch (Exception err) { Log.WriteError(err.Message, err); } UtilClass.SettingDgv(dgv_ShipmentDetail); UtilClass.AddNewColum(dgv_ShipmentDetail, "출하번호", "Shipment_ID", false); UtilClass.AddNewColum(dgv_ShipmentDetail, "제품ID", "Product_ID", true); UtilClass.AddNewColum(dgv_ShipmentDetail, "제품명", "Product_Name", true, 300); UtilClass.AddNewColum(dgv_ShipmentDetail, "주문수량", "OrderDetail_Qty", true); dgv_ShipmentDetail.Columns[3].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; dgv_ShipmentDetail.Columns[3].DefaultCellStyle.Format = "#,#0개"; Search_OrderCompletedPeriod.Startdate.BackColor = Color.LightYellow; Search_OrderCompletedPeriod.Enddate.BackColor = Color.LightYellow; }
/// <summary> /// Dgv설정 메서드 /// </summary> private void SettingDgvDefective() { UtilClass.SettingDgv(dgvDefective); UtilClass.AddNewColum(dgvDefective, "생산실적번호", "Performance_ID", true, 130); UtilClass.AddNewColum(dgvDefective, "공장번호", "Factory_ID", false); UtilClass.AddNewColum(dgvDefective, "공장명", "Factory_Name", true, 130); UtilClass.AddNewColum(dgvDefective, "공정번호", "Line_ID", false); UtilClass.AddNewColum(dgvDefective, "공정명", "Line_Name", true, 130); UtilClass.AddNewColum(dgvDefective, "품목번호", "Product_ID", false); UtilClass.AddNewColum(dgvDefective, "품목명", "Product_Name", true, 150); UtilClass.AddNewColum(dgvDefective, "불량유형번호", "DefectiveType_ID", false); UtilClass.AddNewColum(dgvDefective, "불량유형", "DefectiveType_Name", true); UtilClass.AddNewColum(dgvDefective, "불량처리유형번호", "DefectiveHandle_ID", false); UtilClass.AddNewColum(dgvDefective, "불량처리유형", "DefectiveHandle_Name", true, 130); UtilClass.AddNewColum(dgvDefective, "작업자번호", "Employees_ID", false); UtilClass.AddNewColum(dgvDefective, "작업자", "Employees_Name", true, 100); UtilClass.AddNewColum(dgvDefective, "불량개수", "Defective_Num", true, 100); UtilClass.AddNewColum(dgvDefective, "처리날짜", "Defective_HandleDate", true, 100); dgvDefective.Columns[13].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; dgvDefective.Columns[13].DefaultCellStyle.Format = "#개"; dgvDefective.Columns[14].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; UtilClass.SettingDgv(dgvDefectiveByLine); dgvDefectiveByLine.AutoGenerateColumns = true; UtilClass.SettingDgv(dgvDefectiveByDefecType); dgvDefectiveByDefecType.AutoGenerateColumns = true; UtilClass.SettingDgv(dgvDefectiveByDefecHandleType); dgvDefectiveByDefecHandleType.AutoGenerateColumns = true; }
private void LoadData() { UtilClass.SettingDgv(dgv_Order); UtilClass.AddNewColum(dgv_Order, "주문번호", "Order_ID", true); UtilClass.AddNewColum(dgv_Order, "고객ID", "Customer_UserID", true, 90); UtilClass.AddNewColum(dgv_Order, "고객성명", "Customer_Name", true); UtilClass.AddNewColum(dgv_Order, "주문일시", "Order_Date", true, 140); UtilClass.AddNewColum(dgv_Order, "주문처리일시", "OrderCompleted_Date", true, 140); UtilClass.AddNewColum(dgv_Order, "배송지주소", "Order_Address1", true, 200); UtilClass.AddNewColum(dgv_Order, "배송지상세주소", "Order_Address2", true, 200); UtilClass.AddNewColum(dgv_Order, "주문총액", "TotalPrice", true); UtilClass.AddNewColum(dgv_Order, "주문처리사원", "Employees_Name", true, 120); dgv_Order.Columns[3].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dgv_Order.Columns[3].DefaultCellStyle.Format = "yyyy-MM-dd HH:mm"; dgv_Order.Columns[4].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dgv_Order.Columns[4].DefaultCellStyle.Format = "yyyy-MM-dd HH:mm"; dgv_Order.Columns[7].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; dgv_Order.Columns[7].DefaultCellStyle.Format = "#,#0원"; try { Order_AllList = service.GetOrderCompletedList(); } catch (Exception err) { Log.WriteError(err.Message, err); } UtilClass.SettingDgv(dgv_OrderDetail); UtilClass.AddNewColum(dgv_OrderDetail, "주문번호", "Order_ID", false); UtilClass.AddNewColum(dgv_OrderDetail, "제품ID", "Product_ID", true); UtilClass.AddNewColum(dgv_OrderDetail, "제품명", "Product_Name", true, 300); UtilClass.AddNewColum(dgv_OrderDetail, "주문수량", "OrderDetail_Qty", true); dgv_OrderDetail.Columns[3].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; dgv_OrderDetail.Columns[3].DefaultCellStyle.Format = "#,#0개"; Search_Period.Startdate.BackColor = Color.LightYellow; Search_Period.Enddate.BackColor = Color.LightYellow; }
// 그리드 뷰 디자인 private void InitGridView() { UtilClass.SettingDgv(dgvBOM); UtilClass.AddNewColum(dgvBOM, "제품ID", "Product_ID", false, 100); UtilClass.AddNewColum(dgvBOM, "분류", "Product_Category", false, 100); UtilClass.AddNewColum(dgvBOM, "품목명", "CodeTable_CodeName", true, 100); UtilClass.AddNewColum(dgvBOM, "제품명", "Product_Name", true, 100); UtilClass.AddNewColum(dgvBOM, "가격", "Product_Price", true, 100, DataGridViewContentAlignment.MiddleRight); UtilClass.AddNewColum(dgvBOM, "창고ID", "Warehouse_ID", false, 100); UtilClass.AddNewColum(dgvBOM, "창고이름", "Warehouse_Name", false, 100); UtilClass.AddNewColum(dgvBOM, "개수", "Product_Qty", false, 100); UtilClass.AddNewColum(dgvBOM, "안전개수", "Product_Safety", false, 100); UtilClass.AddNewColum(dgvBOM, "삭제여부", "Product_DeletedYN", false, 100); UtilClass.AddNewColum(dgvBOM, "카테고리이름", "Category_Division", false, 100); UtilClass.AddNewColum(dgvBOM, "이미지", "Product_Image", false, 100); UtilClass.AddNewColum(dgvBOM, "원가", "Product_Origin", false, 100); dgvBOM.Columns[4].DefaultCellStyle.Format = "#,##0원"; dgvBOM.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells; DataGridViewButtonColumn btn = new DataGridViewButtonColumn(); btn.HeaderText = "전개"; btn.Width = 100; dgvBOM.Columns.Add(btn); dgvBOM.Columns[12].AutoSizeMode = DataGridViewAutoSizeColumnMode.None; dgvBOM.Columns[12].Width = 70; UtilClass.SettingDgv(dgvBOMDetail1); UtilClass.AddNewColum(dgvBOMDetail1, "제품ID", "Product_ID", false, 100); UtilClass.AddNewColum(dgvBOMDetail1, "분류", "Category_Division", true, 100); UtilClass.AddNewColum(dgvBOMDetail1, "제품명", "Product_Name", true, 100); UtilClass.AddNewColum(dgvBOMDetail1, "조합개수", "Combination_RequiredQty", true, 100, DataGridViewContentAlignment.MiddleRight); UtilClass.AddNewColum(dgvBOMDetail1, "가격", "Product_Price", true, 100, DataGridViewContentAlignment.MiddleRight); UtilClass.AddNewColum(dgvBOMDetail1, "조합ID", "Combination_ID", false, 100); UtilClass.AddNewColum(dgvBOMDetail1, "조합제품ID", "Combination_Product_ID", false, 100); UtilClass.AddNewColum(dgvBOMDetail1, "조합삭제여부", "Combination_DeletedYN", false, 100); dgvBOMDetail1.Columns[3].DefaultCellStyle.Format = "#,##0개"; dgvBOMDetail1.Columns[4].DefaultCellStyle.Format = "#,##0원"; dgvBOMDetail1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells; UtilClass.SettingDgv(dgvBOMDetail2); UtilClass.AddNewColum(dgvBOMDetail2, "제품ID", "Product_ID", false, 100); UtilClass.AddNewColum(dgvBOMDetail2, "분류", "Category_Division", true, 100); UtilClass.AddNewColum(dgvBOMDetail2, "제품명", "Product_Name", true, 100); UtilClass.AddNewColum(dgvBOMDetail2, "조합개수", "Combination_RequiredQty", true, 100, DataGridViewContentAlignment.MiddleRight); UtilClass.AddNewColum(dgvBOMDetail2, "가격", "Product_Price", true, 100, DataGridViewContentAlignment.MiddleRight); UtilClass.AddNewColum(dgvBOMDetail2, "조합ID", "Combination_ID", false, 100); UtilClass.AddNewColum(dgvBOMDetail2, "조합제품ID", "Combination_Product_ID", false, 100); UtilClass.AddNewColum(dgvBOMDetail2, "조합삭제여부", "Combination_DeletedYN", false, 100); dgvBOMDetail2.Columns[3].DefaultCellStyle.Format = "#,##0개"; dgvBOMDetail2.Columns[4].DefaultCellStyle.Format = "#,##0원"; dgvBOMDetail2.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells; }
// 그리드 뷰 디자인 private void InitGridView() { UtilClass.SettingDgv(dgvDepartment); UtilClass.AddNewColum(dgvDepartment, "부서코드", "CodeTable_CodeID", true, 100); UtilClass.AddNewColum(dgvDepartment, "부서이름", "CodeTable_CodeName", true, 100); UtilClass.AddNewColum(dgvDepartment, "부서설명", "CodeTable_CodeExplain", true, 100); dgvDepartment.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells; }
// 그리드 뷰 디자인 private void InitGridView() { UtilClass.SettingDgv(dgvCategory); UtilClass.AddNewColum(dgvCategory, "카테고리코드", "CodeTable_CodeID", true, 100); UtilClass.AddNewColum(dgvCategory, "카테고리이름", "CodeTable_CodeName", true, 100); UtilClass.AddNewColum(dgvCategory, "카테고리설명", "CodeTable_CodeExplain", true, 100); dgvCategory.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells; }
//데이터그리드뷰 설정 private void InitGridView() { UtilClass.SettingDgv(dgvSemiProduct); UtilClass.AddNewColum(dgvSemiProduct, "제품이름", "Product_Name", true, 100); UtilClass.AddNewColum(dgvSemiProduct, "제품가격", "Product_Price", true, 100, DataGridViewContentAlignment.MiddleRight); UtilClass.AddNewColum(dgvSemiProduct, "제품카테고리", "Product_Category", false, 100); UtilClass.AddNewColum(dgvSemiProduct, "제품ID", "Product_ID", false, 100); dgvSemiProduct.Columns[1].DefaultCellStyle.Format = "#,##0원"; dgvSemiProduct.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells; }
private void SettingDgvProduce() { string[] exceptlist = new string[] { "Employees_ID", "Factory_ID", "Line_ID", "Product_ID" }; UtilClass.SettingDgv(dgvProduce); UtilClass.AddNewColum(dgvProduce, "작업지시번호", "ProduceWork_ID", false, 130); UtilClass.AddNewColum(dgvProduce, "생산지시번호", "Produce_ID", true, 130); UtilClass.AddNewColum(dgvProduce, "생산시작일", "Produce_StartDate", true, 180); UtilClass.AddNewColum(dgvProduce, "생산완료일", "Produce_DoneDate", true, 180); UtilClass.AddNewColum(dgvProduce, "공장번호", "Factory_ID", false); UtilClass.AddNewColum(dgvProduce, "공장명", "Factory_Name", true, 130); UtilClass.AddNewColum(dgvProduce, "공정번호", "Line_ID", false); UtilClass.AddNewColum(dgvProduce, "공정명", "Line_Name", true, 130); UtilClass.AddNewColum(dgvProduce, "품목번호", "Product_ID", false); UtilClass.AddNewColum(dgvProduce, "품목명", "Product_Name", true, 150); UtilClass.AddNewColum(dgvProduce, "요청수량", "Produce_QtyRequested", true); UtilClass.AddNewColum(dgvProduce, "투입수량", "Produce_QtyReleased", true); UtilClass.AddNewColum(dgvProduce, "생산상태", "Produce_State", true); dgvProduce.Columns[1].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dgvProduce.Columns[2].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dgvProduce.Columns[10].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; dgvProduce.Columns[11].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; dgvProduce.Columns[10].DefaultCellStyle.Format = "#0개"; dgvProduce.Columns[11].DefaultCellStyle.Format = "#0개"; UtilClass.SettingDgv(dgvPerformance); UtilClass.AddNewColum(dgvPerformance, "생산지시번호", "PerformanceProduce_ID", false, 130); UtilClass.AddNewColum(dgvPerformance, "생산실적번호", "Performance_ID", true, 130); UtilClass.AddNewColum(dgvPerformance, "실적시작시간", "Performance_StartDate", true, 180); UtilClass.AddNewColum(dgvPerformance, "실적종료시간", "Performance_EndDate", true, 180); UtilClass.AddNewColum(dgvPerformance, "경과시간", "Performance_ElapsedTime", true); UtilClass.AddNewColum(dgvPerformance, "품목번호", "Product_ID", false); UtilClass.AddNewColum(dgvPerformance, "품목명", "Product_Name", true, 150); UtilClass.AddNewColum(dgvPerformance, "요청수량", "Performance_QtyImport", true); UtilClass.AddNewColum(dgvPerformance, "양품수량", "Performance_QtySuccessItem", true); UtilClass.AddNewColum(dgvPerformance, "불량수량", "Performance_QtyDefectiveItem", true); UtilClass.AddNewColum(dgvPerformance, "불량률", "Performance_DefectiveRate", true); UtilClass.AddNewColum(dgvPerformance, "작업자번호", "Employees_ID", false); UtilClass.AddNewColum(dgvPerformance, "작업자", "Employees_Name", true); dgvPerformance.Columns[2].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dgvPerformance.Columns[3].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dgvPerformance.Columns[4].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dgvPerformance.Columns[7].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; dgvPerformance.Columns[8].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; dgvPerformance.Columns[9].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; dgvPerformance.Columns[10].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; dgvPerformance.Columns[7].DefaultCellStyle.Format = "#0개"; dgvPerformance.Columns[8].DefaultCellStyle.Format = "#0개"; dgvPerformance.Columns[9].DefaultCellStyle.Format = "#0개"; dgvPerformance.Columns[10].DefaultCellStyle.Format = "0.0#\\%"; }
// 그리드 뷰 디자인 private void InitGridView() { UtilClass.SettingDgv(dgvCustomer); UtilClass.AddNewColum(dgvCustomer, "아이디", "Customer_UserID", true, 100); UtilClass.AddNewColum(dgvCustomer, "비밀번호", "Customer_PWD", false, 100); UtilClass.AddNewColum(dgvCustomer, "이름", "Customer_Name", true, 100); UtilClass.AddNewColum(dgvCustomer, "연락처", "Customer_Phone", true, 100); UtilClass.AddNewColum(dgvCustomer, "이메일", "Customer_Email", true, 100); UtilClass.AddNewColum(dgvCustomer, "생년월일", "Customer_Birth", true, 100); UtilClass.AddNewColum(dgvCustomer, "주소", "Customer_Address", true, 100); dgvCustomer.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells; }
// 그리드 뷰 디자인 private void InitGridView() { UtilClass.SettingDgv(dgvEmployee); UtilClass.AddNewColum(dgvEmployee, "사원번호", "Employees_ID", true, 100); UtilClass.AddNewColum(dgvEmployee, "사원이름", "Employees_Name", true, 100); UtilClass.AddNewColum(dgvEmployee, "소속부서", "CodeTable_CodeName", true, 100); UtilClass.AddNewColum(dgvEmployee, "소속부서ID", "CodeTable_CodeID", false, 100); UtilClass.AddNewColum(dgvEmployee, "입사일", "Employees_Hiredate", true, 100); UtilClass.AddNewColum(dgvEmployee, "퇴사일", "Employees_Resigndate", true, 100); UtilClass.AddNewColum(dgvEmployee, "연락망", "Employees_Phone", true, 100); UtilClass.AddNewColum(dgvEmployee, "생년월일", "Employees_Birth", true, 100); dgvEmployee.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells; }
// 그리드 뷰 디자인 private void InitGridView() { UtilClass.SettingDgv(dgvWarehouse); UtilClass.AddNewColum(dgvWarehouse, "창고코드", "Warehouse_ID", true, 100); UtilClass.AddNewColum(dgvWarehouse, "창고이름", "Warehouse_Name", true, 100); UtilClass.AddNewColum(dgvWarehouse, "우편번호", "Warehouse_AddrNumber", true, 100); UtilClass.AddNewColum(dgvWarehouse, "창고주소", "Warehouse_Address", true, 100); UtilClass.AddNewColum(dgvWarehouse, "전화번호", "Warehouse_Number", true, 100); UtilClass.AddNewColum(dgvWarehouse, "FAX번호", "Warehouse_Fax", true, 100); UtilClass.AddNewColum(dgvWarehouse, "구분ID", "Warehouse_Division", false, 100); UtilClass.AddNewColum(dgvWarehouse, "구분", "Warehouse_Division_Name", true, 100); dgvWarehouse.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells; }
// 그리드 뷰 디자인 private void InitGridView() { UtilClass.SettingDgv(dgvCompany); UtilClass.AddNewColum(dgvCompany, "거래처ID", "Company_ID", true, 100); UtilClass.AddNewColum(dgvCompany, "거래처명", "Company_Name", true, 100); UtilClass.AddNewColum(dgvCompany, "우편번호", "Company_AddrNumber", true, 100); UtilClass.AddNewColum(dgvCompany, "주소", "Company_Address", true, 100); UtilClass.AddNewColum(dgvCompany, "전화번호", "Company_Number", true, 100); UtilClass.AddNewColum(dgvCompany, "FAX번호", "Company_Fax", true, 100); UtilClass.AddNewColum(dgvCompany, "구분ID", "CodeTable_CodeID", false, 100); UtilClass.AddNewColum(dgvCompany, "구분", "CodeTable_CodeName", true, 100); UtilClass.AddNewColum(dgvCompany, "대표명", "Company_Owner", true, 100); dgvCompany.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells; }
private void LoadData() { UtilClass.SettingDgv(dgv_Balju); #region 체크박스 컬럼추가 DataGridViewCheckBoxColumn cbx = new DataGridViewCheckBoxColumn(); cbx.DataPropertyName = "Check"; cbx.Width = 30; dgv_Balju.Columns.Add(cbx); Point headerLocation = dgv_Balju.GetCellDisplayRectangle(0, -1, true).Location; headerCheckbox.Location = new Point(headerLocation.X + 8, headerLocation.Y + 5); headerCheckbox.BackColor = Color.FromArgb(55, 113, 138); headerCheckbox.Size = new Size(16, 16); headerCheckbox.Click += new EventHandler(headerCheckbox_Click); dgv_Balju.Controls.Add(headerCheckbox); dgv_Balju.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.None; #endregion //dgv_Balju.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells; UtilClass.AddNewColum(dgv_Balju, "발주지시번호", "Balju_ID", true, 130); UtilClass.AddNewColum(dgv_Balju, "거래처코드", "Company_ID", true, 110); UtilClass.AddNewColum(dgv_Balju, "거래처명칭", "Company_Name", true, 300); UtilClass.AddNewColum(dgv_Balju, "발주요청일시", "Balju_Date", true, 170); UtilClass.AddNewColum(dgv_Balju, "요청등록사원", "Employees_Name", true, 200); UtilClass.AddNewColum(dgv_Balju, "총액", "Total", true, 170); UtilClass.AddNewColum(dgv_Balju, "삭제여부", "Balju_DeletedYN", false); dgv_Balju.Columns[0].MinimumWidth = 30; dgv_Balju.Columns[4].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dgv_Balju.Columns[4].DefaultCellStyle.Format = "yyyy-MM-dd HH:mm"; dgv_Balju.Columns[6].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; dgv_Balju.Columns[6].DefaultCellStyle.Format = "#,#0원"; try { Balju_AllList = service.GetBaljuList(); } // 발주리스트 갱신 catch (Exception err) { Log.WriteError(err.Message, err); } UtilClass.SettingDgv(dgv_BaljuDetail); UtilClass.AddNewColum(dgv_BaljuDetail, "발주지시번호", "Balju_ID", false, 130); UtilClass.AddNewColum(dgv_BaljuDetail, "품목코드", "Product_ID", true, 100); UtilClass.AddNewColum(dgv_BaljuDetail, "품목명", "Product_Name", true, 500); UtilClass.AddNewColum(dgv_BaljuDetail, "발주요청수량", "BaljuDetail_Qty", true, 130); dgv_BaljuDetail.Columns[3].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; dgv_BaljuDetail.Columns[3].DefaultCellStyle.Format = "#,#0개"; Search_Period.Startdate.BackColor = Color.LightYellow; Search_Period.Enddate.BackColor = Color.LightYellow; }
private void LoadData() { UtilClass.SettingDgv(dgv_Order); #region 체크박스 컬럼 추가 DataGridViewCheckBoxColumn cbx = new DataGridViewCheckBoxColumn(); cbx.Width = 30; dgv_Order.Columns.Add(cbx); Point headerLocation = dgv_Order.GetCellDisplayRectangle(0, -1, true).Location; headerCheckbox.Location = new Point(headerLocation.X + 8, headerLocation.Y + 5); headerCheckbox.BackColor = Color.FromArgb(55, 113, 138); headerCheckbox.Size = new Size(16, 16); headerCheckbox.Click += new EventHandler(headerCheckbox_Click); dgv_Order.Controls.Add(headerCheckbox); dgv_Order.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.None; dgv_Order.Columns[0].MinimumWidth = 30; #endregion UtilClass.AddNewColum(dgv_Order, "주문번호", "Order_ID", true); UtilClass.AddNewColum(dgv_Order, "고객ID", "Customer_UserID", true, 90); UtilClass.AddNewColum(dgv_Order, "고객성명", "Customer_Name", true); UtilClass.AddNewColum(dgv_Order, "주문일시", "Order_Date", true, 170); UtilClass.AddNewColum(dgv_Order, "배송지주소", "Order_Address1", true, 300); UtilClass.AddNewColum(dgv_Order, "배송지상세주소", "Order_Address2", true, 250); UtilClass.AddNewColum(dgv_Order, "주문총액", "TotalPrice", true); dgv_Order.Columns[0].MinimumWidth = 30; dgv_Order.Columns[4].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dgv_Order.Columns[4].DefaultCellStyle.Format = "yyyy-MM-dd HH:mm"; dgv_Order.Columns[7].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; dgv_Order.Columns[7].DefaultCellStyle.Format = "#,#0원"; try { Order_AllList = service.GetOrderList(); } catch (Exception err) { Log.WriteError(err.Message, err); } UtilClass.SettingDgv(dgv_OrderDetail); UtilClass.AddNewColum(dgv_OrderDetail, "주문번호", "Order_ID", false); UtilClass.AddNewColum(dgv_OrderDetail, "제품ID", "Product_ID", true); UtilClass.AddNewColum(dgv_OrderDetail, "제품명", "Product_Name", true, 300); UtilClass.AddNewColum(dgv_OrderDetail, "주문수량", "OrderDetail_Qty", true); dgv_OrderDetail.Columns[3].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; dgv_OrderDetail.Columns[3].DefaultCellStyle.Format = "#,#0개"; Search_Period.Startdate.BackColor = Color.LightYellow; Search_Period.Enddate.BackColor = Color.LightYellow; }
// 그리드 뷰 디자인 private void InitGridView() { UtilClass.SettingDgv(dgvResource); UtilClass.AddNewColum(dgvResource, "제품코드", "Product_ID", true, 100); UtilClass.AddNewColum(dgvResource, "제품이름", "Product_Name", true, 100); UtilClass.AddNewColum(dgvResource, "제품보관창고", "Warehouse_Name", true, 100); UtilClass.AddNewColum(dgvResource, "제품가격", "Product_Price", true, 100, DataGridViewContentAlignment.MiddleRight); UtilClass.AddNewColum(dgvResource, "제품개수", "Product_Qty", true, 100, DataGridViewContentAlignment.MiddleRight); UtilClass.AddNewColum(dgvResource, "안전재고량", "Product_Safety", true, 100, DataGridViewContentAlignment.MiddleRight); UtilClass.AddNewColum(dgvResource, "제품카테고리", "CodeTable_CodeName", true, 100); UtilClass.AddNewColum(dgvResource, "거래처ID", "Company_ID", false, 100); UtilClass.AddNewColum(dgvResource, "카테고리ID", "Product_Category", false, 100); UtilClass.AddNewColum(dgvResource, "창고ID", "Warehouse_ID", false, 100); dgvResource.Columns[3].DefaultCellStyle.Format = "#,##0원"; dgvResource.Columns[4].DefaultCellStyle.Format = "#,##0개"; dgvResource.Columns[5].DefaultCellStyle.Format = "#,##0개"; dgvResource.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells; }
private void LoadData() { UtilClass.SettingDgv(dgv_SalesStatus); UtilClass.AddNewColum(dgv_SalesStatus, "주문번호", "Order_ID", true); UtilClass.AddNewColum(dgv_SalesStatus, "고객ID", "Customer_userID", true, 90); UtilClass.AddNewColum(dgv_SalesStatus, "고객이름", "Customer_Name", true); UtilClass.AddNewColum(dgv_SalesStatus, "주문일시", "Order_Date", true, 170); UtilClass.AddNewColum(dgv_SalesStatus, "출하처리일시", "Shipment_DoneDate", true, 170); UtilClass.AddNewColum(dgv_SalesStatus, "주문총액", "TotalPrice", true, 200); dgv_SalesStatus.Columns[3].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dgv_SalesStatus.Columns[3].DefaultCellStyle.Format = "yyyy-MM-dd HH:mm"; dgv_SalesStatus.Columns[4].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dgv_SalesStatus.Columns[4].DefaultCellStyle.Format = "yyyy-MM-dd HH:mm"; dgv_SalesStatus.Columns[5].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; dgv_SalesStatus.Columns[5].DefaultCellStyle.Format = "#,#0원"; try { Order_AllList = service.GetSalesStatus(); } catch (Exception err) { Log.WriteError(err.Message, err); } Search_OrderIndexPeriod.Startdate.BackColor = Color.LightYellow; Search_OrderIndexPeriod.Enddate.BackColor = Color.LightYellow; }
private void SettingDgvWork() { UtilClass.SettingDgv(dgvWorkList); UtilClass.AddNewColum(dgvWorkList, "작업지시번호", "Work_ID", true, 150); UtilClass.AddNewColum(dgvWorkList, "작업지시일", "Work_StartDate", true, 180); UtilClass.AddNewColum(dgvWorkList, "작업완료일", "Work_EndDate", true, 180); UtilClass.AddNewColum(dgvWorkList, "출하지시번호", "Shipment_ID", true, 150); UtilClass.AddNewColum(dgvWorkList, "납기일", "Shipment_RequiredDate", true, 180); UtilClass.AddNewColum(dgvWorkList, "작업상태", "Work_State", true); UtilClass.AddNewColum(dgvWorkList, "작업자지시자번호", "Employees_ID", false); UtilClass.AddNewColum(dgvWorkList, "작업지시자", "Employees_Name", true); dgvWorkList.Columns[1].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dgvWorkList.Columns[2].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dgvWorkList.Columns[4].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; UtilClass.SettingDgv(dgvProduce); UtilClass.AddNewColum(dgvProduce, "작업지시번호", "ProduceWork_ID", false, 130); UtilClass.AddNewColum(dgvProduce, "생산지시번호", "Produce_ID", true, 130); UtilClass.AddNewColum(dgvProduce, "생산시작일", "Produce_StartDate", true, 180); UtilClass.AddNewColum(dgvProduce, "생산완료일", "Produce_DoneDate", true, 180); UtilClass.AddNewColum(dgvProduce, "공장번호", "Factory_ID", false); UtilClass.AddNewColum(dgvProduce, "공장명", "Factory_Name", true, 130); UtilClass.AddNewColum(dgvProduce, "공정번호", "Line_ID", false); UtilClass.AddNewColum(dgvProduce, "공정명", "Line_Name", true, 130); UtilClass.AddNewColum(dgvProduce, "품목번호", "Product_ID", false); UtilClass.AddNewColum(dgvProduce, "품목명", "Product_Name", true, 150); UtilClass.AddNewColum(dgvProduce, "요청수량", "Produce_QtyRequested", true); UtilClass.AddNewColum(dgvProduce, "투입수량", "Produce_QtyReleased", true); UtilClass.AddNewColum(dgvProduce, "생산상태", "Produce_State", true); dgvProduce.Columns[2].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dgvProduce.Columns[3].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dgvProduce.Columns[10].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; dgvProduce.Columns[11].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; dgvProduce.Columns[10].DefaultCellStyle.Format = "#0개"; dgvProduce.Columns[11].DefaultCellStyle.Format = "#0개"; }
private void SettingDgvDowntime() { UtilClass.SettingDgv(dgvDowntime); UtilClass.AddNewColum(dgvDowntime, "공장번호", "Factory_ID", false); UtilClass.AddNewColum(dgvDowntime, "공장명", "Factory_Name", true, 130); UtilClass.AddNewColum(dgvDowntime, "공정번호", "Line_ID", false); UtilClass.AddNewColum(dgvDowntime, "공정명", "Line_Name", true, 130); UtilClass.AddNewColum(dgvDowntime, "비가동유형번호", "DowntimeType_ID", false); UtilClass.AddNewColum(dgvDowntime, "비가동유형", "DowntimeType_Name", true, 150); UtilClass.AddNewColum(dgvDowntime, "작업자번호", "Employees_ID", false); UtilClass.AddNewColum(dgvDowntime, "작업자", "Employees_Name", true, 130); UtilClass.AddNewColum(dgvDowntime, "시작", "Downtime_StartDate", true, 180); UtilClass.AddNewColum(dgvDowntime, "종료", "Downtime_EndDate", true, 180); UtilClass.AddNewColum(dgvDowntime, "비가동시간", "Downtime_TotalTime", true, 100); dgvDowntime.Columns[8].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dgvDowntime.Columns[9].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; dgvDowntime.Columns[10].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; UtilClass.SettingDgv(dgvDowntimeByType); dgvDowntimeByType.AutoGenerateColumns = true; UtilClass.SettingDgv(dgvDowntimeByLine); dgvDowntimeByLine.AutoGenerateColumns = true; }
private void SettingData() { switch (Mode.ToString()) { case "Employee": SettingForm("사원", 100, 160); break; case "DepOperation": SettingForm("운영기획부사원", 160, 160); break; case "DepMaterial": SettingForm("자재부사원", 160, 160); break; case "DepProd1": SettingForm("생산1부사원", 160, 160); break; case "DepProd2": SettingForm("생산2부사원", 160, 160); break; case "DepSales": SettingForm("영업부사원", 160, 160); break; case "Defective": SettingForm("불량유형", 130, 160); break; case "Product": SettingForm("제품", 100, 300); break; case "Meterial": SettingForm("원자재", 100, 300); break; case "SemiProduct": SettingForm("반제품", 100, 300); break; case "Downtime": SettingForm("비가동유형", 160, 160); break; case "Factory": SettingForm("공장", 100, 160); break; case "Line": SettingForm("공정", 100, 160); break; case "Customer": SettingForm("고객", 100, 160); break; case "Department": SettingForm("부서", 100, 160); break; case "Warehouse": SettingForm("창고", 100, 160); break; case "Company": SettingForm("거래처", 100, 160); break; case "ProductCategory": SettingForm("제품카테고리", 150, 160); break; case "Worker": SettingForm("작업자", 100, 160); break; case "Handle": SettingForm("불량처리유형", 150, 160); break; case "AllProduct": SettingForm("품목", 100, 160); break; case "WorkListWorker": SettingForm("작업지시자", 130, 160); break; case "DowntimeWorker": SettingForm("작업자", 100, 160); break; case "DefectiveWorker": SettingForm("작업자", 100, 160); break; case "InOutWorker": SettingForm("등록사원", 110, 160); break; case "semiInOutWokrer": SettingForm("등록사원", 110, 160); break; case "baljureqWorker": SettingForm("요청등록사원", 150, 160); break; case "baljuacceptWorker": SettingForm("수령사원", 110, 160); break; } txtSearch.PlaceHolderText = string.Concat(this.Text, " ", "키워드 입력"); // Mode값에 따라 그리드뷰 컬럼명 및 검색 결과 UtilClass.SettingDgv(dgvSearch); UtilClass.AddNewColum(dgvSearch, col1, "ID", true, width1); UtilClass.AddNewColum(dgvSearch, col2, "Name", true, width2); try { SearchService service = new SearchService(); list = service.GetInfo(Mode.ToString()); dgvSearch.DataSource = list; } catch (Exception err) { Log.WriteError(err.Message, err); } }