Beispiel #1
0
        private void InitializeDataGrid()
        {
            #region SetDataGrid

            Rgv_ReportAllLeaveCount.AutoGenerateColumns = false;
            Rgv_ReportAllLeaveCount.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            Rgv_ReportAllLeaveCount.Dock = DockStyle.Fill;
            Rgv_ReportAllLeaveCount.ReadOnly = true;

            GridViewTextBoxColumn PWEMPLOYEE = new GridViewTextBoxColumn();
            PWEMPLOYEE.Name = "PWEMPLOYEE";
            PWEMPLOYEE.FieldName = "PWEMPLOYEE";
            PWEMPLOYEE.HeaderText = "รหัสพนักงาน";
            PWEMPLOYEE.IsVisible = true;
            PWEMPLOYEE.ReadOnly = true;
            PWEMPLOYEE.BestFit();
            Rgv_ReportAllLeaveCount.Columns.Add(PWEMPLOYEE);

            GridViewTextBoxColumn PWNAME = new GridViewTextBoxColumn();
            PWNAME.Name = "PWNAME";
            PWNAME.FieldName = "PWNAME";
            PWNAME.HeaderText = "ชื่อพนักงาน";
            PWNAME.IsVisible = true;
            PWNAME.ReadOnly = true;
            PWNAME.BestFit();
            Rgv_ReportAllLeaveCount.Columns.Add(PWNAME);


            GridViewTextBoxColumn LEAVETYPE = new GridViewTextBoxColumn();
            LEAVETYPE.Name = "LEAVETYPE";
            LEAVETYPE.FieldName = "LEAVETYPE";
            LEAVETYPE.HeaderText = "ประเภทการลา";
            LEAVETYPE.IsVisible = true;
            LEAVETYPE.ReadOnly = true;
            LEAVETYPE.BestFit();
            Rgv_ReportAllLeaveCount.Columns.Add(LEAVETYPE);


            GridViewTextBoxColumn LEAVECOUNT = new GridViewTextBoxColumn();
            LEAVECOUNT.Name = "LEAVECOUNT";
            LEAVECOUNT.FieldName = "LEAVECOUNT";
            LEAVECOUNT.HeaderText = "จำนวนวัน";
            LEAVECOUNT.IsVisible = true;
            LEAVECOUNT.ReadOnly = true;
            LEAVECOUNT.BestFit();
            Rgv_ReportAllLeaveCount.Columns.Add(LEAVECOUNT);

            GridViewCommandColumn DetaiButton = new GridViewCommandColumn();
            DetaiButton.Name = "DetaiButton";
            DetaiButton.FieldName = "DetaiButton";
            DetaiButton.HeaderText = "รายละเอียด";
            Rgv_ReportAllLeaveCount.Columns.Add(DetaiButton);

            #endregion
        }
Beispiel #2
0
 public static void initializeRadgridCell(ref RadGridView _radgrid, string _tableName)
 {
     Telerik.WinControls.UI.GridViewTextBoxColumn cell;
     Telerik.WinControls.UI.GridViewCheckBoxColumn cellCb;
     var schema = getTableSchema(_tableName);
     foreach (DataRow row in schema.Rows)
     {
         if (!IsCheckboxCellType(row["COLUMN_NAME"].ToString().ToUpper()))
         {
             cellCb = new GridViewCheckBoxColumn();
             cellCb.Name = row["COLUMN_NAME"].ToString();
             cellCb.FieldName = row["COLUMN_NAME"].ToString();
             cellCb.HeaderText = row["COLUMN_DESCRIPTION"].ToString();
             cellCb.IsVisible = true;
             cellCb.ReadOnly = true;
             cellCb.DataType = typeOf(row["DATA_TYPE"].ToString());
             cellCb.ThreeState = false;
             cellCb.BestFit();
             _radgrid.MasterTemplate.Columns.Add(cellCb);
         }
         else
         {
             cell = new GridViewTextBoxColumn();
             cell.Name = row["COLUMN_NAME"].ToString();
             cell.FieldName = row["COLUMN_NAME"].ToString();
             cell.HeaderText = row["COLUMN_DESCRIPTION"].ToString();
             cell.IsVisible = true;
             cell.ReadOnly = true;
             cell.DataType = typeOf(row["DATA_TYPE"].ToString());//getType(row["DATA_TYPE"].ToString());
             //cell.FormatString = (cell.DataType == typeof(decimal)) ? "{0:N2}" : (cell.DataType == typeof(DateTime) && row["COLUMN_NAME"].ToString() == "") ? "{0:dd/MM/yyyy}" : "{0}";
             cell.FormatString = getCellFormatString(cell.DataType, cell.FieldName);
             cell.BestFit();
             _radgrid.MasterTemplate.Columns.Add(cell);
         }
     }
     //return _radgrid;
 }
        private void InitializeDataGrid()
        {
            rvg_LeaveDetail.AutoGenerateColumns = false;
            rvg_LeaveDetail.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            rvg_LeaveDetail.Dock = DockStyle.Fill;
            rvg_LeaveDetail.ReadOnly = true;

            GridViewTextBoxColumn PWDATEADJ = new GridViewTextBoxColumn();
            PWDATEADJ.Name = "PWDATEADJ";
            PWDATEADJ.FieldName = "PWDATEADJ";
            PWDATEADJ.HeaderText = "วันที่ลา";
            PWDATEADJ.IsVisible = true;
            PWDATEADJ.ReadOnly = true;
            PWDATEADJ.BestFit();
            rvg_LeaveDetail.Columns.Add(PWDATEADJ);

            GridViewTextBoxColumn LEAVETYPE = new GridViewTextBoxColumn();
            LEAVETYPE.Name = "LEAVETYPE";
            LEAVETYPE.FieldName = "LEAVETYPE";
            LEAVETYPE.HeaderText = "ประเภทการลา";
            LEAVETYPE.IsVisible = true;
            LEAVETYPE.ReadOnly = true;
            LEAVETYPE.BestFit();
            rvg_LeaveDetail.Columns.Add(LEAVETYPE);


            GridViewTextBoxColumn PWUPDTYPE = new GridViewTextBoxColumn();
            PWUPDTYPE.Name = "PWUPDTYPE";
            PWUPDTYPE.FieldName = "PWUPDTYPE";
            PWUPDTYPE.HeaderText = "จำนวนวัน";
            PWUPDTYPE.IsVisible = true;
            PWUPDTYPE.ReadOnly = true;
            PWUPDTYPE.BestFit();
            rvg_LeaveDetail.Columns.Add(PWUPDTYPE);

        }
Beispiel #4
0
        private void InitializeGridView()
        {
            rgv_Payment.Dock = DockStyle.Fill;
            rgv_Payment.AutoGenerateColumns = true;
            rgv_Payment.EnableFiltering = false;
            rgv_Payment.AllowAddNewRow = false;
            rgv_Payment.MasterTemplate.AutoGenerateColumns = false;
            rgv_Payment.ShowGroupedColumns = true;
            rgv_Payment.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            rgv_Payment.EnableHotTracking = true;
            rgv_Payment.AutoSizeRows = true;

            GridViewTextBoxColumn EMPLID = new GridViewTextBoxColumn();
            EMPLID.Name = "EMPLID";
            EMPLID.FieldName = "EMPLID";
            EMPLID.HeaderText = "พนักงาน";
            EMPLID.IsVisible = true;
            EMPLID.ReadOnly = true;
            EMPLID.BestFit();
            rgv_Payment.Columns.Add(EMPLID);

            GridViewTextBoxColumn PAYID = new GridViewTextBoxColumn();
            PAYID.Name = "PAYID";
            PAYID.FieldName = "PAYID";
            PAYID.HeaderText = "ID";
            PAYID.IsVisible = true;
            PAYID.ReadOnly = true;
            PAYID.BestFit();
            rgv_Payment.Columns.Add(PAYID);

            GridViewTextBoxColumn PAYNAME = new GridViewTextBoxColumn();
            PAYNAME.Name = "PAYNAME";
            PAYNAME.FieldName = "PAYNAME";
            PAYNAME.HeaderText = "รายการ";
            PAYNAME.IsVisible = true;
            PAYNAME.ReadOnly = true;
            PAYNAME.BestFit();
            rgv_Payment.Columns.Add(PAYNAME);


            GridViewTextBoxColumn JOBS = new GridViewTextBoxColumn();
            JOBS.Name = "JOBS";
            JOBS.FieldName = "JOBS";
            JOBS.HeaderText = "จัดหางาน";
            JOBS.IsVisible = true;
            JOBS.ReadOnly = true;
            JOBS.BestFit();
            rgv_Payment.Columns.Add(JOBS);

            GridViewTextBoxColumn BROKERS = new GridViewTextBoxColumn();
            BROKERS.Name = "BROKERS";
            BROKERS.FieldName = "BROKERS";
            BROKERS.HeaderText = "โบรกเกอร์";
            BROKERS.IsVisible = true;
            BROKERS.ReadOnly = true;
            BROKERS.BestFit();
            rgv_Payment.Columns.Add(BROKERS);

            GridViewTextBoxColumn CENTER = new GridViewTextBoxColumn();
            CENTER.Name = "CENTER";
            CENTER.FieldName = "CENTER";
            CENTER.HeaderText = "ศูนย์พูนผล";
            CENTER.IsVisible = true;
            CENTER.ReadOnly = true;
            CENTER.BestFit();
            rgv_Payment.Columns.Add(CENTER);


            GridViewTextBoxColumn MIMIGRATION = new GridViewTextBoxColumn();
            MIMIGRATION.Name = "MIMIGRATION";
            MIMIGRATION.FieldName = "MIMIGRATION";
            MIMIGRATION.HeaderText = "ตม.";
            MIMIGRATION.IsVisible = true;
            MIMIGRATION.ReadOnly = true;
            MIMIGRATION.BestFit();
            rgv_Payment.Columns.Add(MIMIGRATION);


            GridViewTextBoxColumn HOSPITAL = new GridViewTextBoxColumn();
            HOSPITAL.Name = "HOSPITAL";
            HOSPITAL.FieldName = "HOSPITAL";
            HOSPITAL.HeaderText = "รพ.";
            HOSPITAL.IsVisible = true;
            HOSPITAL.ReadOnly = true;
            HOSPITAL.BestFit();
            rgv_Payment.Columns.Add(HOSPITAL);

            GridViewTextBoxColumn DISTRICT = new GridViewTextBoxColumn();
            DISTRICT.Name = "DISTRICT";
            DISTRICT.FieldName = "DISTRICT";
            DISTRICT.HeaderText = "อำเภอ.";
            DISTRICT.IsVisible = true;
            DISTRICT.ReadOnly = true;
            DISTRICT.BestFit();
            rgv_Payment.Columns.Add(DISTRICT);

            GridViewTextBoxColumn SUMPAY = new GridViewTextBoxColumn();
            SUMPAY.Name = "SUMPAY";
            SUMPAY.FieldName = "SUMPAY";
            SUMPAY.HeaderText = "รวม";
            SUMPAY.IsVisible = true;
            SUMPAY.ReadOnly = true;
            SUMPAY.BestFit();
            rgv_Payment.Columns.Add(SUMPAY);

            GridViewTextBoxColumn SUPC = new GridViewTextBoxColumn();
            SUPC.Name = "SUPC";
            SUPC.FieldName = "SUPC";
            SUPC.HeaderText = "เข้าบริษัท";
            SUPC.IsVisible = true;
            SUPC.ReadOnly = true;
            SUPC.BestFit();
            rgv_Payment.Columns.Add(SUPC);

            GridViewTextBoxColumn TOTAL = new GridViewTextBoxColumn();
            TOTAL.Name = "TOTAL";
            TOTAL.FieldName = "TOTAL";
            TOTAL.HeaderText = "ยอดเรียกเก็บ";
            TOTAL.IsVisible = true;
            TOTAL.ReadOnly = true;
            TOTAL.BestFit();
            rgv_Payment.Columns.Add(TOTAL);

            GridViewCommandColumn BTDELETE = new GridViewCommandColumn();
            BTDELETE.Name = "BTDELETE";
            BTDELETE.HeaderText = "ลบ";
            BTDELETE.Width = 100;
            rgv_Payment.Columns.Add(BTDELETE);

            GridViewSummaryRowItem summary = new GridViewSummaryRowItem();
            summary.Add(new GridViewSummaryItem("JOBS", "{0:N2}", GridAggregateFunction.Sum));
            summary.Add(new GridViewSummaryItem("BROKERS", "{0:N2}", GridAggregateFunction.Sum));
            summary.Add(new GridViewSummaryItem("CENTER", "{0:N2}", GridAggregateFunction.Sum));
            summary.Add(new GridViewSummaryItem("MIMIGRATION", "{0:N2}", GridAggregateFunction.Sum));
            summary.Add(new GridViewSummaryItem("HOSPITAL", "{0:N2}", GridAggregateFunction.Sum));
            summary.Add(new GridViewSummaryItem("DISTRICT", "{0:N2}", GridAggregateFunction.Sum));
            summary.Add(new GridViewSummaryItem("SUMPAY", "{0:N2}", GridAggregateFunction.Sum));
            summary.Add(new GridViewSummaryItem("SUPC", "{0:N2}", GridAggregateFunction.Sum));
            summary.Add(new GridViewSummaryItem("TOTAL", "{0:N2}", GridAggregateFunction.Sum));
            this.rgv_Payment.MasterTemplate.SummaryRowsBottom.Add(summary);
        }
Beispiel #5
0
        void InitializeGridView()
        {
            this.rgv_GetData.Dock = DockStyle.Fill;
            this.rgv_GetData.ReadOnly = true;
            this.rgv_GetData.AutoGenerateColumns = true;
            this.rgv_GetData.EnableFiltering = false;
            this.rgv_GetData.AllowAddNewRow = false;
            this.rgv_GetData.MasterTemplate.AutoGenerateColumns = false;
            this.rgv_GetData.ShowGroupedColumns = true;
            this.rgv_GetData.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            this.rgv_GetData.EnableHotTracking = true;
            this.rgv_GetData.AutoSizeRows = true;

            GridViewTextBoxColumn DOCID = new GridViewTextBoxColumn();
            DOCID.Name = "DOCID";
            DOCID.FieldName = "DOCID";
            DOCID.HeaderText = "เลขที่เอกสาร";
            DOCID.IsVisible = true;
            DOCID.ReadOnly = true;
            DOCID.BestFit();
            rgv_GetData.Columns.Add(DOCID);

            GridViewTextBoxColumn EMPLID = new GridViewTextBoxColumn();
            EMPLID.Name = "EMPLID";
            EMPLID.FieldName = "EMPLID";
            EMPLID.HeaderText = "รหัส";
            EMPLID.IsVisible = true;
            EMPLID.ReadOnly = true;
            EMPLID.BestFit();
            rgv_GetData.Columns.Add(EMPLID);

            GridViewTextBoxColumn EMPLNAME = new GridViewTextBoxColumn();
            EMPLNAME.Name = "EMPLNAME";
            EMPLNAME.FieldName = "EMPLNAME";
            EMPLNAME.HeaderText = "ชื่อ";
            EMPLNAME.IsVisible = true;
            EMPLNAME.ReadOnly = true;
            EMPLNAME.BestFit();
            rgv_GetData.Columns.Add(EMPLNAME);

            GridViewTextBoxColumn SECTIONNAME = new GridViewTextBoxColumn();
            SECTIONNAME.Name = "SECTIONNAME";
            SECTIONNAME.FieldName = "SECTIONNAME";
            SECTIONNAME.HeaderText = "แผนก";
            SECTIONNAME.IsVisible = true;
            SECTIONNAME.ReadOnly = true;
            SECTIONNAME.BestFit();
            rgv_GetData.Columns.Add(SECTIONNAME);

            GridViewTextBoxColumn CREATEDNAME = new GridViewTextBoxColumn();
            CREATEDNAME.Name = "CREATEDNAME";
            CREATEDNAME.FieldName = "CREATEDNAME";
            CREATEDNAME.HeaderText = "ผู้บันทึก";
            CREATEDNAME.IsVisible = true;
            CREATEDNAME.ReadOnly = true;
            CREATEDNAME.BestFit();
            rgv_GetData.Columns.Add(CREATEDNAME);



            GridViewTextBoxColumn TRANSDATE = new GridViewTextBoxColumn();
            TRANSDATE.Name = "TRANSDATE";
            TRANSDATE.FieldName = "TRANSDATE";
            TRANSDATE.HeaderText = "วันที่บันทึก";
            TRANSDATE.IsVisible = true;
            TRANSDATE.ReadOnly = true;
            TRANSDATE.BestFit();
            rgv_GetData.Columns.Add(TRANSDATE);

            //GridViewTextBoxColumn BROKERS = new GridViewTextBoxColumn();
            //BROKERS.Name = "BROKERS";
            //BROKERS.FieldName = "BROKERS";
            //BROKERS.HeaderText = "โบรกเกอร์";
            //BROKERS.IsVisible = true;
            //BROKERS.ReadOnly = true;
            //BROKERS.BestFit();
            //rgv_GetData.Columns.Add(BROKERS);

            //GridViewTextBoxColumn CENTER = new GridViewTextBoxColumn();
            //CENTER.Name = "CENTER";
            //CENTER.FieldName = "CENTER";
            //CENTER.HeaderText = "ศูนย์พูลผล";
            //CENTER.IsVisible = true;
            //CENTER.ReadOnly = true;
            //CENTER.BestFit();
            //rgv_GetData.Columns.Add(CENTER);

            //GridViewTextBoxColumn MIMIGRATION = new GridViewTextBoxColumn();
            //MIMIGRATION.Name = "MIMIGRATION";
            //MIMIGRATION.FieldName = "MIMIGRATION";
            //BROKERS.HeaderText = "ตม.";
            //MIMIGRATION.IsVisible = true;
            //MIMIGRATION.ReadOnly = true;
            //MIMIGRATION.BestFit();
            //rgv_GetData.Columns.Add(MIMIGRATION);

            //GridViewTextBoxColumn HOSPITAL = new GridViewTextBoxColumn();
            //HOSPITAL.Name = "HOSPITAL";
            //HOSPITAL.FieldName = "HOSPITAL";
            //HOSPITAL.HeaderText = "รพ.";
            //HOSPITAL.IsVisible = true;
            //HOSPITAL.ReadOnly = true;
            //HOSPITAL.BestFit();
            //rgv_GetData.Columns.Add(HOSPITAL);

            //GridViewTextBoxColumn DISTRICT = new GridViewTextBoxColumn();
            //DISTRICT.Name = "DISTRICT";
            //DISTRICT.FieldName = "DISTRICT";
            //DISTRICT.HeaderText = "อำเภอ";
            //DISTRICT.IsVisible = true;
            //DISTRICT.ReadOnly = true;
            //DISTRICT.BestFit();
            //rgv_GetData.Columns.Add(DISTRICT);

            //GridViewTextBoxColumn SUMPAY = new GridViewTextBoxColumn();
            //SUMPAY.Name = "SUMPAY";
            //SUMPAY.FieldName = "SUMPAY";
            //SUMPAY.HeaderText = "รวม";
            //SUMPAY.IsVisible = true;
            //SUMPAY.ReadOnly = true;
            //SUMPAY.BestFit();
            //rgv_GetData.Columns.Add(SUMPAY);

            //GridViewTextBoxColumn SUPC = new GridViewTextBoxColumn();
            //SUPC.Name = "SUPC";
            //SUPC.FieldName = "SUPC";
            //SUPC.HeaderText = "SUPC";
            //SUPC.IsVisible = true;
            //SUPC.ReadOnly = true;
            //SUPC.BestFit();
            //rgv_GetData.Columns.Add(SUPC);

            //GridViewTextBoxColumn TOTAL = new GridViewTextBoxColumn();
            //TOTAL.Name = "TOTAL";
            //TOTAL.FieldName = "TOTAL";
            //TOTAL.HeaderText = "ยอดเรียกเก็บ";
            //TOTAL.IsVisible = true;
            //TOTAL.ReadOnly = true;
            //TOTAL.BestFit();
            //rgv_GetData.Columns.Add(TOTAL);

            GridViewCommandColumn DeleteButton = new GridViewCommandColumn();
            DeleteButton.Name = "DeleteButton";
            DeleteButton.FieldName = "DeleteButton";
            DeleteButton.HeaderText = "ยกเลิก";
            rgv_GetData.Columns.Add(DeleteButton);


            //GridViewSummaryRowItem summary = new GridViewSummaryRowItem();
            //summary.Add(new GridViewSummaryItem("JOBS", "{0:N2}", GridAggregateFunction.Sum));
            //summary.Add(new GridViewSummaryItem("BROKERS", "{0:N2}", GridAggregateFunction.Sum));
            //summary.Add(new GridViewSummaryItem("CENTER", "{0:N2}", GridAggregateFunction.Sum));
            //summary.Add(new GridViewSummaryItem("MIMIGRATION", "{0:N2}", GridAggregateFunction.Sum));
            //summary.Add(new GridViewSummaryItem("HOSPITAL", "{0:N2}", GridAggregateFunction.Sum));
            //summary.Add(new GridViewSummaryItem("DISTRICT", "{0:N2}", GridAggregateFunction.Sum));
            //summary.Add(new GridViewSummaryItem("SUMPAY", "{0:N2}", GridAggregateFunction.Sum));
            //summary.Add(new GridViewSummaryItem("SUPC", "{0:N2}", GridAggregateFunction.Sum));
            //summary.Add(new GridViewSummaryItem("TOTAL", "{0:N2}", GridAggregateFunction.Sum));
            //this.rgv_GetData.MasterTemplate.SummaryRowsBottom.Add(summary);
        }
