Example #1
0
 private void BtnPrintReport_Click(object sender, EventArgs e)
 {
     if (ComparisonUtils.IsEmpty(DtStartDate.EditValue))
     {
         ProjectFunctions.SpeakError("Enter Salary Month");
         DtStartDate.Focus();
     }
     else
     {
         Report_Print_Preview("print");
     }
 }
Example #2
0
 private void BtnExportXsls_Click(object sender, EventArgs e)
 {
     if (ComparisonUtils.IsEmpty(DtStartDate.EditValue))
     {
         ProjectFunctions.SpeakError("Enter Salary Month");
         DtStartDate.Focus();
     }
     else
     {
         string path = Application.StartupPath + @"\Salary\" + "Salary_For_Month_" + ConvertTo.DateFormatDb(DtStartDate.EditValue) + ".xlsx";
         XlsxExportOptionsEx options = new XlsxExportOptionsEx();
         options.CustomizeCell += Options_CustomizeCell;
         gridControl_SalaryProcess.ExportToXlsx(path, options);
         ProjectFunctions.Speak("XLS GENERATED");
         Process.Start(path);
     }
 }
        private void BtnLoad_Click(object sender, EventArgs e)
        {
            if (DtStartDate.Text.Trim().Length == 0)
            {
                ProjectFunctions.SpeakError("Invalid MonthYear");
                DtStartDate.Focus();
                return;
            }

            DataSet ds = ProjectFunctions.GetDataSet("sp_LoadAttendenceDateWise '" + Convert.ToDateTime(DtStartDate.EditValue).ToString("yyyy-MM-dd") + "'");

            if (ds.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    dr["working_hours_f"]    = Convert.ToDecimal(ProjectFunctions.TimeFromMinutes(Convert.ToDouble(dr["working_hours"])));
                    dr["ot_deducton_time_f"] = Convert.ToDecimal(ProjectFunctions.TimeFromMinutes(Convert.ToDouble(dr["ot_deducton_time_f"])));
                }
                dt = ds.Tables[0];
                AttendenceGrid.DataSource = dt;
                AttendenceGridView.BestFitColumns();
            }
        }