private void AddColumns(DataGridView dgv) { dgv.Columns.Clear(); tool.AddTextBoxColumns(dgv, "ID", dalHistory.HistoryID, DisplayedCells); tool.AddTextBoxColumns(dgv, "Date", dalHistory.HistoryDate, DisplayedCells); tool.AddTextBoxColumns(dgv, "User", dalHistory.HistoryBy, DisplayedCells); tool.AddTextBoxColumns(dgv, "Action", dalHistory.HistoryAction, DisplayedCells); tool.AddTextBoxColumns(dgv, "Detail", dalHistory.HistoryDetail, Fill); }
//create column private void AddColumns(DataGridView dgv) { dgv.Columns.Clear(); tool.AddTextBoxColumns(dgv, "ID", dalUser.UserID, DisplayedCells); tool.AddTextBoxColumns(dgv, "Username", dalUser.Username, Fill); tool.AddTextBoxColumns(dgv, "Permissions", dalUser.Permission, Fill); tool.AddTextBoxColumns(dgv, "Added Date", dalUser.AddedDate, DisplayedCells); tool.AddTextBoxColumns(dgv, "Added By", dalUser.AddedBy, DisplayedCells); tool.AddTextBoxColumns(dgv, "Updated Date", dalUser.UpdatedDate, DisplayedCells); tool.AddTextBoxColumns(dgv, "Updated By", dalUser.UpdatedBy, DisplayedCells); }
private void createDailyDatagridview(DataGridView dgv) { dgv.Columns.Clear(); //add ID column tool.AddTextBoxColumns(dgv, "ID", dalTrfHist.TrfID, DisplayedCells); //add name column tool.AddTextBoxColumns(dgv, "CODE", dalTrfHist.TrfItemCode, Fill); //add code column tool.AddTextBoxColumns(dgv, "NAME", dalTrfHist.TrfItemName, Fill); //add total qty column tool.AddTextBoxColumns(dgv, "TRANSFER", dalTrfHist.TrfDate, DisplayedCells); tool.AddTextBoxColumns(dgv, "FROM", dalTrfHist.TrfFrom, DisplayedCells); tool.AddTextBoxColumns(dgv, "TO", dalTrfHist.TrfTo, DisplayedCells); tool.AddTextBoxColumns(dgv, "QTY", dalTrfHist.TrfQty, DisplayedCells); tool.AddTextBoxColumns(dgv, "UNIT", dalTrfHist.TrfUnit, DisplayedCells); tool.AddTextBoxColumns(dgv, "NOTE", dalTrfHist.TrfNote, DisplayedCells); tool.AddTextBoxColumns(dgv, "ADDED DATE", dalTrfHist.TrfAddedDate, DisplayedCells); tool.AddTextBoxColumns(dgv, "ADDED BY", dalTrfHist.TrfAddedBy, DisplayedCells); dgv.Columns[dalTrfHist.TrfQty].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; tool.listPaintGreyHeader(dgv); }
private void AddPartListColumns(DataGridView dgv) { dgv.Columns.Clear(); tool.AddTextBoxColumns(dgv, indexColName, indexColName, DisplayedCells); tool.AddTextBoxColumns(dgv, "Material Type", dalItem.ItemMaterial, DisplayedCells); tool.AddTextBoxColumns(dgv, "Part Name", dalItem.ItemName, DisplayedCells); tool.AddTextBoxColumns(dgv, "Part Code", dalItem.ItemCode, Fill); tool.AddTextBoxColumns(dgv, "Color", dalItem.ItemColor, DisplayedCellsExceptHeader, minWidth); tool.AddTextBoxColumns(dgv, "Mb Code", dalItem.ItemMBatch, DisplayedCells); tool.AddTextBoxColumns(dgv, "Quo Ton", dalItem.ItemQuoTon, DisplayedCellsExceptHeader, minWidth); tool.AddTextBoxColumns(dgv, "Best Ton", dalItem.ItemBestTon, DisplayedCellsExceptHeader, minWidth); tool.AddTextBoxColumns(dgv, "Pro Ton", dalItem.ItemProTon, DisplayedCellsExceptHeader, minWidth); tool.AddTextBoxColumns(dgv, "Quo CT", dalItem.ItemQuoCT, DisplayedCellsExceptHeader, minWidth); tool.AddTextBoxColumns(dgv, "Pro CT", "ProCT", DisplayedCellsExceptHeader, minWidth); tool.AddTextBoxColumns(dgv, "Item Weight(g)", "ItemWeight(g)", DisplayedCellsExceptHeader, minWidth + offSet + 5); tool.AddTextBoxColumns(dgv, "Quo PW(pcs)", dalItem.ItemQuoPWPcs, DisplayedCellsExceptHeader, minWidth + offSet); tool.AddTextBoxColumns(dgv, "Quo RW(pcs)", dalItem.ItemQuoRWPcs, DisplayedCellsExceptHeader, minWidth + offSet); tool.AddTextBoxColumns(dgv, "Pro PW(pcs)", dalItem.ItemProPWPcs, DisplayedCellsExceptHeader, minWidth + offSet); tool.AddTextBoxColumns(dgv, "Pro RW(pcs)", dalItem.ItemProRWPcs, DisplayedCellsExceptHeader, minWidth + offSet); tool.AddTextBoxColumns(dgv, "Pro PW(shot)", dalItem.ItemProPWShot, DisplayedCellsExceptHeader, minWidth + offSet); tool.AddTextBoxColumns(dgv, "Pro RW(shot)", dalItem.ItemProRWShot, DisplayedCellsExceptHeader, minWidth + offSet); tool.AddTextBoxColumns(dgv, "C", dalItem.ItemCavity, DisplayedCellsExceptHeader, 30); tool.AddTextBoxColumns(dgv, "Pro CL", dalItem.ItemProCooling, DisplayedCellsExceptHeader, minWidth); }