public ActionResult NTDaycalExcel(string startDate = "", string endDate = "")
 {
     // DataTable dt = -- > get your data
     NorthTowerdaycal _Model = new NorthTowerdaycal();
     _Model.StartDate = startDate;
     _Model.EndDate = endDate;
     DataTable dt = (DataTable)ExecuteDB(ERPTask.AG_GetNorthtowerdaycalRecord, _Model);
     ERP.Utility.Excelimport.ExcelFileResult actionResult = new ERP.Utility.Excelimport.ExcelFileResult(dt) { FileDownloadName = "NTDaycalExcel.xls" };
     return actionResult;
 }
 public ActionResult WelformWiseExcel(string EX1 = "", string EX2 = "", string EX3 = "")
 {
     WelformEntity _Model = new WelformEntity();
     _Model.StartDate = EX1;
     _Model.EndDate = EX2;
     _Model.EMPID = EX3;
     DataTable dt = (DataTable)ExecuteDB(ERPTask.AG_GetWelformWiseRecord, _Model);
     ERP.Utility.Excelimport.ExcelFileResult actionResult = new ERP.Utility.Excelimport.ExcelFileResult(dt) { FileDownloadName = "WelformEMPWise.xls" };
     return actionResult;
 }
 public ActionResult MgrwiseExcel(string EX1 = "", string EX2 = "", string EX3 = "")
 {
     // DataTable dt = -- > get your data
     ManagerinfoEntity _Model = new ManagerinfoEntity();
     _Model.StartDate = EX1;
     _Model.EndDate = EX2;
     _Model.EMPID = EX3;
     DataTable dt = (DataTable)ExecuteDB(ERPTask.AG_GetAllManagerInfoRecord, _Model);
     ERP.Utility.Excelimport.ExcelFileResult actionResult = new ERP.Utility.Excelimport.ExcelFileResult(dt) { FileDownloadName = "MgrempwiseExcel.xls" };
     return actionResult;
 }
 //public ActionResult NTEMPExcelReport(string EX1 = "", string EX2 = "", string EX3 = "")
 //{
 //    EmployeewiseEntity _Model = new EmployeewiseEntity();
 //    _Model.StartDate = EX1;
 //    _Model.EndDate = EX2;
 //    _Model.EMPID = EX3;
 //    DataTable dt = (DataTable)ExecuteDB(ERPTask.AG_GetEmployeewiseRecord, _Model);
 //    StringBuilder sb = new StringBuilder();
 //    sb.Append("<table border='" + "2px" + "'b>");
 //    //write column headings
 //    sb.Append("<tr>");
 //    foreach (System.Data.DataColumn dc in dt.Columns)
 //    {
 //        sb.Append("<td><b><font face=Arial size=2>" + dc.ColumnName + "</font></b></td>");
 //    }
 //    sb.Append("</tr>");
 //    foreach (System.Data.DataRow dr in dt.Rows)
 //    {
 //        sb.Append("<tr>");
 //        foreach (System.Data.DataColumn dc in dt.Columns)
 //        {
 //            sb.Append("<td><font face=Arial size=" + "14px" + ">" + dr[dc].ToString() + "</font></td>");
 //        }
 //        sb.Append("</tr>");
 //    }
 //    sb.Append("</table>");
 //    //this.Response.AddHeader("Content-Disposition", "Employees.xls");
 //    this.Response.ContentType = "application/vnd.ms-excel";
 //    byte[] buffer = System.Text.Encoding.UTF8.GetBytes(sb.ToString());
 //    return File(buffer, "application/vnd.ms-excel", "NorthTower.xls");
 //}
 public ActionResult NTEMPExcelReport(string EX1 = "", string EX2 = "", string EX3 = "")
 {
     EmployeewiseEntity _Model = new EmployeewiseEntity();
     _Model.StartDate = EX1;
     _Model.EndDate = EX2;
     _Model.EMPID = EX3;
     DataTable dt = (DataTable)ExecuteDB(ERPTask.AG_GetEmployeewiseRecord, _Model);
     ERP.Utility.Excelimport.ExcelFileResult actionResult = new ERP.Utility.Excelimport.ExcelFileResult(dt) { FileDownloadName = "NTEmployeeWise.xls" };
     return actionResult;
 }
 public ActionResult WelExcelReport(string startDate = "", string endDate = "")
 {
     WelformEntity _Model = new WelformEntity();
     _Model.StartDate = startDate;
     _Model.EndDate = endDate;
     DataTable dt = (DataTable)ExecuteDB(ERPTask.AG_GetWelformRecord, _Model);
     ERP.Utility.Excelimport.ExcelFileResult actionResult = new ERP.Utility.Excelimport.ExcelFileResult(dt) { FileDownloadName = "WelformAttendance.xls" };
     return actionResult;
 }