Beispiel #6
0
        void GridViewReport()
        {

            this.rgv_StatusDoc.Dock = DockStyle.Fill;
            this.rgv_StatusDoc.ReadOnly = true;
            this.rgv_StatusDoc.AutoGenerateColumns = true;
            this.rgv_StatusDoc.EnableFiltering = false;
            this.rgv_StatusDoc.AllowAddNewRow = false;
            this.rgv_StatusDoc.MasterTemplate.AutoGenerateColumns = false;
            this.rgv_StatusDoc.ShowGroupedColumns = true;
            this.rgv_StatusDoc.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            this.rgv_StatusDoc.EnableHotTracking = true;
            this.rgv_StatusDoc.AutoSizeRows = true;

            GridViewTextBoxColumn DOCID = new GridViewTextBoxColumn();
            DOCID.Name = "DOCID";
            DOCID.FieldName = "DOCID";
            DOCID.HeaderText = "เลขที่เอกสาร";
            DOCID.IsVisible = true;
            DOCID.ReadOnly = true;
            DOCID.BestFit();
            rgv_StatusDoc.Columns.Add(DOCID);

            GridViewTextBoxColumn EMPLID = new GridViewTextBoxColumn();
            EMPLID.Name = "EMPLID";
            EMPLID.FieldName = "EMPLID";
            EMPLID.HeaderText = "รหัส";
            EMPLID.IsVisible = true;
            EMPLID.ReadOnly = true;
            EMPLID.BestFit();
            rgv_StatusDoc.Columns.Add(EMPLID);

            GridViewTextBoxColumn EMPLNAME = new GridViewTextBoxColumn();
            EMPLNAME.Name = "EMPLNAME";
            EMPLNAME.FieldName = "EMPLNAME";
            EMPLNAME.HeaderText = "ชื่อ";
            EMPLNAME.IsVisible = true;
            EMPLNAME.ReadOnly = true;
            EMPLNAME.BestFit();
            rgv_StatusDoc.Columns.Add(EMPLNAME);

            GridViewTextBoxColumn SECTIONNAME = new GridViewTextBoxColumn();
            SECTIONNAME.Name = "SECTIONNAME";
            SECTIONNAME.FieldName = "SECTIONNAME";
            SECTIONNAME.HeaderText = "แผนก";
            SECTIONNAME.IsVisible = true;
            SECTIONNAME.ReadOnly = true;
            SECTIONNAME.BestFit();
            rgv_StatusDoc.Columns.Add(SECTIONNAME);

            GridViewTextBoxColumn DEPTNAME = new GridViewTextBoxColumn();
            DEPTNAME.Name = "DEPTNAME";
            DEPTNAME.FieldName = "DEPTNAME";
            DEPTNAME.HeaderText = "ตำแหน่ง";
            DEPTNAME.IsVisible = true;
            DEPTNAME.ReadOnly = true;
            DEPTNAME.BestFit();
            rgv_StatusDoc.Columns.Add(DEPTNAME);



            GridViewTextBoxColumn FROMHOLIDAY = new GridViewTextBoxColumn();
            FROMHOLIDAY.Name = "FROMHOLIDAY";
            FROMHOLIDAY.FieldName = "FROMHOLIDAY";
            FROMHOLIDAY.HeaderText = "วันที่มาทำ";
            FROMHOLIDAY.IsVisible = true;
            FROMHOLIDAY.ReadOnly = true;
            FROMHOLIDAY.BestFit();
            rgv_StatusDoc.Columns.Add(FROMHOLIDAY);

            GridViewTextBoxColumn TOSHIFTID = new GridViewTextBoxColumn();
            TOSHIFTID.Name = "TOSHIFTID";
            TOSHIFTID.FieldName = "TOSHIFTID";
            TOSHIFTID.HeaderText = "กะที่มาทำ";
            TOSHIFTID.IsVisible = true;
            TOSHIFTID.ReadOnly = true;
            TOSHIFTID.BestFit();
            rgv_StatusDoc.Columns.Add(TOSHIFTID);


            GridViewTextBoxColumn TOSHIFTDESC = new GridViewTextBoxColumn();
            TOSHIFTDESC.Name = "TOSHIFTDESC";
            TOSHIFTDESC.FieldName = "TOSHIFTDESC";
            TOSHIFTDESC.HeaderText = "คำอธิบาย";
            TOSHIFTDESC.IsVisible = true;
            TOSHIFTDESC.ReadOnly = true;
            TOSHIFTDESC.BestFit();
            rgv_StatusDoc.Columns.Add(TOSHIFTDESC);

            GridViewTextBoxColumn TOHOLIDAY = new GridViewTextBoxColumn();
            TOHOLIDAY.Name = "TOHOLIDAY";
            TOHOLIDAY.FieldName = "TOHOLIDAY";
            TOHOLIDAY.HeaderText = "วันที่หยุด";
            TOHOLIDAY.IsVisible = true;
            TOHOLIDAY.ReadOnly = true;
            TOHOLIDAY.BestFit();
            rgv_StatusDoc.Columns.Add(TOHOLIDAY);

            GridViewTextBoxColumn REASON = new GridViewTextBoxColumn();
            REASON.Name = "REASON";
            REASON.FieldName = "REASON";
            REASON.HeaderText = "เหตุผล";
            REASON.IsVisible = true;
            REASON.ReadOnly = true;
            REASON.BestFit();
            rgv_StatusDoc.Columns.Add(REASON);

            GridViewTextBoxColumn HEADAPPROVED = new GridViewTextBoxColumn();
            HEADAPPROVED.Name = "HEADAPPROVED";
            HEADAPPROVED.FieldName = "HEADAPPROVED";
            HEADAPPROVED.HeaderText = "หน./ผช.";
            HEADAPPROVED.IsVisible = true;
            HEADAPPROVED.ReadOnly = true;
            HEADAPPROVED.BestFit();
            rgv_StatusDoc.Columns.Add(HEADAPPROVED);

            GridViewTextBoxColumn HEADAPPROVEDBYNAME = new GridViewTextBoxColumn();
            HEADAPPROVEDBYNAME.Name = "HEADAPPROVEDBYNAME";
            HEADAPPROVEDBYNAME.FieldName = "HEADAPPROVEDBYNAME";
            HEADAPPROVEDBYNAME.HeaderText = "ผู้อนุมัติ";
            HEADAPPROVEDBYNAME.IsVisible = true;
            HEADAPPROVEDBYNAME.ReadOnly = true;
            HEADAPPROVEDBYNAME.BestFit();
            rgv_StatusDoc.Columns.Add(HEADAPPROVEDBYNAME);

            GridViewTextBoxColumn HEADAPPORVEREMARK = new GridViewTextBoxColumn();
            HEADAPPORVEREMARK.Name = "HEADAPPORVEREMARK";
            HEADAPPORVEREMARK.FieldName = "HEADAPPORVEREMARK";
            HEADAPPORVEREMARK.HeaderText = "หมายเหตุ";
            HEADAPPORVEREMARK.IsVisible = true;
            HEADAPPORVEREMARK.ReadOnly = true;
            HEADAPPORVEREMARK.BestFit();
            rgv_StatusDoc.Columns.Add(HEADAPPORVEREMARK);
            

            GridViewTextBoxColumn HEADAPPROVEDDATE = new GridViewTextBoxColumn();
            HEADAPPROVEDDATE.Name = "HEADAPPROVEDDATE";
            HEADAPPROVEDDATE.FieldName = "HEADAPPROVEDDATE";
            HEADAPPROVEDDATE.HeaderText = "วันที่อนุมัติ";
            HEADAPPROVEDDATE.IsVisible = true;
            HEADAPPROVEDDATE.ReadOnly = true;
            HEADAPPROVEDDATE.BestFit();
            rgv_StatusDoc.Columns.Add(HEADAPPROVEDDATE);


            GridViewTextBoxColumn HRAPPROVED = new GridViewTextBoxColumn();
            HRAPPROVED.Name = "HRAPPROVED";
            HRAPPROVED.FieldName = "HRAPPROVED";
            HRAPPROVED.HeaderText = "บุคคล";
            HRAPPROVED.IsVisible = true;
            HRAPPROVED.ReadOnly = true;
            HRAPPROVED.BestFit();
            rgv_StatusDoc.Columns.Add(HRAPPROVED);


            GridViewTextBoxColumn HRAPPROVEDBYNAME = new GridViewTextBoxColumn();
            HRAPPROVEDBYNAME.Name = "HRAPPROVEDBYNAME";
            HRAPPROVEDBYNAME.FieldName = "HRAPPROVEDBYNAME";
            HRAPPROVEDBYNAME.HeaderText = "ผู้อนุมัติ";
            HRAPPROVEDBYNAME.IsVisible = true;
            HRAPPROVEDBYNAME.ReadOnly = true;
            HRAPPROVEDBYNAME.BestFit();
            rgv_StatusDoc.Columns.Add(HRAPPROVEDBYNAME);

            GridViewTextBoxColumn HRAPPORVEREMARK = new GridViewTextBoxColumn();
            HRAPPORVEREMARK.Name = "HRAPPORVEREMARK";
            HRAPPORVEREMARK.FieldName = "HRAPPORVEREMARK";
            HRAPPORVEREMARK.HeaderText = "หมายเหตุ";
            HRAPPORVEREMARK.IsVisible = true;
            HRAPPORVEREMARK.ReadOnly = true;
            HRAPPORVEREMARK.BestFit();
            rgv_StatusDoc.Columns.Add(HRAPPORVEREMARK);

            GridViewTextBoxColumn HRAPPROVEDDATE = new GridViewTextBoxColumn();
            HRAPPROVEDDATE.Name = "HRAPPROVEDDATE";
            HRAPPROVEDDATE.FieldName = "HRAPPROVEDDATE";
            HRAPPROVEDDATE.HeaderText = "วันที่อนุมัติ";
            HRAPPROVEDDATE.IsVisible = true;
            HRAPPROVEDDATE.ReadOnly = true;
            HRAPPROVEDDATE.BestFit();
            rgv_StatusDoc.Columns.Add(HRAPPROVEDDATE);
            
        }
        private void InitializeDataGridView()
        {
            #region SetDataGrid

            this.rgv_EmpData.Dock = DockStyle.Fill;
            this.rgv_EmpData.ReadOnly = true;
            this.rgv_EmpData.AutoGenerateColumns = true;
            this.rgv_EmpData.EnableFiltering = false;
            this.rgv_EmpData.AllowAddNewRow = false;
            this.rgv_EmpData.MasterTemplate.AutoGenerateColumns = false;
            this.rgv_EmpData.ShowGroupedColumns = true;
            this.rgv_EmpData.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            this.rgv_EmpData.EnableHotTracking = true;
            this.rgv_EmpData.AutoSizeRows = true;

            GridViewTextBoxColumn TYPDESC = new GridViewTextBoxColumn();
            TYPDESC.Name = "TYPDESC";
            TYPDESC.FieldName = "TYPDESC";
            TYPDESC.HeaderText = "ประเภทเอกสาร";
            TYPDESC.IsVisible = true;
            TYPDESC.ReadOnly = true;
            TYPDESC.BestFit();
            rgv_EmpData.Columns.Add(TYPDESC);

            GridViewTextBoxColumn DSDOCNO = new GridViewTextBoxColumn();
            DSDOCNO.Name = "DSDOCNO";
            DSDOCNO.FieldName = "DSDOCNO";
            DSDOCNO.HeaderText = "เลขที่เอกสาร";
            DSDOCNO.IsVisible = true;
            DSDOCNO.ReadOnly = true;
            DSDOCNO.BestFit();
            rgv_EmpData.Columns.Add(DSDOCNO);

            GridViewTextBoxColumn SHIFTDATE = new GridViewTextBoxColumn();
            SHIFTDATE.Name = "SHIFTDATE";
            SHIFTDATE.FieldName = "SHIFTDATE";
            SHIFTDATE.HeaderText = "วันที่เปลี่ยนกะ";
            SHIFTDATE.IsVisible = true;
            SHIFTDATE.ReadOnly = true;
            SHIFTDATE.BestFit();
            rgv_EmpData.Columns.Add(SHIFTDATE);

            GridViewTextBoxColumn FROMSHIFTID = new GridViewTextBoxColumn();
            FROMSHIFTID.Name = "FROMSHIFTID";
            FROMSHIFTID.FieldName = "FROMSHIFTID";
            FROMSHIFTID.HeaderText = "กะเดิม";
            FROMSHIFTID.IsVisible = true;
            FROMSHIFTID.ReadOnly = true;
            FROMSHIFTID.BestFit();
            rgv_EmpData.Columns.Add(FROMSHIFTID);

            GridViewTextBoxColumn FROMSHIFTDESC = new GridViewTextBoxColumn();
            FROMSHIFTDESC.Name = "FROMSHIFTDESC";
            FROMSHIFTDESC.FieldName = "FROMSHIFTDESC";
            FROMSHIFTDESC.HeaderText = "คำอธิบาย";
            FROMSHIFTDESC.IsVisible = true;
            FROMSHIFTDESC.ReadOnly = true;
            FROMSHIFTDESC.BestFit();
            rgv_EmpData.Columns.Add(FROMSHIFTDESC);

            GridViewTextBoxColumn TOSHIFTID = new GridViewTextBoxColumn();
            TOSHIFTID.Name = "TOSHIFTID";
            TOSHIFTID.FieldName = "TOSHIFTID";
            TOSHIFTID.HeaderText = "กะใหม่";
            TOSHIFTID.IsVisible = true;
            TOSHIFTID.ReadOnly = true;
            TOSHIFTID.BestFit();
            rgv_EmpData.Columns.Add(TOSHIFTID);

            GridViewTextBoxColumn TOSHIFTDESC = new GridViewTextBoxColumn();
            TOSHIFTDESC.Name = "TOSHIFTDESC";
            TOSHIFTDESC.FieldName = "TOSHIFTDESC";
            TOSHIFTDESC.HeaderText = "คำอธิบาย";
            TOSHIFTDESC.IsVisible = true;
            TOSHIFTDESC.ReadOnly = true;
            TOSHIFTDESC.BestFit();
            rgv_EmpData.Columns.Add(TOSHIFTDESC);

            GridViewTextBoxColumn REMARK = new GridViewTextBoxColumn();
            REMARK.Name = "REMARK";
            REMARK.FieldName = "REMARK";
            REMARK.HeaderText = "เหตุผล";
            REMARK.IsVisible = true;
            REMARK.ReadOnly = true;
            REMARK.BestFit();
            rgv_EmpData.Columns.Add(REMARK);

            GridViewTextBoxColumn CREATEDDATE = new GridViewTextBoxColumn();
            CREATEDDATE.Name = "CREATEDDATE";
            CREATEDDATE.FieldName = "CREATEDDATE";
            CREATEDDATE.HeaderText = "วันที่บันทึก";
            CREATEDDATE.IsVisible = true;
            CREATEDDATE.ReadOnly = true;
            CREATEDDATE.BestFit();
            rgv_EmpData.Columns.Add(CREATEDDATE);


            #endregion
        }
        private void InitializeDataGridView()
        {
            #region SetDataGrid

            this.rgv_EmpData.Dock = DockStyle.Fill;
            this.rgv_EmpData.ReadOnly = true;
            this.rgv_EmpData.AutoGenerateColumns = true;
            this.rgv_EmpData.EnableFiltering = false;
            this.rgv_EmpData.AllowAddNewRow = false;
            this.rgv_EmpData.MasterTemplate.AutoGenerateColumns = false;
            this.rgv_EmpData.ShowGroupedColumns = true;
            this.rgv_EmpData.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            this.rgv_EmpData.EnableHotTracking = true;
            this.rgv_EmpData.AutoSizeRows = true;

            GridViewTextBoxColumn TYPDESC = new GridViewTextBoxColumn();
            TYPDESC.Name = "TYPDESC";
            TYPDESC.FieldName = "TYPDESC";
            TYPDESC.HeaderText = "ประเภทเอกสาร";
            TYPDESC.IsVisible = true;
            TYPDESC.ReadOnly = true;
            TYPDESC.BestFit();
            rgv_EmpData.Columns.Add(TYPDESC);

            GridViewTextBoxColumn DLDOCNO = new GridViewTextBoxColumn();
            DLDOCNO.Name = "DLDOCNO";
            DLDOCNO.FieldName = "DLDOCNO";
            DLDOCNO.HeaderText = "เลขที่เอกสาร";
            DLDOCNO.IsVisible = true;
            DLDOCNO.ReadOnly = true;
            DLDOCNO.BestFit();
            rgv_EmpData.Columns.Add(DLDOCNO);

            GridViewTextBoxColumn LEAVEDATE = new GridViewTextBoxColumn();
            LEAVEDATE.Name = "LEAVEDATE";
            LEAVEDATE.FieldName = "LEAVEDATE";
            LEAVEDATE.HeaderText = "วันที่ลาหยุด";
            LEAVEDATE.IsVisible = true;
            LEAVEDATE.ReadOnly = true;
            LEAVEDATE.BestFit();
            rgv_EmpData.Columns.Add(LEAVEDATE);


            GridViewTextBoxColumn LEAVETYPEDETAIL = new GridViewTextBoxColumn();
            LEAVETYPEDETAIL.Name = "LEAVETYPEDETAIL";
            LEAVETYPEDETAIL.FieldName = "LEAVETYPEDETAIL";
            LEAVETYPEDETAIL.HeaderText = "ประเภทการลา";
            LEAVETYPEDETAIL.IsVisible = true;
            LEAVETYPEDETAIL.ReadOnly = true;
            LEAVETYPEDETAIL.BestFit();
            rgv_EmpData.Columns.Add(LEAVETYPEDETAIL);

            GridViewTextBoxColumn ATTACH = new GridViewTextBoxColumn();
            ATTACH.Name = "ATTACH";
            ATTACH.FieldName = "ATTACH";
            ATTACH.HeaderText = "ใบรับรองแพทย์";
            ATTACH.IsVisible = true;
            ATTACH.ReadOnly = true;
            ATTACH.BestFit();
            rgv_EmpData.Columns.Add(ATTACH);

            GridViewTextBoxColumn HALFDAY = new GridViewTextBoxColumn();
            HALFDAY.Name = "HALFDAY";
            HALFDAY.FieldName = "HALFDAY";
            HALFDAY.HeaderText = "จำนวนวัน";
            HALFDAY.IsVisible = true;
            HALFDAY.ReadOnly = true;
            HALFDAY.BestFit();
            rgv_EmpData.Columns.Add(HALFDAY);

            GridViewTextBoxColumn HALFDAYTIME1 = new GridViewTextBoxColumn();
            HALFDAYTIME1.Name = "HALFDAYTIME1";
            HALFDAYTIME1.FieldName = "HALFDAYTIME1";
            HALFDAYTIME1.HeaderText = "ตั้งแต่เวลา";
            HALFDAYTIME1.IsVisible = true;
            HALFDAYTIME1.ReadOnly = true;
            HALFDAYTIME1.BestFit();
            rgv_EmpData.Columns.Add(HALFDAYTIME1);

            GridViewTextBoxColumn HALFDAYTIME2 = new GridViewTextBoxColumn();
            HALFDAYTIME2.Name = "HALFDAYTIME2";
            HALFDAYTIME2.FieldName = "HALFDAYTIME2";
            HALFDAYTIME2.HeaderText = "ถึงเวลา";
            HALFDAYTIME2.IsVisible = true;
            HALFDAYTIME2.ReadOnly = true;
            HALFDAYTIME2.BestFit();
            rgv_EmpData.Columns.Add(HALFDAYTIME2);

            GridViewTextBoxColumn LEAVEREMARK = new GridViewTextBoxColumn();
            LEAVEREMARK.Name = "LEAVEREMARK";
            LEAVEREMARK.FieldName = "LEAVEREMARK";
            LEAVEREMARK.HeaderText = "เหตุผล";
            LEAVEREMARK.IsVisible = true;
            LEAVEREMARK.ReadOnly = true;
            LEAVEREMARK.BestFit();
            rgv_EmpData.Columns.Add(LEAVEREMARK);

            GridViewTextBoxColumn CREATEDDATE = new GridViewTextBoxColumn();
            CREATEDDATE.Name = "CREATEDDATE";
            CREATEDDATE.FieldName = "CREATEDDATE";
            CREATEDDATE.HeaderText = "วันที่บันทึก";
            CREATEDDATE.IsVisible = true;
            CREATEDDATE.ReadOnly = true;
            CREATEDDATE.BestFit();
            rgv_EmpData.Columns.Add(CREATEDDATE);


            #endregion
        }
