private void LoadTable() { if (Mode != 5) { TimeLBL.Text = DateTime.Now.ToString("dddd, MMMM dd yyyy"); } else { TimeLBL.Text = "for " + Names; } if (Mode == 1) { GReportGRD.DataSource = Reports.GetGuardsList(); GReportGRD.Columns[0].HeaderText = "Name"; GReportGRD.Columns[1].HeaderText = "Status"; GReportGRD.Columns[2].HeaderText = "Contact Number"; GReportGRD.Columns[3].HeaderText = "License Number"; GReportGRD.Columns[4].HeaderText = "SSS"; GReportGRD.Columns[5].HeaderText = "TIN Number"; GReportGRD.Columns[6].HeaderText = "PHIC"; #region Format Table GReportGRD.Columns[0].Width = 260; GReportGRD.Columns[1].Width = 70; GReportGRD.Columns[2].Width = 140; GReportGRD.Sort(GReportGRD.Columns[1], ListSortDirection.Ascending); #endregion } else if (Mode == 2) { GReportGRD.DataSource = Reports.GetClientsList(); GReportGRD.Columns[0].HeaderText = "Client Name"; GReportGRD.Columns[1].HeaderText = "Status"; GReportGRD.Columns[2].HeaderText = "Address"; GReportGRD.Columns[3].HeaderText = "Manager"; GReportGRD.Columns[4].HeaderText = "Contact Person"; GReportGRD.Columns[5].HeaderText = "Contact Number"; #region Format Table GReportGRD.Columns[0].Width = 200; GReportGRD.Columns[1].Width = 70; GReportGRD.Columns[2].Width = 250; GReportGRD.Columns[3].Width = 170; GReportGRD.Columns[4].Width = 170; GReportGRD.Columns[5].Width = 110; GReportGRD.Sort(GReportGRD.Columns[1], ListSortDirection.Ascending); #endregion } }
public void RefreshClientsSummaryList() { ClientsSummaryTBL.DataSource = Reports.GetClientsList(); ClientsSummaryTBL.Columns["Name"].HeaderText = "NAME"; ClientsSummaryTBL.Columns["Status"].HeaderText = "STATUS"; ClientsSummaryTBL.Columns["Address"].HeaderText = "ADDRESS"; ClientsSummaryTBL.Columns["Manager"].HeaderText = "MANAGER"; ClientsSummaryTBL.Columns["Contact Person"].HeaderText = "CONTACT PERSON"; ClientsSummaryTBL.Columns["Contact Number"].HeaderText = "CONTACT NUMBER"; #region Format Table ClientsSummaryTBL.Columns["Name"].Width = 200; ClientsSummaryTBL.Columns["Status"].Width = 70; ClientsSummaryTBL.Columns["Address"].Width = 250; ClientsSummaryTBL.Columns["Manager"].Width = 170; ClientsSummaryTBL.Columns["Contact Person"].Width = 170; ClientsSummaryTBL.Columns["Contact Number"].Width = 110; ClientsSummaryTBL.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; ClientsSummaryTBL.Sort(ClientsSummaryTBL.Columns[1], ListSortDirection.Ascending); #endregion }