Beispiel #9
0
        void InitializeSetGridView()
        {

            // GridData 
            this.rgv_ApproveHD.Dock = DockStyle.Fill;
            this.rgv_ApproveHD.ReadOnly = true;
            this.rgv_ApproveHD.AutoGenerateColumns = true;
            this.rgv_ApproveHD.EnableFiltering = false;
            this.rgv_ApproveHD.AllowAddNewRow = false;
            this.rgv_ApproveHD.MasterTemplate.AutoGenerateColumns = false;
            this.rgv_ApproveHD.ShowGroupedColumns = true;
            this.rgv_ApproveHD.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            this.rgv_ApproveHD.EnableHotTracking = true;
            this.rgv_ApproveHD.AutoSizeRows = true;

            GridViewTextBoxColumn DOCID = new GridViewTextBoxColumn();
            DOCID.Name = "DOCID";
            DOCID.FieldName = "DOCID";
            DOCID.HeaderText = "เลขที่เอกสาร";
            DOCID.IsVisible = true;
            DOCID.ReadOnly = true;
            DOCID.BestFit();
            rgv_ApproveHD.Columns.Add(DOCID);

            GridViewTextBoxColumn CREATEDDATE = new GridViewTextBoxColumn();
            CREATEDDATE.Name = "CREATEDDATE";
            CREATEDDATE.FieldName = "CREATEDDATE";
            CREATEDDATE.HeaderText = "วันที่สร้าง";
            CREATEDDATE.IsVisible = true;
            CREATEDDATE.ReadOnly = true;
            CREATEDDATE.BestFit();
            rgv_ApproveHD.Columns.Add(CREATEDDATE);

            GridViewTextBoxColumn CREATEDNAME = new GridViewTextBoxColumn();
            CREATEDNAME.Name = "CREATEDNAME";
            CREATEDNAME.FieldName = "CREATEDNAME";
            CREATEDNAME.HeaderText = "ผู้สร้าง";
            CREATEDNAME.IsVisible = true;
            CREATEDNAME.ReadOnly = true;
            CREATEDNAME.BestFit();
            rgv_ApproveHD.Columns.Add(CREATEDNAME);

            GridViewTextBoxColumn MODIFIEDDATE = new GridViewTextBoxColumn();
            MODIFIEDDATE.Name = "MODIFIEDDATE";
            MODIFIEDDATE.FieldName = "MODIFIEDDATE";
            MODIFIEDDATE.HeaderText = "แก้ไขล่าสุด";
            MODIFIEDDATE.IsVisible = true;
            MODIFIEDDATE.ReadOnly = true;
            MODIFIEDDATE.BestFit();
            rgv_ApproveHD.Columns.Add(MODIFIEDDATE);

            GridViewTextBoxColumn EXPIREDATE = new GridViewTextBoxColumn();
            EXPIREDATE.Name = "EXPIREDATE";
            EXPIREDATE.FieldName = "EXPIREDATE";
            EXPIREDATE.HeaderText = "อนุมัติภายใน";
            EXPIREDATE.IsVisible = true;
            EXPIREDATE.ReadOnly = true;
            EXPIREDATE.BestFit();
            rgv_ApproveHD.Columns.Add(EXPIREDATE);

            GridViewTextBoxColumn EMPLNAME = new GridViewTextBoxColumn();
            EMPLNAME.Name = "EMPLNAME";
            EMPLNAME.FieldName = "EMPLNAME";
            EMPLNAME.HeaderText = "ชื่อ";
            EMPLNAME.IsVisible = true;
            EMPLNAME.ReadOnly = true;
            EMPLNAME.BestFit();
            rgv_ApproveHD.Columns.Add(EMPLNAME);

            GridViewTextBoxColumn DOCTYP = new GridViewTextBoxColumn();
            DOCTYP.Name = "DOCTYP";
            DOCTYP.FieldName = "DOCTYP";
            DOCTYP.HeaderText = "ชนิดเอกสารยกเลิก";
            DOCTYP.IsVisible = false;
            DOCTYP.ReadOnly = true;
            DOCTYP.BestFit();
            rgv_ApproveHD.Columns.Add(DOCTYP);

            GridViewTextBoxColumn TYPDESC = new GridViewTextBoxColumn();
            TYPDESC.Name = "TYPDESC";
            TYPDESC.FieldName = "TYPDESC";
            TYPDESC.HeaderText = "เอกสารยกเลิก";
            TYPDESC.IsVisible = true;
            TYPDESC.ReadOnly = true;
            TYPDESC.BestFit();
            rgv_ApproveHD.Columns.Add(TYPDESC);

            GridViewTextBoxColumn HEADAPPROVED = new GridViewTextBoxColumn();
            HEADAPPROVED.Name = "HEADAPPROVED";
            HEADAPPROVED.FieldName = "HEADAPPROVED";
            HEADAPPROVED.HeaderText = "หน./ผช.";
            HEADAPPROVED.IsVisible = true;
            HEADAPPROVED.ReadOnly = true;
            HEADAPPROVED.BestFit();
            rgv_ApproveHD.Columns.Add(HEADAPPROVED);

            GridViewTextBoxColumn HEADAPPROVEDBYNAME = new GridViewTextBoxColumn();
            HEADAPPROVEDBYNAME.Name = "HEADAPPROVEDBYNAME";
            HEADAPPROVEDBYNAME.FieldName = "HEADAPPROVEDBYNAME";
            HEADAPPROVEDBYNAME.HeaderText = "ผู้อนุมัติ";
            HEADAPPROVEDBYNAME.IsVisible = true;
            HEADAPPROVEDBYNAME.ReadOnly = true;
            HEADAPPROVEDBYNAME.BestFit();
            rgv_ApproveHD.Columns.Add(HEADAPPROVEDBYNAME);


            GridViewTextBoxColumn HRAPPROVED = new GridViewTextBoxColumn();
            HRAPPROVED.Name = "HRAPPROVED";
            HRAPPROVED.FieldName = "HRAPPROVED";
            HRAPPROVED.HeaderText = "บุคคล";
            HRAPPROVED.IsVisible = true;
            HRAPPROVED.ReadOnly = true;
            HRAPPROVED.BestFit();
            rgv_ApproveHD.Columns.Add(HRAPPROVED);

            GridViewTextBoxColumn HRAPPROVEDBYNAME = new GridViewTextBoxColumn();
            HRAPPROVEDBYNAME.Name = "HRAPPROVEDBYNAME";
            HRAPPROVEDBYNAME.FieldName = "HRAPPROVEDBYNAME";
            HRAPPROVEDBYNAME.HeaderText = "ผู้อนุมัติ";
            HRAPPROVEDBYNAME.IsVisible = true;
            HRAPPROVEDBYNAME.ReadOnly = true;
            HRAPPROVEDBYNAME.BestFit();
            rgv_ApproveHD.Columns.Add(HRAPPROVEDBYNAME);

            GridViewCommandColumn ApproveButton = new GridViewCommandColumn();
            ApproveButton.Name = "ApproveButton";
            ApproveButton.FieldName = "ApproveButton";
            ApproveButton.HeaderText = "อนุมัติ";
            rgv_ApproveHD.Columns.Add(ApproveButton);

        }
Beispiel #10
0
        void GridViewHD()
        {

            this.rgv_HD.Dock = DockStyle.Fill;
            this.rgv_HD.ReadOnly = true;
            this.rgv_HD.AutoGenerateColumns = true;
            this.rgv_HD.EnableFiltering = false;
            this.rgv_HD.AllowAddNewRow = false;
            this.rgv_HD.MasterTemplate.AutoGenerateColumns = false;
            this.rgv_HD.ShowGroupedColumns = true;
            this.rgv_HD.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            this.rgv_HD.EnableHotTracking = true;
            this.rgv_HD.AutoSizeRows = true;

            GridViewTextBoxColumn DOCID = new GridViewTextBoxColumn();
            DOCID.Name = "DOCID";
            DOCID.FieldName = "DOCID";
            DOCID.HeaderText = "เลขที่เอกสาร";
            DOCID.IsVisible = true;
            DOCID.ReadOnly = true;
            DOCID.BestFit();
            rgv_HD.Columns.Add(DOCID);

            GridViewTextBoxColumn DOCTYP = new GridViewTextBoxColumn();
            DOCTYP.Name = "DOCTYP";
            DOCTYP.FieldName = "DOCTYP";
            DOCTYP.HeaderText = "ประเภท";
            DOCTYP.IsVisible = true;
            DOCTYP.ReadOnly = true;
            DOCTYP.BestFit();
            rgv_HD.Columns.Add(DOCTYP);

            GridViewTextBoxColumn DOCREFER = new GridViewTextBoxColumn();
            DOCREFER.Name = "DOCREFER";
            DOCREFER.FieldName = "DOCREFER";
            DOCREFER.HeaderText = "เลขที่ที่อ้างอิง";
            DOCREFER.IsVisible = true;
            DOCREFER.ReadOnly = true;
            DOCREFER.BestFit();
            rgv_HD.Columns.Add(DOCREFER);

            GridViewTextBoxColumn EMPLNAME = new GridViewTextBoxColumn();
            EMPLNAME.Name = "EMPLNAME";
            EMPLNAME.FieldName = "EMPLNAME";
            EMPLNAME.HeaderText = "ชื่อ";
            EMPLNAME.IsVisible = true;
            EMPLNAME.ReadOnly = true;
            EMPLNAME.BestFit();
            rgv_HD.Columns.Add(EMPLNAME);

            GridViewTextBoxColumn HEADAPPROVED = new GridViewTextBoxColumn();
            HEADAPPROVED.Name = "HEADAPPROVED";
            HEADAPPROVED.FieldName = "HEADAPPROVED";
            HEADAPPROVED.HeaderText = "หน./ผช.";
            HEADAPPROVED.IsVisible = true;
            HEADAPPROVED.ReadOnly = true;
            HEADAPPROVED.BestFit();
            rgv_HD.Columns.Add(HEADAPPROVED);

            GridViewTextBoxColumn HEADAPPROVEDBYNAME = new GridViewTextBoxColumn();
            HEADAPPROVEDBYNAME.Name = "HEADAPPROVEDBYNAME";
            HEADAPPROVEDBYNAME.FieldName = "HEADAPPROVEDBYNAME";
            HEADAPPROVEDBYNAME.HeaderText = "ผู้อนุมัติ";
            HEADAPPROVEDBYNAME.IsVisible = true;
            HEADAPPROVEDBYNAME.ReadOnly = true;
            HEADAPPROVEDBYNAME.BestFit();
            rgv_HD.Columns.Add(HEADAPPROVEDBYNAME);

            GridViewTextBoxColumn HRAPPROVED = new GridViewTextBoxColumn();
            HRAPPROVED.Name = "HRAPPROVED";
            HRAPPROVED.FieldName = "HRAPPROVED";
            HRAPPROVED.HeaderText = "บุคคล";
            HRAPPROVED.IsVisible = true;
            HRAPPROVED.ReadOnly = true;
            HRAPPROVED.BestFit();
            rgv_HD.Columns.Add(HRAPPROVED);

            GridViewTextBoxColumn HRAPPROVEDBYNAME = new GridViewTextBoxColumn();
            HRAPPROVEDBYNAME.Name = "HRAPPROVEDBYNAME";
            HRAPPROVEDBYNAME.FieldName = "HRAPPROVEDBYNAME";
            HRAPPROVEDBYNAME.HeaderText = "ผู้อนุมัติ";
            HRAPPROVEDBYNAME.IsVisible = true;
            HRAPPROVEDBYNAME.ReadOnly = true;
            HRAPPROVEDBYNAME.BestFit();
            rgv_HD.Columns.Add(HRAPPROVEDBYNAME);

            GridViewTextBoxColumn DOCSTAT = new GridViewTextBoxColumn();
            DOCSTAT.Name = "DOCSTAT";
            DOCSTAT.FieldName = "DOCSTAT";
            DOCSTAT.HeaderText = "สถานะเอกสาร";
            DOCSTAT.IsVisible = true;
            DOCSTAT.ReadOnly = true;
            DOCSTAT.BestFit();
            rgv_HD.Columns.Add(DOCSTAT);

        }
Beispiel #11
0
        void InitializeGridVeiw()
        {
            // GridData 
            this.rgv_empholiday.Dock = DockStyle.Fill;
            this.rgv_empholiday.ReadOnly = true;
            this.rgv_empholiday.AutoGenerateColumns = true;
            this.rgv_empholiday.EnableFiltering = false;
            this.rgv_empholiday.AllowAddNewRow = false;
            this.rgv_empholiday.MasterTemplate.AutoGenerateColumns = false;
            this.rgv_empholiday.ShowGroupedColumns = true;
            this.rgv_empholiday.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            this.rgv_empholiday.EnableHotTracking = true;
            this.rgv_empholiday.AutoSizeRows = true;

            //GridViewTextBoxColumn PWEMPLOYEE = new GridViewTextBoxColumn();
            //PWEMPLOYEE.Name = "PWEMPLOYEE";
            //PWEMPLOYEE.FieldName = "PWEMPLOYEE";
            //PWEMPLOYEE.HeaderText = "รหัสพนักงาน";
            //PWEMPLOYEE.IsVisible = true;
            //PWEMPLOYEE.ReadOnly = true;
            //PWEMPLOYEE.BestFit();
            //rgv_empholiday.Columns.Add(PWEMPLOYEE);

            //GridViewTextBoxColumn PWNAME = new GridViewTextBoxColumn();
            //PWNAME.Name = "PWNAME";
            //PWNAME.FieldName = "PWNAME";
            //PWNAME.HeaderText = "ชื่อ-สกุล";
            //PWNAME.IsVisible = true;
            //PWNAME.ReadOnly = true;
            //PWNAME.BestFit();
            //rgv_empholiday.Columns.Add(PWNAME);

            //GridViewTextBoxColumn SECTIONNAME = new GridViewTextBoxColumn();
            //SECTIONNAME.Name = "SECTIONNAME";
            //SECTIONNAME.FieldName = "SECTIONNAME";
            //SECTIONNAME.HeaderText = "แผนก";
            //SECTIONNAME.IsVisible = true;
            //SECTIONNAME.ReadOnly = true;
            //SECTIONNAME.BestFit();
            //rgv_empholiday.Columns.Add(SECTIONNAME);

            GridViewTextBoxColumn PWDATE = new GridViewTextBoxColumn();
            PWDATE.Name = "PWDATE";
            PWDATE.FieldName = "PWDATE";
            PWDATE.HeaderText = "วันที่";
            PWDATE.IsVisible = true;
            PWDATE.ReadOnly = true;
            PWDATE.BestFit();
            rgv_empholiday.Columns.Add(PWDATE);

            GridViewTextBoxColumn PWDESC = new GridViewTextBoxColumn();
            PWDESC.Name = "PWDESC";
            PWDESC.FieldName = "PWDESC";
            PWDESC.HeaderText = "คำอธิบาย";
            PWDESC.IsVisible = true;
            PWDESC.ReadOnly = true;
            PWDESC.BestFit();
            rgv_empholiday.Columns.Add(PWDESC);

            GridViewTextBoxColumn PWTIME0 = new GridViewTextBoxColumn();
            PWTIME0.Name = "PWTIME0";
            PWTIME0.FieldName = "PWTIME0";
            PWTIME0.HeaderText = "รหัสกะ";
            PWTIME0.IsVisible = true;
            PWTIME0.ReadOnly = true;
            PWTIME0.BestFit();
            rgv_empholiday.Columns.Add(PWTIME0);

            
        }
Beispiel #12
0
        void InitializeSetGridView()
        {

            // GridData 
            this.rgv_ReportStatus.Dock = DockStyle.Fill;
            this.rgv_ReportStatus.ReadOnly = true;
            this.rgv_ReportStatus.AutoGenerateColumns = true;
            this.rgv_ReportStatus.EnableFiltering = false;
            this.rgv_ReportStatus.AllowAddNewRow = false;
            this.rgv_ReportStatus.MasterTemplate.AutoGenerateColumns = false;
            this.rgv_ReportStatus.ShowGroupedColumns = true;
            this.rgv_ReportStatus.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            this.rgv_ReportStatus.EnableHotTracking = true;
            this.rgv_ReportStatus.AutoSizeRows = true;

            GridViewTextBoxColumn DOCID = new GridViewTextBoxColumn();
            DOCID.Name = "DOCID";
            DOCID.FieldName = "DOCID";
            DOCID.HeaderText = "เลขที่เอกสาร";
            DOCID.IsVisible = true;
            DOCID.ReadOnly = true;
            DOCID.BestFit();
            rgv_ReportStatus.Columns.Add(DOCID);

            GridViewTextBoxColumn CREATEDDATE = new GridViewTextBoxColumn();
            CREATEDDATE.Name = "CREATEDDATE";
            CREATEDDATE.FieldName = "CREATEDDATE";
            CREATEDDATE.HeaderText = "วันที่สร้าง";
            CREATEDDATE.IsVisible = true;
            CREATEDDATE.ReadOnly = true;
            CREATEDDATE.BestFit();
            rgv_ReportStatus.Columns.Add(CREATEDDATE);

            GridViewTextBoxColumn EMPLNAME = new GridViewTextBoxColumn();
            EMPLNAME.Name = "EMPLNAME";
            EMPLNAME.FieldName = "EMPLNAME";
            EMPLNAME.HeaderText = "ชื่อ";
            EMPLNAME.IsVisible = true;
            EMPLNAME.ReadOnly = true;
            EMPLNAME.BestFit();
            rgv_ReportStatus.Columns.Add(EMPLNAME);

            GridViewTextBoxColumn DOCTYP = new GridViewTextBoxColumn();
            DOCTYP.Name = "DOCTYP";
            DOCTYP.FieldName = "DOCTYP";
            DOCTYP.HeaderText = "ชนิดเอกสารยกเลิก";
            DOCTYP.IsVisible = false;
            DOCTYP.ReadOnly = true;
            DOCTYP.BestFit();
            rgv_ReportStatus.Columns.Add(DOCTYP);

            GridViewTextBoxColumn TYPDESC = new GridViewTextBoxColumn();
            TYPDESC.Name = "TYPDESC";
            TYPDESC.FieldName = "TYPDESC";
            TYPDESC.HeaderText = "เอกสารยกเลิก";
            TYPDESC.IsVisible = true;
            TYPDESC.ReadOnly = true;
            TYPDESC.BestFit();
            rgv_ReportStatus.Columns.Add(TYPDESC);

            GridViewTextBoxColumn HEADAPPROVED = new GridViewTextBoxColumn();
            HEADAPPROVED.Name = "HEADAPPROVED";
            HEADAPPROVED.FieldName = "HEADAPPROVED";
            HEADAPPROVED.HeaderText = "หน./ผช.";
            HEADAPPROVED.IsVisible = true;
            HEADAPPROVED.ReadOnly = true;
            HEADAPPROVED.BestFit();
            rgv_ReportStatus.Columns.Add(HEADAPPROVED);

            GridViewTextBoxColumn HEADAPPROVEDBYNAME = new GridViewTextBoxColumn();
            HEADAPPROVEDBYNAME.Name = "HEADAPPROVEDBYNAME";
            HEADAPPROVEDBYNAME.FieldName = "HEADAPPROVEDBYNAME";
            HEADAPPROVEDBYNAME.HeaderText = "ผู้อนุมัติ";
            HEADAPPROVEDBYNAME.IsVisible = true;
            HEADAPPROVEDBYNAME.ReadOnly = true;
            HEADAPPROVEDBYNAME.BestFit();
            rgv_ReportStatus.Columns.Add(HEADAPPROVEDBYNAME);


            GridViewTextBoxColumn HEADAPPROVEDDATE = new GridViewTextBoxColumn();
            HEADAPPROVEDDATE.Name = "HEADAPPROVEDDATE";
            HEADAPPROVEDDATE.FieldName = "HEADAPPROVEDDATE";
            HEADAPPROVEDDATE.HeaderText = "วันที่อนุมัติ";
            HEADAPPROVEDDATE.IsVisible = true;
            HEADAPPROVEDDATE.ReadOnly = true;
            HEADAPPROVEDDATE.BestFit();
            rgv_ReportStatus.Columns.Add(HEADAPPROVEDDATE);

            GridViewTextBoxColumn HEADAPPORVEREMARK = new GridViewTextBoxColumn();
            HEADAPPORVEREMARK.Name = "HEADAPPORVEREMARK";
            HEADAPPORVEREMARK.FieldName = "HEADAPPORVEREMARK";
            HEADAPPORVEREMARK.HeaderText = "หมายเหตุ";
            HEADAPPORVEREMARK.IsVisible = true;
            HEADAPPORVEREMARK.ReadOnly = true;
            HEADAPPORVEREMARK.BestFit();
            rgv_ReportStatus.Columns.Add(HEADAPPORVEREMARK);


            GridViewTextBoxColumn HRAPPROVED = new GridViewTextBoxColumn();
            HRAPPROVED.Name = "HRAPPROVED";
            HRAPPROVED.FieldName = "HRAPPROVED";
            HRAPPROVED.HeaderText = "บุคคล";
            HRAPPROVED.IsVisible = true;
            HRAPPROVED.ReadOnly = true;
            HRAPPROVED.BestFit();
            rgv_ReportStatus.Columns.Add(HRAPPROVED);

            GridViewTextBoxColumn HRAPPROVEDBYNAME = new GridViewTextBoxColumn();
            HRAPPROVEDBYNAME.Name = "HRAPPROVEDBYNAME";
            HRAPPROVEDBYNAME.FieldName = "HRAPPROVEDBYNAME";
            HRAPPROVEDBYNAME.HeaderText = "ผู้อนุมัติ";
            HRAPPROVEDBYNAME.IsVisible = true;
            HRAPPROVEDBYNAME.ReadOnly = true;
            HRAPPROVEDBYNAME.BestFit();
            rgv_ReportStatus.Columns.Add(HRAPPROVEDBYNAME);

            GridViewTextBoxColumn HRAPPROVEDDATE = new GridViewTextBoxColumn();
            HRAPPROVEDDATE.Name = "HRAPPROVEDDATE";
            HRAPPROVEDDATE.FieldName = "HRAPPROVEDDATE";
            HRAPPROVEDDATE.HeaderText = "วันที่อนุมัติ";
            HRAPPROVEDDATE.IsVisible = true;
            HRAPPROVEDDATE.ReadOnly = true;
            HRAPPROVEDDATE.BestFit();
            rgv_ReportStatus.Columns.Add(HRAPPROVEDDATE);

            GridViewCommandColumn DetailButton = new GridViewCommandColumn();
            DetailButton.Name = "DetailButton";
            DetailButton.FieldName = "DetailButton";
            DetailButton.HeaderText = "รายละเอียด";
            rgv_ReportStatus.Columns.Add(DetailButton);

        }
Beispiel #13
0
        public Leave_Hist(string Empid)
        {
            _empid = Empid;
            InitializeComponent();

            CheckApproveID();
            Load_Section();

            this.dt_FromSec.Text = DateTime.Now.ToString("yyyy-01-01");
            this.dt_ToSec.Text = DateTime.Now.ToString("yyyy-MM-dd");
            btn_SearchData.Click += new EventHandler(btn_SearchData_Click);

            #region radGridView
            // GridData 
            this.radGridView1.Dock = DockStyle.Fill;
            this.radGridView1.ReadOnly = true;
            this.radGridView1.AutoGenerateColumns = true;
            this.radGridView1.EnableFiltering = false;
            this.radGridView1.AllowAddNewRow = false;
            this.radGridView1.MasterTemplate.AutoGenerateColumns = false;
            this.radGridView1.ShowGroupedColumns = true;
            this.radGridView1.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            this.radGridView1.EnableHotTracking = true;
            this.radGridView1.AutoSizeRows = true;

            GridViewTextBoxColumn YR = new GridViewTextBoxColumn();
            YR.Name = "YR";
            YR.FieldName = "YR";
            YR.HeaderText = "ปี";
            YR.IsVisible = true;
            YR.ReadOnly = true;
            YR.BestFit();
            radGridView1.Columns.Add(YR);

            GridViewTextBoxColumn FULLNAME = new GridViewTextBoxColumn();
            FULLNAME.Name = "FULLNAME";
            FULLNAME.FieldName = "FULLNAME";
            FULLNAME.HeaderText = "ชื่อ - สกุล";
            FULLNAME.IsVisible = true;
            FULLNAME.ReadOnly = true;

            FULLNAME.BestFit();
            radGridView1.Columns.Add(FULLNAME);

            GridViewTextBoxColumn EVENTNANE = new GridViewTextBoxColumn();
            EVENTNANE.Name = "EVENTNANE";
            EVENTNANE.FieldName = "EVENTNANE";
            EVENTNANE.HeaderText = "ประเภท";
            EVENTNANE.IsVisible = true;
            EVENTNANE.ReadOnly = true;
            EVENTNANE.BestFit();
            radGridView1.Columns.Add(EVENTNANE);

            GridViewTextBoxColumn USESUMMARY = new GridViewTextBoxColumn();
            USESUMMARY.Name = "USESUMMARY";
            USESUMMARY.FieldName = "USESUMMARY";
            USESUMMARY.HeaderText = "ใช้ไป";
            USESUMMARY.IsVisible = true;
            USESUMMARY.ReadOnly = true;
            USESUMMARY.BestFit();
            radGridView1.Columns.Add(USESUMMARY);

            GridViewTextBoxColumn TOTALL = new GridViewTextBoxColumn();
            TOTALL.Name = "TOTALL";
            TOTALL.FieldName = "TOTALL";
            TOTALL.HeaderText = "คงเหลือ";
            TOTALL.IsVisible = true;
            TOTALL.ReadOnly = true;
            TOTALL.BestFit();
            radGridView1.Columns.Add(TOTALL);

            #endregion

        }
Beispiel #14
0
        public Chd_ApproveHD()
        {
            InitializeComponent();

            #region radGridView
            // GridData 
            this.rgv_ApproveHD.Dock = DockStyle.Fill;
            this.rgv_ApproveHD.ReadOnly = true;
            this.rgv_ApproveHD.AutoGenerateColumns = true;
            this.rgv_ApproveHD.EnableFiltering = false;
            this.rgv_ApproveHD.AllowAddNewRow = false;
            this.rgv_ApproveHD.MasterTemplate.AutoGenerateColumns = false;
            this.rgv_ApproveHD.ShowGroupedColumns = true;
            this.rgv_ApproveHD.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            this.rgv_ApproveHD.EnableHotTracking = true;
            this.rgv_ApproveHD.AutoSizeRows = true;

            GridViewTextBoxColumn DOCID = new GridViewTextBoxColumn();
            DOCID.Name = "DOCID";
            DOCID.FieldName = "DOCID";
            DOCID.HeaderText = "เลขที่เอกสาร";
            DOCID.IsVisible = true;
            DOCID.ReadOnly = true;
            DOCID.BestFit();
            rgv_ApproveHD.Columns.Add(DOCID);


            GridViewTextBoxColumn DOCSTAT = new GridViewTextBoxColumn();
            DOCSTAT.Name = "DOCSTAT";
            DOCSTAT.FieldName = "DOCSTAT";
            DOCSTAT.HeaderText = "สถานะเอกสาร";
            DOCSTAT.IsVisible = true;
            DOCSTAT.ReadOnly = true;
            DOCSTAT.BestFit();
            rgv_ApproveHD.Columns.Add(DOCSTAT);

            GridViewTextBoxColumn TRANSDATE = new GridViewTextBoxColumn();
            TRANSDATE.Name = "TRANSDATE";
            TRANSDATE.FieldName = "TRANSDATE";
            TRANSDATE.HeaderText = "วันที่สร้าง";
            TRANSDATE.IsVisible = true;
            TRANSDATE.ReadOnly = true;
            TRANSDATE.BestFit();
            rgv_ApproveHD.Columns.Add(TRANSDATE);

            GridViewTextBoxColumn CREATEDNAME = new GridViewTextBoxColumn();
            CREATEDNAME.Name = "CREATEDNAME";
            CREATEDNAME.FieldName = "CREATEDNAME";
            CREATEDNAME.HeaderText = "ผู้สร้าง";
            CREATEDNAME.IsVisible = true;
            CREATEDNAME.ReadOnly = true;
            CREATEDNAME.BestFit();
            rgv_ApproveHD.Columns.Add(CREATEDNAME);

            GridViewTextBoxColumn MODIFIEDDATE = new GridViewTextBoxColumn();
            MODIFIEDDATE.Name = "MODIFIEDDATE";
            MODIFIEDDATE.FieldName = "MODIFIEDDATE";
            MODIFIEDDATE.HeaderText = "แก้ไขล่าสุด";
            MODIFIEDDATE.IsVisible = true;
            MODIFIEDDATE.ReadOnly = true;
            MODIFIEDDATE.BestFit();
            rgv_ApproveHD.Columns.Add(MODIFIEDDATE);

            GridViewTextBoxColumn EMPLNAME = new GridViewTextBoxColumn();
            EMPLNAME.Name = "EMPLNAME";
            EMPLNAME.FieldName = "EMPLNAME";
            EMPLNAME.HeaderText = "ชื่อ";
            EMPLNAME.IsVisible = true;
            EMPLNAME.ReadOnly = true;
            EMPLNAME.BestFit();
            rgv_ApproveHD.Columns.Add(EMPLNAME);


            GridViewTextBoxColumn HEADAPPROVED = new GridViewTextBoxColumn();
            HEADAPPROVED.Name = "HEADAPPROVED";
            HEADAPPROVED.FieldName = "HEADAPPROVED";
            HEADAPPROVED.HeaderText = "หน./ผช.";
            HEADAPPROVED.IsVisible = true;
            HEADAPPROVED.ReadOnly = true;
            HEADAPPROVED.BestFit();
            rgv_ApproveHD.Columns.Add(HEADAPPROVED);

            GridViewTextBoxColumn HEADAPPROVEDBYNAME = new GridViewTextBoxColumn();
            HEADAPPROVEDBYNAME.Name = "HEADAPPROVEDBYNAME";
            HEADAPPROVEDBYNAME.FieldName = "HEADAPPROVEDBYNAME";
            HEADAPPROVEDBYNAME.HeaderText = "ผู้อนุมัติ";
            HEADAPPROVEDBYNAME.IsVisible = true;
            HEADAPPROVEDBYNAME.ReadOnly = true;
            HEADAPPROVEDBYNAME.BestFit();
            rgv_ApproveHD.Columns.Add(HEADAPPROVEDBYNAME);


            GridViewTextBoxColumn HRAPPROVED = new GridViewTextBoxColumn();
            HRAPPROVED.Name = "HRAPPROVED";
            HRAPPROVED.FieldName = "HRAPPROVED";
            HRAPPROVED.HeaderText = "บุคคล";
            HRAPPROVED.IsVisible = true;
            HRAPPROVED.ReadOnly = true;
            HRAPPROVED.BestFit();
            rgv_ApproveHD.Columns.Add(HRAPPROVED);


            GridViewTextBoxColumn HRAPPROVEDBYNAME = new GridViewTextBoxColumn();
            HRAPPROVEDBYNAME.Name = "HRAPPROVEDBYNAME";
            HRAPPROVEDBYNAME.FieldName = "HRAPPROVEDBYNAME";
            HRAPPROVEDBYNAME.HeaderText = "ผู้อนุมัติ";
            HRAPPROVEDBYNAME.IsVisible = true;
            HRAPPROVEDBYNAME.ReadOnly = true;
            HRAPPROVEDBYNAME.BestFit();
            rgv_ApproveHD.Columns.Add(HRAPPROVEDBYNAME);

            GridViewCommandColumn ApproveButton = new GridViewCommandColumn();
            ApproveButton.Name = "ApproveButton";
            ApproveButton.FieldName = "ApproveButton";
            ApproveButton.HeaderText = "อนุมัติ";
            rgv_ApproveHD.Columns.Add(ApproveButton);


            #endregion

            this.btn_Search.Click += new EventHandler(btn_Search_Click);
        }
Beispiel #15
0
        void InitializeGridView()
        {

            this.rgv_EmplData.Dock = DockStyle.Fill;
            this.rgv_EmplData.ReadOnly = true;
            this.rgv_EmplData.AutoGenerateColumns = true;
            this.rgv_EmplData.EnableFiltering = false;
            this.rgv_EmplData.AllowAddNewRow = false;
            this.rgv_EmplData.MasterTemplate.AutoGenerateColumns = false;
            this.rgv_EmplData.ShowGroupedColumns = true;
            this.rgv_EmplData.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            this.rgv_EmplData.EnableHotTracking = true;
            this.rgv_EmplData.AutoSizeRows = true;


            GridViewTextBoxColumn PAYDESC = new GridViewTextBoxColumn();
            PAYDESC.Name = "PAYDESC";
            PAYDESC.FieldName = "PAYDESC";
            PAYDESC.HeaderText = "รายการ";
            PAYDESC.IsVisible = true;
            PAYDESC.ReadOnly = true;
            PAYDESC.BestFit();
            rgv_EmplData.Columns.Add(PAYDESC);

            GridViewTextBoxColumn JOBS = new GridViewTextBoxColumn();
            JOBS.Name = "JOBS";
            JOBS.FieldName = "JOBS";
            JOBS.HeaderText = "จัดหางาน";
            JOBS.IsVisible = true;
            JOBS.ReadOnly = true;
            JOBS.BestFit();
            rgv_EmplData.Columns.Add(JOBS);

            GridViewTextBoxColumn BROKERS = new GridViewTextBoxColumn();
            BROKERS.Name = "BROKERS";
            BROKERS.FieldName = "BROKERS";
            BROKERS.HeaderText = "โบรกเกอร์";
            BROKERS.IsVisible = true;
            BROKERS.ReadOnly = true;
            BROKERS.BestFit();
            rgv_EmplData.Columns.Add(BROKERS);

            GridViewTextBoxColumn CENTER = new GridViewTextBoxColumn();
            CENTER.Name = "CENTER";
            CENTER.FieldName = "CENTER";
            CENTER.HeaderText = "ศูนย์พูลผล";
            CENTER.IsVisible = true;
            CENTER.ReadOnly = true;
            CENTER.BestFit();
            rgv_EmplData.Columns.Add(CENTER);

            GridViewTextBoxColumn MIMIGRATION = new GridViewTextBoxColumn();
            MIMIGRATION.Name = "MIMIGRATION";
            MIMIGRATION.FieldName = "MIMIGRATION";
            BROKERS.HeaderText = "ตม.";
            MIMIGRATION.IsVisible = true;
            MIMIGRATION.ReadOnly = true;
            MIMIGRATION.BestFit();
            rgv_EmplData.Columns.Add(MIMIGRATION);

            GridViewTextBoxColumn HOSPITAL = new GridViewTextBoxColumn();
            HOSPITAL.Name = "HOSPITAL";
            HOSPITAL.FieldName = "HOSPITAL";
            HOSPITAL.HeaderText = "รพ.";
            HOSPITAL.IsVisible = true;
            HOSPITAL.ReadOnly = true;
            HOSPITAL.BestFit();
            rgv_EmplData.Columns.Add(HOSPITAL);

            GridViewTextBoxColumn DISTRICT = new GridViewTextBoxColumn();
            DISTRICT.Name = "DISTRICT";
            DISTRICT.FieldName = "DISTRICT";
            DISTRICT.HeaderText = "อำเภอ";
            DISTRICT.IsVisible = true;
            DISTRICT.ReadOnly = true;
            DISTRICT.BestFit();
            rgv_EmplData.Columns.Add(DISTRICT);

            GridViewTextBoxColumn SUMPAY = new GridViewTextBoxColumn();
            SUMPAY.Name = "SUMPAY";
            SUMPAY.FieldName = "SUMPAY";
            SUMPAY.HeaderText = "รวม";
            SUMPAY.IsVisible = true;
            SUMPAY.ReadOnly = true;
            SUMPAY.BestFit();
            rgv_EmplData.Columns.Add(SUMPAY);

            GridViewTextBoxColumn SUPC = new GridViewTextBoxColumn();
            SUPC.Name = "SUPC";
            SUPC.FieldName = "SUPC";
            SUPC.HeaderText = "SUPC";
            SUPC.IsVisible = true;
            SUPC.ReadOnly = true;
            SUPC.BestFit();
            rgv_EmplData.Columns.Add(SUPC);

            GridViewTextBoxColumn TOTAL = new GridViewTextBoxColumn();
            TOTAL.Name = "TOTAL";
            TOTAL.FieldName = "TOTAL";
            TOTAL.HeaderText = "ยอดเรียกเก็บ";
            TOTAL.IsVisible = true;
            TOTAL.ReadOnly = true;
            TOTAL.BestFit();
            rgv_EmplData.Columns.Add(TOTAL);

            GridViewSummaryRowItem summary = new GridViewSummaryRowItem();
            summary.Add(new GridViewSummaryItem("JOBS", "{0:N2}", GridAggregateFunction.Sum));
            summary.Add(new GridViewSummaryItem("BROKERS", "{0:N2}", GridAggregateFunction.Sum));
            summary.Add(new GridViewSummaryItem("CENTER", "{0:N2}", GridAggregateFunction.Sum));
            summary.Add(new GridViewSummaryItem("MIMIGRATION", "{0:N2}", GridAggregateFunction.Sum));
            summary.Add(new GridViewSummaryItem("HOSPITAL", "{0:N2}", GridAggregateFunction.Sum));
            summary.Add(new GridViewSummaryItem("DISTRICT", "{0:N2}", GridAggregateFunction.Sum));
            summary.Add(new GridViewSummaryItem("SUMPAY", "{0:N2}", GridAggregateFunction.Sum));
            summary.Add(new GridViewSummaryItem("SUPC", "{0:N2}", GridAggregateFunction.Sum));
            summary.Add(new GridViewSummaryItem("TOTAL", "{0:N2}", GridAggregateFunction.Sum));

            this.rgv_EmplData.MasterTemplate.SummaryRowsBottom.Add(summary);
        }
Beispiel #16
0
        void GridViewCHDDT()
        {
            this.rgv_CHDDT.Dock = DockStyle.Fill;
            this.rgv_CHDDT.ReadOnly = true;
            this.rgv_CHDDT.AutoGenerateColumns = true;
            this.rgv_CHDDT.EnableFiltering = false;
            this.rgv_CHDDT.AllowAddNewRow = false;
            this.rgv_CHDDT.MasterTemplate.AutoGenerateColumns = false;
            this.rgv_CHDDT.ShowGroupedColumns = true;
            this.rgv_CHDDT.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            this.rgv_CHDDT.EnableHotTracking = true;
            this.rgv_CHDDT.AutoSizeRows = true;

            GridViewTextBoxColumn DOCID = new GridViewTextBoxColumn();
            DOCID.Name = "DOCID";
            DOCID.FieldName = "DOCID";
            DOCID.HeaderText = "เลขที่เอกสาร";
            DOCID.IsVisible = true;
            DOCID.ReadOnly = true;
            DOCID.BestFit();
            rgv_CHDDT.Columns.Add(DOCID);

            GridViewTextBoxColumn TYPDESC = new GridViewTextBoxColumn();
            TYPDESC.Name = "TYPDESC";
            TYPDESC.FieldName = "TYPDESC";
            TYPDESC.HeaderText = "ประเภทเอกสาร";
            TYPDESC.IsVisible = true;
            TYPDESC.ReadOnly = true;
            TYPDESC.BestFit();
            rgv_CHDDT.Columns.Add(TYPDESC);

            GridViewTextBoxColumn CHG_DOCID = new GridViewTextBoxColumn();
            CHG_DOCID.Name = "CHG_DOCID";
            CHG_DOCID.FieldName = "CHG_DOCID";
            CHG_DOCID.HeaderText = "เลขที่ที่อ้างอิง";
            CHG_DOCID.IsVisible = true;
            CHG_DOCID.ReadOnly = true;
            CHG_DOCID.BestFit();
            rgv_CHDDT.Columns.Add(CHG_DOCID);

            GridViewTextBoxColumn FROMHOLIDAY = new GridViewTextBoxColumn();
            FROMHOLIDAY.Name = "FROMHOLIDAY";
            FROMHOLIDAY.FieldName = "FROMHOLIDAY";
            FROMHOLIDAY.HeaderText = "วันที่มาทำ";
            FROMHOLIDAY.IsVisible = true;
            FROMHOLIDAY.ReadOnly = true;
            FROMHOLIDAY.BestFit();
            rgv_CHDDT.Columns.Add(FROMHOLIDAY);

            GridViewTextBoxColumn TOSHIFTID = new GridViewTextBoxColumn();
            TOSHIFTID.Name = "TOSHIFTID";
            TOSHIFTID.FieldName = "TOSHIFTID";
            TOSHIFTID.HeaderText = "กะที่มาทำ";
            TOSHIFTID.IsVisible = true;
            TOSHIFTID.ReadOnly = true;
            TOSHIFTID.BestFit();
            rgv_CHDDT.Columns.Add(TOSHIFTID);


            GridViewTextBoxColumn TOSHIFTDESC = new GridViewTextBoxColumn();
            TOSHIFTDESC.Name = "TOSHIFTDESC";
            TOSHIFTDESC.FieldName = "TOSHIFTDESC";
            TOSHIFTDESC.HeaderText = "คำอธิบาย";
            TOSHIFTDESC.IsVisible = true;
            TOSHIFTDESC.ReadOnly = true;
            TOSHIFTDESC.BestFit();
            rgv_CHDDT.Columns.Add(TOSHIFTDESC);

            GridViewTextBoxColumn TOHOLIDAY = new GridViewTextBoxColumn();
            TOHOLIDAY.Name = "TOHOLIDAY";
            TOHOLIDAY.FieldName = "TOHOLIDAY";
            TOHOLIDAY.HeaderText = "วันที่หยุด";
            TOHOLIDAY.IsVisible = true;
            TOHOLIDAY.ReadOnly = true;
            TOHOLIDAY.BestFit();
            rgv_CHDDT.Columns.Add(TOHOLIDAY);

            GridViewTextBoxColumn CHG_REASON = new GridViewTextBoxColumn();
            CHG_REASON.Name = "CHG_REASON";
            CHG_REASON.FieldName = "CHG_REASON";
            CHG_REASON.HeaderText = "เหตุผล";
            CHG_REASON.IsVisible = true;
            CHG_REASON.ReadOnly = true;
            CHG_REASON.BestFit();
            rgv_CHDDT.Columns.Add(CHG_REASON);

            GridViewTextBoxColumn TRANSDATE = new GridViewTextBoxColumn();
            TRANSDATE.Name = "TRANSDATE";
            TRANSDATE.FieldName = "TRANSDATE";
            TRANSDATE.HeaderText = "วันที่บันทึก";
            TRANSDATE.IsVisible = true;
            TRANSDATE.ReadOnly = true;
            TRANSDATE.BestFit();
            rgv_CHDDT.Columns.Add(TRANSDATE);
        }
Beispiel #17
0
        void GridViewReport()
        {
            #region DL
            this.rgv_ReportDLHR.Dock = DockStyle.Fill;
            this.rgv_ReportDLHR.ReadOnly = true;
            this.rgv_ReportDLHR.AutoGenerateColumns = true;
            this.rgv_ReportDLHR.EnableFiltering = false;
            this.rgv_ReportDLHR.AllowAddNewRow = false;
            this.rgv_ReportDLHR.MasterTemplate.AutoGenerateColumns = false;
            this.rgv_ReportDLHR.ShowGroupedColumns = true;
            this.rgv_ReportDLHR.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            this.rgv_ReportDLHR.EnableHotTracking = true;
            this.rgv_ReportDLHR.AutoSizeRows = true;
            this.rgv_ReportDLHR.Visible = false;

            GridViewTextBoxColumn DOCID = new GridViewTextBoxColumn();
            DOCID.Name = "DOCID";
            DOCID.FieldName = "DOCID";
            DOCID.HeaderText = "เลขที่เอกสาร";
            DOCID.IsVisible = true;
            DOCID.ReadOnly = true;
            DOCID.BestFit();
            rgv_ReportDLHR.Columns.Add(DOCID);

            GridViewTextBoxColumn EMPLID = new GridViewTextBoxColumn();
            EMPLID.Name = "EMPLID";
            EMPLID.FieldName = "EMPLID";
            EMPLID.HeaderText = "รหัส";
            EMPLID.IsVisible = true;
            EMPLID.ReadOnly = true;
            EMPLID.BestFit();
            rgv_ReportDLHR.Columns.Add(EMPLID);

            GridViewTextBoxColumn EMPLNAME = new GridViewTextBoxColumn();
            EMPLNAME.Name = "EMPLNAME";
            EMPLNAME.FieldName = "EMPLNAME";
            EMPLNAME.HeaderText = "ชื่อ";
            EMPLNAME.IsVisible = true;
            EMPLNAME.ReadOnly = true;
            EMPLNAME.BestFit();
            rgv_ReportDLHR.Columns.Add(EMPLNAME);

            GridViewTextBoxColumn SECTIONNAME = new GridViewTextBoxColumn();
            SECTIONNAME.Name = "SECTIONNAME";
            SECTIONNAME.FieldName = "SECTIONNAME";
            SECTIONNAME.HeaderText = "แผนก";
            SECTIONNAME.IsVisible = true;
            SECTIONNAME.ReadOnly = true;
            SECTIONNAME.BestFit();
            rgv_ReportDLHR.Columns.Add(SECTIONNAME);

            GridViewTextBoxColumn DEPTNAME = new GridViewTextBoxColumn();
            DEPTNAME.Name = "DEPTNAME";
            DEPTNAME.FieldName = "DEPTNAME";
            DEPTNAME.HeaderText = "ตำแหน่ง";
            DEPTNAME.IsVisible = true;
            DEPTNAME.ReadOnly = true;
            DEPTNAME.BestFit();
            rgv_ReportDLHR.Columns.Add(DEPTNAME);

            GridViewTextBoxColumn TYPDESC = new GridViewTextBoxColumn();
            TYPDESC.Name = "TYPDESC";
            TYPDESC.FieldName = "TYPDESC";
            TYPDESC.HeaderText = "เอกสารยกเลิก";
            TYPDESC.IsVisible = true;
            TYPDESC.ReadOnly = true;
            TYPDESC.BestFit();
            rgv_ReportDLHR.Columns.Add(TYPDESC);

            GridViewTextBoxColumn DOCREFER = new GridViewTextBoxColumn();
            DOCREFER.Name = "DOCREFER";
            DOCREFER.FieldName = "DOCREFER";
            DOCREFER.HeaderText = "เลขที่อ้างอิง";
            DOCREFER.IsVisible = true;
            DOCREFER.ReadOnly = true;
            DOCREFER.BestFit();
            rgv_ReportDLHR.Columns.Add(DOCREFER);

            GridViewTextBoxColumn DATEREFER = new GridViewTextBoxColumn();
            DATEREFER.Name = "DATEREFER";
            DATEREFER.FieldName = "DATEREFER";
            DATEREFER.HeaderText = "วันที่อ้างอิง";
            DATEREFER.IsVisible = true;
            DATEREFER.ReadOnly = true;
            DATEREFER.BestFit();
            rgv_ReportDLHR.Columns.Add(DATEREFER);

            GridViewTextBoxColumn REASON = new GridViewTextBoxColumn();
            REASON.Name = "REASON";
            REASON.FieldName = "REASON";
            REASON.HeaderText = "เหตุผล";
            REASON.IsVisible = true;
            REASON.ReadOnly = true;
            REASON.BestFit();
            rgv_ReportDLHR.Columns.Add(REASON);

            GridViewTextBoxColumn HEADAPPROVED = new GridViewTextBoxColumn();
            HEADAPPROVED.Name = "HEADAPPROVED";
            HEADAPPROVED.FieldName = "HEADAPPROVED";
            HEADAPPROVED.HeaderText = "หน./ผช.";
            HEADAPPROVED.IsVisible = true;
            HEADAPPROVED.ReadOnly = true;
            HEADAPPROVED.BestFit();
            rgv_ReportDLHR.Columns.Add(HEADAPPROVED);

            GridViewTextBoxColumn HEADAPPROVEDBYNAME = new GridViewTextBoxColumn();
            HEADAPPROVEDBYNAME.Name = "HEADAPPROVEDBYNAME";
            HEADAPPROVEDBYNAME.FieldName = "HEADAPPROVEDBYNAME";
            HEADAPPROVEDBYNAME.HeaderText = "ผู้อนุมัติ";
            HEADAPPROVEDBYNAME.IsVisible = true;
            HEADAPPROVEDBYNAME.ReadOnly = true;
            HEADAPPROVEDBYNAME.BestFit();
            rgv_ReportDLHR.Columns.Add(HEADAPPROVEDBYNAME);

            GridViewTextBoxColumn HEADAPPROVEDDATE = new GridViewTextBoxColumn();
            HEADAPPROVEDDATE.Name = "HEADAPPROVEDDATE";
            HEADAPPROVEDDATE.FieldName = "HEADAPPROVEDDATE";
            HEADAPPROVEDDATE.HeaderText = "วันที่อนุมัติ";
            HEADAPPROVEDDATE.IsVisible = true;
            HEADAPPROVEDDATE.ReadOnly = true;
            HEADAPPROVEDDATE.BestFit();
            rgv_ReportDLHR.Columns.Add(HEADAPPROVEDDATE);


            GridViewTextBoxColumn HRAPPROVED = new GridViewTextBoxColumn();
            HRAPPROVED.Name = "HRAPPROVED";
            HRAPPROVED.FieldName = "HRAPPROVED";
            HRAPPROVED.HeaderText = "บุคคล";
            HRAPPROVED.IsVisible = true;
            HRAPPROVED.ReadOnly = true;
            HRAPPROVED.BestFit();
            rgv_ReportDLHR.Columns.Add(HRAPPROVED);


            GridViewTextBoxColumn HRAPPROVEDBYNAME = new GridViewTextBoxColumn();
            HRAPPROVEDBYNAME.Name = "HRAPPROVEDBYNAME";
            HRAPPROVEDBYNAME.FieldName = "HRAPPROVEDBYNAME";
            HRAPPROVEDBYNAME.HeaderText = "ผู้อนุมัติ";
            HRAPPROVEDBYNAME.IsVisible = true;
            HRAPPROVEDBYNAME.ReadOnly = true;
            HRAPPROVEDBYNAME.BestFit();
            rgv_ReportDLHR.Columns.Add(HRAPPROVEDBYNAME);

            GridViewTextBoxColumn HRAPPORVEREMARK = new GridViewTextBoxColumn();
            HRAPPORVEREMARK.Name = "HRAPPORVEREMARK";
            HRAPPORVEREMARK.FieldName = "HRAPPORVEREMARK";
            HRAPPORVEREMARK.HeaderText = "หมายเหตุ";
            HRAPPORVEREMARK.IsVisible = true;
            HRAPPORVEREMARK.ReadOnly = true;
            HRAPPORVEREMARK.BestFit();
            rgv_ReportDLHR.Columns.Add(HRAPPORVEREMARK);

            GridViewTextBoxColumn HRAPPROVEDDATE = new GridViewTextBoxColumn();
            HRAPPROVEDDATE.Name = "HRAPPROVEDDATE";
            HRAPPROVEDDATE.FieldName = "HRAPPROVEDDATE";
            HRAPPROVEDDATE.HeaderText = "วันที่อนุมัติ";
            HRAPPROVEDDATE.IsVisible = true;
            HRAPPROVEDDATE.ReadOnly = true;
            HRAPPROVEDDATE.BestFit();
            rgv_ReportDLHR.Columns.Add(HRAPPROVEDDATE);
            #endregion

            #region DS
            this.rgv_ReportDSHR.Dock = DockStyle.Fill;
            this.rgv_ReportDSHR.ReadOnly = true;
            this.rgv_ReportDSHR.AutoGenerateColumns = true;
            this.rgv_ReportDSHR.EnableFiltering = false;
            this.rgv_ReportDSHR.AllowAddNewRow = false;
            this.rgv_ReportDSHR.MasterTemplate.AutoGenerateColumns = false;
            this.rgv_ReportDSHR.ShowGroupedColumns = true;
            this.rgv_ReportDSHR.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            this.rgv_ReportDSHR.EnableHotTracking = true;
            this.rgv_ReportDSHR.AutoSizeRows = true;
            this.rgv_ReportDSHR.Visible = false;

            GridViewTextBoxColumn DOCID_DS = new GridViewTextBoxColumn();
            DOCID_DS.Name = "DOCID";
            DOCID_DS.FieldName = "DOCID";
            DOCID_DS.HeaderText = "เลขที่เอกสาร";
            DOCID_DS.IsVisible = true;
            DOCID_DS.ReadOnly = true;
            DOCID_DS.BestFit();
            rgv_ReportDSHR.Columns.Add(DOCID_DS);

            GridViewTextBoxColumn EMPLID_DS = new GridViewTextBoxColumn();
            EMPLID_DS.Name = "EMPLID";
            EMPLID_DS.FieldName = "EMPLID";
            EMPLID_DS.HeaderText = "รหัส";
            EMPLID_DS.IsVisible = true;
            EMPLID_DS.ReadOnly = true;
            EMPLID_DS.BestFit();
            rgv_ReportDSHR.Columns.Add(EMPLID_DS);

            GridViewTextBoxColumn EMPLNAME_DS = new GridViewTextBoxColumn();
            EMPLNAME_DS.Name = "EMPLNAME";
            EMPLNAME_DS.FieldName = "EMPLNAME";
            EMPLNAME_DS.HeaderText = "ชื่อ";
            EMPLNAME_DS.IsVisible = true;
            EMPLNAME_DS.ReadOnly = true;
            EMPLNAME_DS.BestFit();
            rgv_ReportDSHR.Columns.Add(EMPLNAME_DS);

            GridViewTextBoxColumn SECTIONNAME_DS = new GridViewTextBoxColumn();
            SECTIONNAME_DS.Name = "SECTIONNAME";
            SECTIONNAME_DS.FieldName = "SECTIONNAME";
            SECTIONNAME_DS.HeaderText = "แผนก";
            SECTIONNAME_DS.IsVisible = true;
            SECTIONNAME_DS.ReadOnly = true;
            SECTIONNAME_DS.BestFit();
            rgv_ReportDSHR.Columns.Add(SECTIONNAME_DS);

            GridViewTextBoxColumn DEPTNAME_DS = new GridViewTextBoxColumn();
            DEPTNAME_DS.Name = "DEPTNAME";
            DEPTNAME_DS.FieldName = "DEPTNAME";
            DEPTNAME_DS.HeaderText = "ตำแหน่ง";
            DEPTNAME_DS.IsVisible = true;
            DEPTNAME_DS.ReadOnly = true;
            DEPTNAME_DS.BestFit();
            rgv_ReportDSHR.Columns.Add(DEPTNAME_DS);

            GridViewTextBoxColumn TYPDESC_DS = new GridViewTextBoxColumn();
            TYPDESC_DS.Name = "TYPDESC";
            TYPDESC_DS.FieldName = "TYPDESC";
            TYPDESC_DS.HeaderText = "เอกสารยกเลิก";
            TYPDESC_DS.IsVisible = true;
            TYPDESC_DS.ReadOnly = true;
            TYPDESC_DS.BestFit();
            rgv_ReportDSHR.Columns.Add(TYPDESC_DS);

            GridViewTextBoxColumn DOCREFER_DS = new GridViewTextBoxColumn();
            DOCREFER_DS.Name = "DOCREFER";
            DOCREFER_DS.FieldName = "DOCREFER";
            DOCREFER_DS.HeaderText = "เลขที่อ้างอิง";
            DOCREFER_DS.IsVisible = true;
            DOCREFER_DS.ReadOnly = true;
            DOCREFER_DS.BestFit();
            rgv_ReportDSHR.Columns.Add(DOCREFER_DS);

            GridViewTextBoxColumn DATEREFER_DS = new GridViewTextBoxColumn();
            DATEREFER_DS.Name = "DATEREFER";
            DATEREFER_DS.FieldName = "DATEREFER";
            DATEREFER_DS.HeaderText = "วันที่อ้างอิง";
            DATEREFER_DS.IsVisible = true;
            DATEREFER_DS.ReadOnly = true;
            DATEREFER_DS.BestFit();
            rgv_ReportDSHR.Columns.Add(DATEREFER_DS);

            GridViewTextBoxColumn FROMSHIFT_DS = new GridViewTextBoxColumn();
            FROMSHIFT_DS.Name = "FROMSHIFT";
            FROMSHIFT_DS.FieldName = "FROMSHIFT";
            FROMSHIFT_DS.HeaderText = "กะเดิม";
            FROMSHIFT_DS.IsVisible = true;
            FROMSHIFT_DS.ReadOnly = true;
            FROMSHIFT_DS.BestFit();
            rgv_ReportDSHR.Columns.Add(FROMSHIFT_DS);

            GridViewTextBoxColumn TOSHIFT_DS = new GridViewTextBoxColumn();
            TOSHIFT_DS.Name = "TOSHIFT";
            TOSHIFT_DS.FieldName = "TOSHIFT";
            TOSHIFT_DS.HeaderText = "กะใหม่";
            TOSHIFT_DS.IsVisible = true;
            TOSHIFT_DS.ReadOnly = true;
            TOSHIFT_DS.BestFit();
            rgv_ReportDSHR.Columns.Add(TOSHIFT_DS);


            GridViewTextBoxColumn REASON_DS = new GridViewTextBoxColumn();
            REASON_DS.Name = "REASON";
            REASON_DS.FieldName = "REASON";
            REASON_DS.HeaderText = "เหตุผล";
            REASON_DS.IsVisible = true;
            REASON_DS.ReadOnly = true;
            REASON_DS.BestFit();
            rgv_ReportDSHR.Columns.Add(REASON_DS);

            GridViewTextBoxColumn HEADAPPROVED_DS = new GridViewTextBoxColumn();
            HEADAPPROVED_DS.Name = "HEADAPPROVED";
            HEADAPPROVED_DS.FieldName = "HEADAPPROVED";
            HEADAPPROVED_DS.HeaderText = "หน./ผช.";
            HEADAPPROVED_DS.IsVisible = true;
            HEADAPPROVED_DS.ReadOnly = true;
            HEADAPPROVED_DS.BestFit();
            rgv_ReportDSHR.Columns.Add(HEADAPPROVED_DS);

            GridViewTextBoxColumn HEADAPPROVEDBYNAME_DS = new GridViewTextBoxColumn();
            HEADAPPROVEDBYNAME_DS.Name = "HEADAPPROVEDBYNAME";
            HEADAPPROVEDBYNAME_DS.FieldName = "HEADAPPROVEDBYNAME";
            HEADAPPROVEDBYNAME_DS.HeaderText = "ผู้อนุมัติ";
            HEADAPPROVEDBYNAME_DS.IsVisible = true;
            HEADAPPROVEDBYNAME_DS.ReadOnly = true;
            HEADAPPROVEDBYNAME_DS.BestFit();
            rgv_ReportDSHR.Columns.Add(HEADAPPROVEDBYNAME_DS);

            GridViewTextBoxColumn HEADAPPROVEDDATE_DS = new GridViewTextBoxColumn();
            HEADAPPROVEDDATE_DS.Name = "HEADAPPROVEDDATE";
            HEADAPPROVEDDATE_DS.FieldName = "HEADAPPROVEDDATE";
            HEADAPPROVEDDATE_DS.HeaderText = "วันที่อนุมัติ";
            HEADAPPROVEDDATE_DS.IsVisible = true;
            HEADAPPROVEDDATE_DS.ReadOnly = true;
            HEADAPPROVEDDATE_DS.BestFit();
            rgv_ReportDSHR.Columns.Add(HEADAPPROVEDDATE_DS);


            GridViewTextBoxColumn HRAPPROVED_DS = new GridViewTextBoxColumn();
            HRAPPROVED_DS.Name = "HRAPPROVED";
            HRAPPROVED_DS.FieldName = "HRAPPROVED";
            HRAPPROVED_DS.HeaderText = "บุคคล";
            HRAPPROVED_DS.IsVisible = true;
            HRAPPROVED_DS.ReadOnly = true;
            HRAPPROVED_DS.BestFit();
            rgv_ReportDSHR.Columns.Add(HRAPPROVED_DS);


            GridViewTextBoxColumn HRAPPROVEDBYNAME_DS = new GridViewTextBoxColumn();
            HRAPPROVEDBYNAME_DS.Name = "HRAPPROVEDBYNAME";
            HRAPPROVEDBYNAME_DS.FieldName = "HRAPPROVEDBYNAME";
            HRAPPROVEDBYNAME_DS.HeaderText = "ผู้อนุมัติ";
            HRAPPROVEDBYNAME_DS.IsVisible = true;
            HRAPPROVEDBYNAME_DS.ReadOnly = true;
            HRAPPROVEDBYNAME_DS.BestFit();
            rgv_ReportDSHR.Columns.Add(HRAPPROVEDBYNAME_DS);

            GridViewTextBoxColumn HRAPPORVEREMARK_DS = new GridViewTextBoxColumn();
            HRAPPORVEREMARK_DS.Name = "HRAPPORVEREMARK";
            HRAPPORVEREMARK_DS.FieldName = "HRAPPORVEREMARK";
            HRAPPORVEREMARK_DS.HeaderText = "หมายเหตุ";
            HRAPPORVEREMARK_DS.IsVisible = true;
            HRAPPORVEREMARK_DS.ReadOnly = true;
            HRAPPORVEREMARK_DS.BestFit();
            rgv_ReportDSHR.Columns.Add(HRAPPORVEREMARK_DS);

            GridViewTextBoxColumn HRAPPROVEDDATE_DS = new GridViewTextBoxColumn();
            HRAPPROVEDDATE_DS.Name = "HRAPPROVEDDATE";
            HRAPPROVEDDATE_DS.FieldName = "HRAPPROVEDDATE";
            HRAPPROVEDDATE_DS.HeaderText = "วันที่อนุมัติ";
            HRAPPROVEDDATE_DS.IsVisible = true;
            HRAPPROVEDDATE_DS.ReadOnly = true;
            HRAPPROVEDDATE_DS.BestFit();
            rgv_ReportDSHR.Columns.Add(HRAPPROVEDDATE_DS);
            #endregion

            #region CHD
            this.rgv_ReportCHDHR.Dock = DockStyle.Fill;
            this.rgv_ReportCHDHR.ReadOnly = true;
            this.rgv_ReportCHDHR.AutoGenerateColumns = true;
            this.rgv_ReportCHDHR.EnableFiltering = false;
            this.rgv_ReportCHDHR.AllowAddNewRow = false;
            this.rgv_ReportCHDHR.MasterTemplate.AutoGenerateColumns = false;
            this.rgv_ReportCHDHR.ShowGroupedColumns = true;
            this.rgv_ReportCHDHR.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            this.rgv_ReportCHDHR.EnableHotTracking = true;
            this.rgv_ReportCHDHR.AutoSizeRows = true;
            this.rgv_ReportCHDHR.Visible = false;

            GridViewTextBoxColumn DOCID_CHD = new GridViewTextBoxColumn();
            DOCID_CHD.Name = "DOCID";
            DOCID_CHD.FieldName = "DOCID";
            DOCID_CHD.HeaderText = "เลขที่เอกสาร";
            DOCID_CHD.IsVisible = true;
            DOCID_CHD.ReadOnly = true;
            DOCID_CHD.BestFit();
            rgv_ReportCHDHR.Columns.Add(DOCID_CHD);


            GridViewTextBoxColumn EMPLID_CHD = new GridViewTextBoxColumn();
            EMPLID_CHD.Name = "EMPLID";
            EMPLID_CHD.FieldName = "EMPLID";
            EMPLID_CHD.HeaderText = "รหัส";
            EMPLID_CHD.IsVisible = true;
            EMPLID_CHD.ReadOnly = true;
            EMPLID_CHD.BestFit();
            rgv_ReportCHDHR.Columns.Add(EMPLID_CHD);

            GridViewTextBoxColumn EMPLNAME_CHD = new GridViewTextBoxColumn();
            EMPLNAME_CHD.Name = "EMPLNAME";
            EMPLNAME_CHD.FieldName = "EMPLNAME";
            EMPLNAME_CHD.HeaderText = "ชื่อ";
            EMPLNAME_CHD.IsVisible = true;
            EMPLNAME_CHD.ReadOnly = true;
            EMPLNAME_DS.BestFit();
            rgv_ReportCHDHR.Columns.Add(EMPLNAME_CHD);

            GridViewTextBoxColumn SECTIONNAME_CHD = new GridViewTextBoxColumn();
            SECTIONNAME_CHD.Name = "SECTIONNAME";
            SECTIONNAME_CHD.FieldName = "SECTIONNAME";
            SECTIONNAME_CHD.HeaderText = "แผนก";
            SECTIONNAME_CHD.IsVisible = true;
            SECTIONNAME_CHD.ReadOnly = true;
            SECTIONNAME_CHD.BestFit();
            rgv_ReportCHDHR.Columns.Add(SECTIONNAME_CHD);

            GridViewTextBoxColumn DEPTNAME_CHD = new GridViewTextBoxColumn();
            DEPTNAME_CHD.Name = "DEPTNAME";
            DEPTNAME_CHD.FieldName = "DEPTNAME";
            DEPTNAME_CHD.HeaderText = "ตำแหน่ง";
            DEPTNAME_CHD.IsVisible = true;
            DEPTNAME_CHD.ReadOnly = true;
            DEPTNAME_CHD.BestFit();
            rgv_ReportCHDHR.Columns.Add(DEPTNAME_CHD);

            GridViewTextBoxColumn TYPDESC_CHD = new GridViewTextBoxColumn();
            TYPDESC_CHD.Name = "TYPDESC";
            TYPDESC_CHD.FieldName = "TYPDESC";
            TYPDESC_CHD.HeaderText = "เอกสารยกเลิก";
            TYPDESC_CHD.IsVisible = true;
            TYPDESC_CHD.ReadOnly = true;
            TYPDESC_CHD.BestFit();
            rgv_ReportCHDHR.Columns.Add(TYPDESC_CHD);

            GridViewTextBoxColumn DOCREFER_CHD = new GridViewTextBoxColumn();
            DOCREFER_CHD.Name = "DOCREFER";
            DOCREFER_CHD.FieldName = "DOCREFER";
            DOCREFER_CHD.HeaderText = "เลขที่อ้างอิง";
            DOCREFER_CHD.IsVisible = true;
            DOCREFER_CHD.ReadOnly = true;
            DOCREFER_CHD.BestFit();
            rgv_ReportCHDHR.Columns.Add(DOCREFER_CHD);

            GridViewTextBoxColumn DATEREFER_CHD = new GridViewTextBoxColumn();
            DATEREFER_CHD.Name = "DATEREFER";
            DATEREFER_CHD.FieldName = "DATEREFER";
            DATEREFER_CHD.HeaderText = "วันที่หยุด";
            DATEREFER_CHD.IsVisible = true;
            DATEREFER_CHD.ReadOnly = true;
            DATEREFER_CHD.BestFit();
            rgv_ReportCHDHR.Columns.Add(DATEREFER_CHD);

            GridViewTextBoxColumn EMPLSHIFT_CHD = new GridViewTextBoxColumn();
            EMPLSHIFT_CHD.Name = "EMPLSHIFT";
            EMPLSHIFT_CHD.FieldName = "EMPLSHIFT";
            EMPLSHIFT_CHD.HeaderText = "กะเดิมวันที่หยุด";
            EMPLSHIFT_CHD.IsVisible = true;
            EMPLSHIFT_CHD.ReadOnly = true;
            EMPLSHIFT_CHD.BestFit();
            rgv_ReportCHDHR.Columns.Add(EMPLSHIFT_CHD);

            GridViewTextBoxColumn FROMHOLIDAY_CHD = new GridViewTextBoxColumn();
            FROMHOLIDAY_CHD.Name = "FROMHOLIDAY_CHD";
            FROMHOLIDAY_CHD.FieldName = "FROMHOLIDAY_CHD";
            FROMHOLIDAY_CHD.HeaderText = "วันที่มาทำ";
            FROMHOLIDAY_CHD.IsVisible = true;
            FROMHOLIDAY_CHD.ReadOnly = true;
            FROMHOLIDAY_CHD.BestFit();
            rgv_ReportCHDHR.Columns.Add(FROMHOLIDAY_CHD);

            GridViewTextBoxColumn REASON_CHD = new GridViewTextBoxColumn();
            REASON_CHD.Name = "REASON";
            REASON_CHD.FieldName = "REASON";
            REASON_CHD.HeaderText = "เหตุผล";
            REASON_CHD.IsVisible = true;
            REASON_CHD.ReadOnly = true;
            REASON_CHD.BestFit();
            rgv_ReportCHDHR.Columns.Add(REASON_CHD);

            GridViewTextBoxColumn HEADAPPROVED_CHD = new GridViewTextBoxColumn();
            HEADAPPROVED_CHD.Name = "HEADAPPROVED";
            HEADAPPROVED_CHD.FieldName = "HEADAPPROVED";
            HEADAPPROVED_CHD.HeaderText = "หน./ผช.";
            HEADAPPROVED_CHD.IsVisible = true;
            HEADAPPROVED_CHD.ReadOnly = true;
            HEADAPPROVED_CHD.BestFit();
            rgv_ReportCHDHR.Columns.Add(HEADAPPROVED_CHD);

            GridViewTextBoxColumn HEADAPPROVEDBYNAME_CHD = new GridViewTextBoxColumn();
            HEADAPPROVEDBYNAME_CHD.Name = "HEADAPPROVEDBYNAME";
            HEADAPPROVEDBYNAME_CHD.FieldName = "HEADAPPROVEDBYNAME";
            HEADAPPROVEDBYNAME_CHD.HeaderText = "ผู้อนุมัติ";
            HEADAPPROVEDBYNAME_CHD.IsVisible = true;
            HEADAPPROVEDBYNAME_CHD.ReadOnly = true;
            HEADAPPROVEDBYNAME_CHD.BestFit();
            rgv_ReportCHDHR.Columns.Add(HEADAPPROVEDBYNAME_CHD);

            GridViewTextBoxColumn HEADAPPROVEDDATE_CHD = new GridViewTextBoxColumn();
            HEADAPPROVEDDATE_CHD.Name = "HEADAPPROVEDDATE";
            HEADAPPROVEDDATE_CHD.FieldName = "HEADAPPROVEDDATE";
            HEADAPPROVEDDATE_CHD.HeaderText = "วันที่อนุมัติ";
            HEADAPPROVEDDATE_CHD.IsVisible = true;
            HEADAPPROVEDDATE_CHD.ReadOnly = true;
            HEADAPPROVEDDATE_CHD.BestFit();
            rgv_ReportCHDHR.Columns.Add(HEADAPPROVEDDATE_CHD);


            GridViewTextBoxColumn HRAPPROVED_CHD = new GridViewTextBoxColumn();
            HRAPPROVED_CHD.Name = "HRAPPROVED";
            HRAPPROVED_CHD.FieldName = "HRAPPROVED";
            HRAPPROVED_CHD.HeaderText = "บุคคล";
            HRAPPROVED_CHD.IsVisible = true;
            HRAPPROVED_CHD.ReadOnly = true;
            HRAPPROVED_CHD.BestFit();
            rgv_ReportCHDHR.Columns.Add(HRAPPROVED_CHD);


            GridViewTextBoxColumn HRAPPROVEDBYNAME_CHD = new GridViewTextBoxColumn();
            HRAPPROVEDBYNAME_CHD.Name = "HRAPPROVEDBYNAME";
            HRAPPROVEDBYNAME_CHD.FieldName = "HRAPPROVEDBYNAME";
            HRAPPROVEDBYNAME_CHD.HeaderText = "ผู้อนุมัติ";
            HRAPPROVEDBYNAME_CHD.IsVisible = true;
            HRAPPROVEDBYNAME_CHD.ReadOnly = true;
            HRAPPROVEDBYNAME_CHD.BestFit();
            rgv_ReportCHDHR.Columns.Add(HRAPPROVEDBYNAME_CHD);

            GridViewTextBoxColumn HRAPPORVEREMARK_CHD = new GridViewTextBoxColumn();
            HRAPPORVEREMARK_CHD.Name = "HRAPPORVEREMARK";
            HRAPPORVEREMARK_CHD.FieldName = "HRAPPORVEREMARK";
            HRAPPORVEREMARK_CHD.HeaderText = "หมายเหตุ";
            HRAPPORVEREMARK_CHD.IsVisible = true;
            HRAPPORVEREMARK_CHD.ReadOnly = true;
            HRAPPORVEREMARK_CHD.BestFit();
            rgv_ReportCHDHR.Columns.Add(HRAPPORVEREMARK_CHD);

            GridViewTextBoxColumn HRAPPROVEDDATE_CHD = new GridViewTextBoxColumn();
            HRAPPROVEDDATE_CHD.Name = "HRAPPROVEDDATE";
            HRAPPROVEDDATE_CHD.FieldName = "HRAPPROVEDDATE";
            HRAPPROVEDDATE_CHD.HeaderText = "วันที่อนุมัติ";
            HRAPPROVEDDATE_CHD.IsVisible = true;
            HRAPPROVEDDATE_CHD.ReadOnly = true;
            HRAPPROVEDDATE_CHD.BestFit();
            rgv_ReportCHDHR.Columns.Add(HRAPPROVEDDATE_CHD);

            #endregion
        }
Beispiel #18
0
        private void InitializeDataGridView()
        {
            #region SetDataGrid

            this.rgv_EmpData.Dock = DockStyle.Fill;
            this.rgv_EmpData.ReadOnly = true;
            this.rgv_EmpData.AutoGenerateColumns = true;
            this.rgv_EmpData.EnableFiltering = false;
            this.rgv_EmpData.AllowAddNewRow = false;
            this.rgv_EmpData.MasterTemplate.AutoGenerateColumns = false;
            this.rgv_EmpData.ShowGroupedColumns = true;
            this.rgv_EmpData.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            this.rgv_EmpData.EnableHotTracking = true;
            this.rgv_EmpData.AutoSizeRows = true;

            GridViewTextBoxColumn COUNTDOC = new GridViewTextBoxColumn();
            COUNTDOC.Name = "COUNTDOC";
            COUNTDOC.FieldName = "COUNTDOC";
            COUNTDOC.HeaderText = "ลำดับ";
            COUNTDOC.IsVisible = true;
            COUNTDOC.ReadOnly = true;
            COUNTDOC.BestFit();
            rgv_EmpData.Columns.Add(COUNTDOC);

            GridViewTextBoxColumn FROMHOLIDAY = new GridViewTextBoxColumn();
            FROMHOLIDAY.Name = "FROMHOLIDAY";
            FROMHOLIDAY.FieldName = "FROMHOLIDAY";
            FROMHOLIDAY.HeaderText = "วันที่มาทำ";
            FROMHOLIDAY.IsVisible = true;
            FROMHOLIDAY.ReadOnly = true;
            FROMHOLIDAY.BestFit();
            rgv_EmpData.Columns.Add(FROMHOLIDAY);

            GridViewTextBoxColumn TOSHIFTID = new GridViewTextBoxColumn();
            TOSHIFTID.Name = "TOSHIFTID";
            TOSHIFTID.FieldName = "TOSHIFTID";
            TOSHIFTID.HeaderText = "กะที่มาทำ";
            TOSHIFTID.IsVisible = true;
            TOSHIFTID.ReadOnly = true;
            TOSHIFTID.BestFit();
            rgv_EmpData.Columns.Add(TOSHIFTID);


            GridViewTextBoxColumn TOSHIFTDESC = new GridViewTextBoxColumn();
            TOSHIFTDESC.Name = "TOSHIFTDESC";
            TOSHIFTDESC.FieldName = "TOSHIFTDESC";
            TOSHIFTDESC.HeaderText = "คำอธิบาย";
            TOSHIFTDESC.IsVisible = true;
            TOSHIFTDESC.ReadOnly = true;
            TOSHIFTDESC.BestFit();
            rgv_EmpData.Columns.Add(TOSHIFTDESC);

            GridViewTextBoxColumn TOHOLIDAY = new GridViewTextBoxColumn();
            TOHOLIDAY.Name = "TOHOLIDAY";
            TOHOLIDAY.FieldName = "TOHOLIDAY";
            TOHOLIDAY.HeaderText = "วันที่หยุด";
            TOHOLIDAY.IsVisible = true;
            TOHOLIDAY.ReadOnly = true;
            TOHOLIDAY.BestFit();
            rgv_EmpData.Columns.Add(TOHOLIDAY);

            GridViewTextBoxColumn REASON = new GridViewTextBoxColumn();
            REASON.Name = "REASON";
            REASON.FieldName = "REASON";
            REASON.HeaderText = "เหตุผล";
            REASON.IsVisible = true;
            REASON.ReadOnly = true;
            REASON.BestFit();
            rgv_EmpData.Columns.Add(REASON);

            GridViewTextBoxColumn TRANSDATE = new GridViewTextBoxColumn();
            TRANSDATE.Name = "TRANSDATE";
            TRANSDATE.FieldName = "TRANSDATE";
            TRANSDATE.HeaderText = "วันที่บันทึก";
            TRANSDATE.IsVisible = true;
            TRANSDATE.ReadOnly = true;
            TRANSDATE.BestFit();
            rgv_EmpData.Columns.Add(TRANSDATE);

            #endregion
        }
Beispiel #19
0
        void InitiazaGridView()
        {
            #region radGridView
            // GridData 
            this.rgv_ApproveMN.Dock = DockStyle.Fill;
            this.rgv_ApproveMN.ReadOnly = true;
            this.rgv_ApproveMN.AutoGenerateColumns = true;
            this.rgv_ApproveMN.EnableFiltering = false;
            this.rgv_ApproveMN.AllowAddNewRow = false;
            this.rgv_ApproveMN.MasterTemplate.AutoGenerateColumns = false;
            this.rgv_ApproveMN.ShowGroupedColumns = true;
            this.rgv_ApproveMN.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            this.rgv_ApproveMN.EnableHotTracking = true;
            this.rgv_ApproveMN.AutoSizeRows = true;

            GridViewTextBoxColumn DOCID = new GridViewTextBoxColumn();
            DOCID.Name = "DOCID";
            DOCID.FieldName = "DOCID";
            DOCID.HeaderText = "เลขที่เอกสาร";
            DOCID.IsVisible = true;
            DOCID.ReadOnly = true;
            DOCID.BestFit();
            rgv_ApproveMN.Columns.Add(DOCID);



            GridViewTextBoxColumn DOCSTAT = new GridViewTextBoxColumn();
            DOCSTAT.Name = "DOCSTAT";
            DOCSTAT.FieldName = "DOCSTAT";
            DOCSTAT.HeaderText = "สถานะเอกสาร";
            DOCSTAT.IsVisible = true;
            DOCSTAT.ReadOnly = true;
            DOCSTAT.BestFit();
            rgv_ApproveMN.Columns.Add(DOCSTAT);

            GridViewTextBoxColumn EMPLNAME = new GridViewTextBoxColumn();
            EMPLNAME.Name = "EMPLNAME";
            EMPLNAME.FieldName = "EMPLNAME";
            EMPLNAME.HeaderText = "ชื่อ";
            EMPLNAME.IsVisible = true;
            EMPLNAME.ReadOnly = true;
            EMPLNAME.BestFit();
            rgv_ApproveMN.Columns.Add(EMPLNAME);

            GridViewTextBoxColumn DEPTNAME = new GridViewTextBoxColumn();
            DEPTNAME.Name = "DEPTNAME";
            DEPTNAME.FieldName = "DEPTNAME";
            DEPTNAME.HeaderText = "ตำแหน่ง";
            DEPTNAME.IsVisible = true;
            DEPTNAME.ReadOnly = true;
            DEPTNAME.BestFit();
            rgv_ApproveMN.Columns.Add(DEPTNAME);


            GridViewTextBoxColumn HEADAPPROVED = new GridViewTextBoxColumn();
            HEADAPPROVED.Name = "HEADAPPROVED";
            HEADAPPROVED.FieldName = "HEADAPPROVED";
            HEADAPPROVED.HeaderText = "หน./ผช.";
            HEADAPPROVED.IsVisible = true;
            HEADAPPROVED.ReadOnly = true;
            HEADAPPROVED.BestFit();
            rgv_ApproveMN.Columns.Add(HEADAPPROVED);

            GridViewTextBoxColumn HEADAPPROVEDBYNAME = new GridViewTextBoxColumn();
            HEADAPPROVEDBYNAME.Name = "HEADAPPROVEDBYNAME";
            HEADAPPROVEDBYNAME.FieldName = "HEADAPPROVEDBYNAME";
            HEADAPPROVEDBYNAME.HeaderText = "ผู้อนุมัติ";
            HEADAPPROVEDBYNAME.IsVisible = true;
            HEADAPPROVEDBYNAME.ReadOnly = true;
            HEADAPPROVEDBYNAME.BestFit();
            rgv_ApproveMN.Columns.Add(HEADAPPROVEDBYNAME);


            GridViewTextBoxColumn HRAPPROVED = new GridViewTextBoxColumn();
            HRAPPROVED.Name = "HRAPPROVED";
            HRAPPROVED.FieldName = "HRAPPROVED";
            HRAPPROVED.HeaderText = "บุคคล";
            HRAPPROVED.IsVisible = true;
            HRAPPROVED.ReadOnly = true;
            HRAPPROVED.BestFit();
            rgv_ApproveMN.Columns.Add(HRAPPROVED);


            GridViewTextBoxColumn HRAPPROVEDBYNAME = new GridViewTextBoxColumn();
            HRAPPROVEDBYNAME.Name = "HRAPPROVEDBYNAME";
            HRAPPROVEDBYNAME.FieldName = "HRAPPROVEDBYNAME";
            HRAPPROVEDBYNAME.HeaderText = "ผู้อนุมัติ";
            HRAPPROVEDBYNAME.IsVisible = true;
            HRAPPROVEDBYNAME.ReadOnly = true;
            HRAPPROVEDBYNAME.BestFit();
            rgv_ApproveMN.Columns.Add(HRAPPROVEDBYNAME);


            

            GridViewCommandColumn ApproveButton = new GridViewCommandColumn();
            ApproveButton.Name = "ApproveButton";
            ApproveButton.FieldName = "ApproveButton";
            ApproveButton.HeaderText = "อนุมัติ";
            rgv_ApproveMN.Columns.Add(ApproveButton);

            GridViewTextBoxColumn TRANSDATE = new GridViewTextBoxColumn();
            TRANSDATE.Name = "TRANSDATE";
            TRANSDATE.FieldName = "TRANSDATE";
            TRANSDATE.HeaderText = "วันที่สร้าง";
            TRANSDATE.IsVisible = false;
            TRANSDATE.ReadOnly = true;
            TRANSDATE.BestFit();
            rgv_ApproveMN.Columns.Add(TRANSDATE);
            #endregion
        }
Beispiel #20
0
        void InitializeGridView()
        {

            this.GridViewShowData.Dock = DockStyle.Fill;
            this.GridViewShowData.ReadOnly = true;
            this.GridViewShowData.AutoGenerateColumns = true;
            this.GridViewShowData.EnableFiltering = false;
            this.GridViewShowData.AllowAddNewRow = false;
            this.GridViewShowData.MasterTemplate.AutoGenerateColumns = false;
            this.GridViewShowData.ShowGroupedColumns = true;
            this.GridViewShowData.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            this.GridViewShowData.EnableHotTracking = true;
            this.GridViewShowData.AutoSizeRows = true;

            GridViewTextBoxColumn OutOfficeId = new GridViewTextBoxColumn();
            OutOfficeId.Name = "OutOfficeId";
            OutOfficeId.FieldName = "OutOfficeId";
            OutOfficeId.HeaderText = "จำนวน";
            OutOfficeId.Width = 15;
            OutOfficeId.IsVisible = true;
            OutOfficeId.ReadOnly = true;
            OutOfficeId.BestFit();
            GridViewShowData.Columns.Add(OutOfficeId);

            GridViewTextBoxColumn EmplId = new GridViewTextBoxColumn();
            EmplId.Name = "EmplId";
            EmplId.FieldName = "EmplId";
            EmplId.HeaderText = "รหัสพนักงาน";
            EmplId.Width = 30;
            EmplId.IsVisible = true;
            EmplId.ReadOnly = true;
            EmplId.BestFit();
            GridViewShowData.Columns.Add(EmplId);

            GridViewTextBoxColumn EmplFullName = new GridViewTextBoxColumn();
            EmplFullName.Name = "EmplFullName";
            EmplFullName.FieldName = "EmplFullName";
            EmplFullName.HeaderText = "ชื่อ-สกุล";
            EmplFullName.IsVisible = true;
            EmplFullName.ReadOnly = true;
            EmplFullName.BestFit();
            GridViewShowData.Columns.Add(EmplFullName);

            GridViewTextBoxColumn Dimention = new GridViewTextBoxColumn();
            Dimention.Name = "Dimention";
            Dimention.FieldName = "Dimention";
            Dimention.HeaderText = "แผนก";
            Dimention.IsVisible = true;
            Dimention.ReadOnly = true;
            Dimention.BestFit();
            GridViewShowData.Columns.Add(Dimention);
        }
Beispiel #21
0
        private void InitializeradGridview()
        {

            rgv_changholiday.Dock = DockStyle.Fill;
            rgv_changholiday.AutoGenerateColumns = true;
            rgv_changholiday.EnableFiltering = false;
            rgv_changholiday.AllowAddNewRow = false;
            rgv_changholiday.MasterTemplate.AutoGenerateColumns = false;
            rgv_changholiday.ShowGroupedColumns = true;
            rgv_changholiday.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            rgv_changholiday.EnableHotTracking = true;
            rgv_changholiday.AutoSizeRows = true;

            GridViewTextBoxColumn FROMHOLIDAY = new GridViewTextBoxColumn();
            FROMHOLIDAY.Name = "FROMHOLIDAY";
            FROMHOLIDAY.FieldName = "FROMHOLIDAY";
            FROMHOLIDAY.HeaderText = "วันที่มาทำ";
            FROMHOLIDAY.IsVisible = true;
            FROMHOLIDAY.ReadOnly = true;
            FROMHOLIDAY.BestFit();
            rgv_changholiday.Columns.Add(FROMHOLIDAY);

            GridViewTextBoxColumn TOSHIFTID = new GridViewTextBoxColumn();
            TOSHIFTID.Name = "TOSHIFTID";
            TOSHIFTID.FieldName = "TOSHIFTID";
            TOSHIFTID.HeaderText = "รหัสกะ";
            TOSHIFTID.IsVisible = true;
            TOSHIFTID.ReadOnly = true;
            TOSHIFTID.BestFit();
            rgv_changholiday.Columns.Add(TOSHIFTID);

            GridViewTextBoxColumn TOSHIFTDESC = new GridViewTextBoxColumn();
            TOSHIFTDESC.Name = "TOSHIFTDESC";
            TOSHIFTDESC.FieldName = "TOSHIFTDESC";
            TOSHIFTDESC.HeaderText = "คำอธิบาย";
            TOSHIFTDESC.IsVisible = true;
            TOSHIFTDESC.ReadOnly = true;
            TOSHIFTDESC.BestFit();
            rgv_changholiday.Columns.Add(TOSHIFTDESC);

            GridViewTextBoxColumn TOHOLIDAY = new GridViewTextBoxColumn();
            TOHOLIDAY.Name = "TOHOLIDAY";
            TOHOLIDAY.FieldName = "TOHOLIDAY";
            TOHOLIDAY.HeaderText = "วันที่หยุด";
            TOHOLIDAY.IsVisible = true;
            TOHOLIDAY.ReadOnly = true;
            TOHOLIDAY.BestFit();
            rgv_changholiday.Columns.Add(TOHOLIDAY);

            GridViewTextBoxColumn REASON = new GridViewTextBoxColumn();
            REASON.Name = "REASON";
            REASON.FieldName = "REASON";
            REASON.HeaderText = "เหตุผล";
            REASON.IsVisible = true;
            REASON.ReadOnly = true;
            REASON.BestFit();
            rgv_changholiday.Columns.Add(REASON);

            GridViewCommandColumn BTDELETE = new GridViewCommandColumn();
            BTDELETE.Name = "BTDELETE";
            BTDELETE.HeaderText = "ยกเลิก";
            BTDELETE.Width = 20;
            rgv_changholiday.Columns.Add(BTDELETE);

        }
Beispiel #22
0
        void InitializeGridVeiw()
        {
            // GridData 
            this.rgv_ApproveHR.Dock = DockStyle.Fill;
            this.rgv_ApproveHR.ReadOnly = true;
            this.rgv_ApproveHR.AutoGenerateColumns = true;
            this.rgv_ApproveHR.EnableFiltering = false;
            this.rgv_ApproveHR.AllowAddNewRow = false;
            this.rgv_ApproveHR.MasterTemplate.AutoGenerateColumns = false;
            this.rgv_ApproveHR.ShowGroupedColumns = true;
            this.rgv_ApproveHR.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            this.rgv_ApproveHR.EnableHotTracking = true;
            this.rgv_ApproveHR.AutoSizeRows = true;

            GridViewTextBoxColumn DOCID = new GridViewTextBoxColumn();
            DOCID.Name = "DOCID";
            DOCID.FieldName = "DOCID";
            DOCID.HeaderText = "เลขที่เอกสาร";
            DOCID.IsVisible = true;
            DOCID.ReadOnly = true;
            DOCID.BestFit();
            rgv_ApproveHR.Columns.Add(DOCID);

            GridViewTextBoxColumn DOCSTAT = new GridViewTextBoxColumn();
            DOCSTAT.Name = "DOCSTAT";
            DOCSTAT.FieldName = "DOCSTAT";
            DOCSTAT.HeaderText = "สถานะเอกสาร";
            DOCSTAT.IsVisible = true;
            DOCSTAT.ReadOnly = true;
            DOCSTAT.BestFit();
            rgv_ApproveHR.Columns.Add(DOCSTAT);

            GridViewTextBoxColumn CREATEDNAME = new GridViewTextBoxColumn();
            CREATEDNAME.Name = "CREATEDNAME";
            CREATEDNAME.FieldName = "CREATEDNAME";
            CREATEDNAME.HeaderText = "ผู้สร้าง";
            CREATEDNAME.IsVisible = true;
            CREATEDNAME.ReadOnly = true;
            CREATEDNAME.BestFit();
            rgv_ApproveHR.Columns.Add(CREATEDNAME);

            GridViewTextBoxColumn MODIFIEDDATE = new GridViewTextBoxColumn();
            MODIFIEDDATE.Name = "MODIFIEDDATE";
            MODIFIEDDATE.FieldName = "MODIFIEDDATE";
            MODIFIEDDATE.HeaderText = "แก้ไขล่าสุด";
            MODIFIEDDATE.IsVisible = true;
            MODIFIEDDATE.ReadOnly = true;
            MODIFIEDDATE.BestFit();
            rgv_ApproveHR.Columns.Add(MODIFIEDDATE);

            GridViewTextBoxColumn EMPLNAME = new GridViewTextBoxColumn();
            EMPLNAME.Name = "EMPLNAME";
            EMPLNAME.FieldName = "EMPLNAME";
            EMPLNAME.HeaderText = "ชื่อ";
            EMPLNAME.IsVisible = true;
            EMPLNAME.ReadOnly = true;
            EMPLNAME.BestFit();
            rgv_ApproveHR.Columns.Add(EMPLNAME);


            GridViewTextBoxColumn HEADAPPROVED = new GridViewTextBoxColumn();
            HEADAPPROVED.Name = "HEADAPPROVED";
            HEADAPPROVED.FieldName = "HEADAPPROVED";
            HEADAPPROVED.HeaderText = "หน./ผช.";
            HEADAPPROVED.IsVisible = true;
            HEADAPPROVED.ReadOnly = true;
            HEADAPPROVED.BestFit();
            rgv_ApproveHR.Columns.Add(HEADAPPROVED);

            GridViewTextBoxColumn HEADAPPROVEDBYNAME = new GridViewTextBoxColumn();
            HEADAPPROVEDBYNAME.Name = "HEADAPPROVEDBYNAME";
            HEADAPPROVEDBYNAME.FieldName = "HEADAPPROVEDBYNAME";
            HEADAPPROVEDBYNAME.HeaderText = "ผู้อนุมัติ";
            HEADAPPROVEDBYNAME.IsVisible = true;
            HEADAPPROVEDBYNAME.ReadOnly = true;
            HEADAPPROVEDBYNAME.BestFit();
            rgv_ApproveHR.Columns.Add(HEADAPPROVEDBYNAME);


            GridViewTextBoxColumn HRAPPROVED = new GridViewTextBoxColumn();
            HRAPPROVED.Name = "HRAPPROVED";
            HRAPPROVED.FieldName = "HRAPPROVED";
            HRAPPROVED.HeaderText = "บุคคล";
            HRAPPROVED.IsVisible = true;
            HRAPPROVED.ReadOnly = true;
            HRAPPROVED.BestFit();
            rgv_ApproveHR.Columns.Add(HRAPPROVED);


            GridViewTextBoxColumn HRAPPROVEDBYNAME = new GridViewTextBoxColumn();
            HRAPPROVEDBYNAME.Name = "HRAPPROVEDBYNAME";
            HRAPPROVEDBYNAME.FieldName = "HRAPPROVEDBYNAME";
            HRAPPROVEDBYNAME.HeaderText = "ผู้อนุมัติ";
            HRAPPROVEDBYNAME.IsVisible = true;
            HRAPPROVEDBYNAME.ReadOnly = true;
            HRAPPROVEDBYNAME.BestFit();
            rgv_ApproveHR.Columns.Add(HRAPPROVEDBYNAME);


            GridViewCommandColumn ApproveButton = new GridViewCommandColumn();
            ApproveButton.Name = "ApproveButton";
            ApproveButton.FieldName = "ApproveButton";
            ApproveButton.HeaderText = "อนุมัติ";
            rgv_ApproveHR.Columns.Add(ApproveButton);
        }
Beispiel #23
0
        public FormAddEmpl()
        {
            InitializeComponent();
            this.btn_save.Click += new EventHandler(btn_save_Click);

            #region GridVied
            this.GridViewShowData.Dock = DockStyle.Fill;
            this.GridViewShowData.ReadOnly = true;
            this.GridViewShowData.AutoGenerateColumns = true;
            this.GridViewShowData.EnableFiltering = false;
            this.GridViewShowData.AllowAddNewRow = false;
            this.GridViewShowData.MasterTemplate.AutoGenerateColumns = false;
            this.GridViewShowData.ShowGroupedColumns = true;
            this.GridViewShowData.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            this.GridViewShowData.EnableHotTracking = true;
            this.GridViewShowData.AutoSizeRows = true;

            GridViewTextBoxColumn PWCARD = new GridViewTextBoxColumn();
            PWCARD.Name = "PWCARD";
            PWCARD.FieldName = "PWCARD";
            PWCARD.HeaderText = "รหัสบัตร";
            PWCARD.IsVisible = false;
            PWCARD.ReadOnly = true;
            PWCARD.BestFit();
            GridViewShowData.Columns.Add(PWCARD);

            GridViewTextBoxColumn PWEMPLOYEE = new GridViewTextBoxColumn();
            PWEMPLOYEE.Name = "PWEMPLOYEE";
            PWEMPLOYEE.FieldName = "PWEMPLOYEE";
            PWEMPLOYEE.HeaderText = "รหัสพนักงาน";
            PWEMPLOYEE.IsVisible = true;
            PWEMPLOYEE.ReadOnly = true;
            PWEMPLOYEE.BestFit();
            GridViewShowData.Columns.Add(PWEMPLOYEE);

            GridViewTextBoxColumn EmplFullName = new GridViewTextBoxColumn();
            EmplFullName.Name = "EmplFullName";
            EmplFullName.FieldName = "EmplFullName";
            EmplFullName.HeaderText = "ชื่อ-สกุล";
            EmplFullName.IsVisible = true;
            EmplFullName.ReadOnly = true;
            EmplFullName.BestFit();
            GridViewShowData.Columns.Add(EmplFullName);


            GridViewTextBoxColumn PWBIRTHDAY = new GridViewTextBoxColumn();
            PWBIRTHDAY.Name = "PWBIRTHDAY";
            PWBIRTHDAY.FieldName = "PWBIRTHDAY";
            PWBIRTHDAY.HeaderText = "วันเกิด";
            PWBIRTHDAY.IsVisible = false;
            PWBIRTHDAY.ReadOnly = true;
            PWBIRTHDAY.BestFit();
            GridViewShowData.Columns.Add(PWBIRTHDAY);

            GridViewTextBoxColumn SECTIONID = new GridViewTextBoxColumn();
            SECTIONID.Name = "SECTIONID";
            SECTIONID.FieldName = "SECTIONID";
            SECTIONID.HeaderText = "รหัสแผนก";
            SECTIONID.IsVisible = false;
            SECTIONID.ReadOnly = true;
            SECTIONID.BestFit();
            GridViewShowData.Columns.Add(SECTIONID);

            GridViewTextBoxColumn SECTION = new GridViewTextBoxColumn();
            SECTION.Name = "SECTION";
            SECTION.FieldName = "SECTION";
            SECTION.HeaderText = "ชื่อแผนก";
            SECTION.IsVisible = true;
            SECTION.ReadOnly = true;
            SECTION.BestFit();
            GridViewShowData.Columns.Add(SECTION);

            GridViewTextBoxColumn DEPTID = new GridViewTextBoxColumn();
            DEPTID.Name = "DEPTID";
            DEPTID.FieldName = "DEPTID";
            DEPTID.HeaderText = "รหัสตำแหน่ง";
            DEPTID.IsVisible = false;
            DEPTID.ReadOnly = true;
            DEPTID.BestFit();
            GridViewShowData.Columns.Add(DEPTID);

            GridViewTextBoxColumn DEPT = new GridViewTextBoxColumn();
            DEPT.Name = "DEPT";
            DEPT.FieldName = "DEPT";
            DEPT.HeaderText = "ตำแหน่ง";
            DEPT.IsVisible = true;
            DEPT.ReadOnly = true;
            DEPT.BestFit();
            GridViewShowData.Columns.Add(DEPT);

            GridViewTextBoxColumn POSITIONID = new GridViewTextBoxColumn();
            POSITIONID.Name = "POSITIONID";
            POSITIONID.FieldName = "POSITIONID";
            POSITIONID.HeaderText = "รหัส";
            POSITIONID.IsVisible = false;
            POSITIONID.ReadOnly = true;
            POSITIONID.BestFit();
            GridViewShowData.Columns.Add(POSITIONID);

            GridViewTextBoxColumn POSITION = new GridViewTextBoxColumn();
            POSITION.Name = "POSITION";
            POSITION.FieldName = "POSITION";
            POSITION.HeaderText = "ชื่อตำแหน่ง";
            POSITION.IsVisible = false;
            POSITION.ReadOnly = true;
            POSITION.BestFit();
            GridViewShowData.Columns.Add(POSITION);
            #endregion

        }