コード例 #1
0
        public JsonResult GetUserTypeActivityMap()
        {
            DataControl.BLUser      _objBluser      = new DataControl.BLUser();
            DataControl.CurrentInfo _objCurrentInfo = new DataControl.CurrentInfo();

            return(Json(_objBluser.GetUserTypeActivityMapdata(_objCurrentInfo.GetCompanyCode()), JsonRequestBehavior.AllowGet)); //GetUserTypeActivityMaptable(ds);
        }
コード例 #2
0
        /// <summary>
        /// Payslip inheritance
        /// </summary>
        /// <param name="sourceUserTypeCode"></param>
        /// <param name="userTypes"></param>
        /// <returns>copy the payslip meta data from the source region to destination region</returns>
        public int PaySlipInheritance(string sourceUserTypeCode, string userTypes)
        {
            int rowsAffected = 0;

            DataControl.CurrentInfo objCurInfo = new DataControl.CurrentInfo();
            DataControl.BLUser      objUser    = new DataControl.BLUser();
            try
            {
                List <MVCModels.HiDoctor_Master.UserTypeModel> lstUserTypes = new List <MVCModels.HiDoctor_Master.UserTypeModel>();
                if (!string.IsNullOrEmpty(userTypes))
                {
                    string[] arUserTypes;
                    arUserTypes = userTypes.Split('^');
                    for (int i = 0; i < arUserTypes.Length; i++)
                    {
                        if (!string.IsNullOrEmpty(arUserTypes[i]))
                        {
                            MVCModels.HiDoctor_Master.UserTypeModel objUserType = new MVCModels.HiDoctor_Master.UserTypeModel();
                            objUserType.User_Type_Code = Convert.ToString(arUserTypes[i]);
                            objUserType.Company_Code   = objCurInfo.GetCompanyCode();
                            lstUserTypes.Add(objUserType);
                        }
                    }
                }
                rowsAffected = objUser.PaySlipInheritance(objCurInfo.GetCompanyCode(), sourceUserTypeCode, lstUserTypes);
            }
            catch (Exception ex)
            {
                Dictionary <string, string> dicObj = new Dictionary <string, string>();
                dicObj.Add("sourceUserTypeCode", sourceUserTypeCode);
                dicObj.Add("userTypes", userTypes);
                DataControl.Impl.ExceptionHandler.WriteLog(ex: ex, dic: dicObj);
            }
            return(rowsAffected);
        }
コード例 #3
0
        public JsonResult GetActivityDetails()
        {
            DataControl.BLUser      _objBluser      = new DataControl.BLUser();
            DataControl.CurrentInfo _objCurrentInfo = new DataControl.CurrentInfo();
            DataSet ds = new DataSet();

            DataControl.JSONConverter _objJson = new DataControl.JSONConverter();
            ds = _objBluser.GetActivitydetail(_objCurrentInfo.GetCompanyCode());
            return(Json(_objJson.Serialize(ds), JsonRequestBehavior.AllowGet));
        }
コード例 #4
0
        /// <summary>
        /// Get user type which is mapped in the payslip
        /// </summary>
        /// <returns></returns>
        public JsonResult GetPaySlipMappedUserTypes()
        {
            DataControl.CurrentInfo objCurInfo = new DataControl.CurrentInfo();
            DataControl.BLUser      objUser    = new DataControl.BLUser();
            IEnumerable <MVCModels.HiDoctor_Master.UserTypeModel> lstUserType = null;

            lstUserType = objUser.GetPaySlipMappedUserTypes(objCurInfo.GetCompanyCode());
            DataControl.JSONConverter objJson = new DataControl.JSONConverter();
            return(Json(objJson.Serialize(lstUserType)));
        }
コード例 #5
0
        public string DeleteActivity(string activitymapCode)
        {
            string result = "";

            DataControl.BLUser      _objBluser      = new DataControl.BLUser();
            DataControl.CurrentInfo _objCurrentInfo = new DataControl.CurrentInfo();
            int deleteActivity = _objBluser.DeleteMappedActivity(_objCurrentInfo.GetCompanyCode(), activitymapCode);

            result = deleteActivity.ToString();
            return(result);
        }
コード例 #6
0
        /// <summary>
        /// Update payslip meta data
        /// </summary>
        /// <param name="paySlipData"></param>
        /// <param name="userTypeCode"></param>
        /// <returns>returns no of rows updated</returns>
        public int UpdatePaySlipMetaData(string paySlipData, string userTypeCode)
        {
            int rowsAffected = 0;

            try
            {
                DataControl.BLUser      objUser    = new DataControl.BLUser();
                DataControl.CurrentInfo objCurInfo = new DataControl.CurrentInfo();
                rowsAffected = objUser.UpdatePaySlipMetaData(objCurInfo.GetCompanyCode(), paySlipData, userTypeCode);
            }
            catch (Exception ex)
            {
                Dictionary <string, string> dicObj = new Dictionary <string, string>();
                dicObj.Add("userTypeCode", userTypeCode);
                dicObj.Add("paySlipData", paySlipData);
                DataControl.Impl.ExceptionHandler.WriteLog(ex: ex, dic: dicObj);
            }
            return(rowsAffected);
        }
コード例 #7
0
        /// <summary>
        /// Update the payslip meta data status
        /// </summary>
        /// <param name="userTypeCode"></param>
        /// <param name="columnNo"></param>
        /// <param name="status"></param>
        /// <returns>change the status of the selected column</returns>
        public int ChangePaySlipMetadataStatus(string userTypeCode, string columnNo, string status)
        {
            int rowsAffected = 0;

            DataControl.CurrentInfo objCurInfo = new DataControl.CurrentInfo();
            DataControl.BLUser      objUser    = new DataControl.BLUser();
            try
            {
                rowsAffected = objUser.ChangePaySlipMetadataStatus(objCurInfo.GetCompanyCode(), userTypeCode, columnNo, status);
            }
            catch (Exception ex)
            {
                Dictionary <string, string> dicObj = new Dictionary <string, string>();
                dicObj.Add("userTypeCode", userTypeCode);
                dicObj.Add("columnNo", columnNo);
                dicObj.Add("status", status);
                DataControl.Impl.ExceptionHandler.WriteLog(ex: ex, dic: dicObj);
            }
            return(rowsAffected);
        }
コード例 #8
0
        public ActionResult RCPAExcelBulkAddResult(HttpPostedFileBase file, FormCollection form)
        {
            string result = "";

            DataControl.BLUser      _objBlUser    = new DataControl.BLUser();
            DataControl.CurrentInfo _objCurInfo   = new DataControl.CurrentInfo();
            MVCModels.ShieldRCPA    objrcpaHeader = new MVCModels.ShieldRCPA();
            objrcpaHeader.Company_Id   = Convert.ToInt32(_objCurInfo.GetCompanyId());
            objrcpaHeader.Company_code = _objCurInfo.GetCompanyCode();
            objrcpaHeader.user_code    = _objCurInfo.GetUserCode();
            DateTime dt = DateTime.ParseExact(Request.Form["FromDate"].ToString(), "dd-MM-yyyy", CultureInfo.InvariantCulture);

            objrcpaHeader.PeriodFrom = Convert.ToDateTime(dt.ToString("yyyy-MM-dd"));
            dt = DateTime.ParseExact(Request.Form["ToDate"].ToString(), "dd-MM-yyyy", CultureInfo.InvariantCulture);
            objrcpaHeader.PeriodTo = Convert.ToDateTime(dt);

            string subDomain = _objCurInfo.GetSubDomain();

            result            = _objBLShieldRCPA.InsertRCPAExcelBulkUpload(subDomain, _objCurInfo.GetCompanyCode(), _objCurInfo.GetRegionCode(), Guid.NewGuid().ToString(), file, _objCurInfo.GetUserCode(), objrcpaHeader);
            ViewBag.ErrorCode = result;
            return(View("RCPAExcelBulkAddResult"));
        }
コード例 #9
0
        public string EditActivity(ActivityDataModel obj)
        {
            DataControl.BLUser      _objBluser      = new DataControl.BLUser();
            DataControl.CurrentInfo _objCurrentInfo = new DataControl.CurrentInfo();
            bool blFlag;

            string result = "";
            string error  = "";

            foreach (var item in obj.lst)
            {
                blFlag = _objBluser.GetActivityMappedForEdit(_objCurrentInfo.GetCompanyCode(), item.UserTypeCode, item.ActivityCode, item.Mapped_code);
                if (blFlag)
                {
                    error = "0";
                    return(error);
                }
                int mapActivity = _objBluser.updateUserTypeActivityMap(_objCurrentInfo.GetCompanyCode(), item.UserTypeCode, item.ActivityCode, item.StartDate, item.EndDate, item.Mapped_code, item.Sfc_Mandatory);
                result = mapActivity.ToString();
            }
            return(result);
        }
コード例 #10
0
        public string InsertActivity(ActivityDataModel obj)
        {
            DataControl.BLUser      _objBluser      = new DataControl.BLUser();
            DataControl.CurrentInfo _objCurrentInfo = new DataControl.CurrentInfo();
            bool   blFlag;
            string result = "";
            string error  = "";
            List <ValidationActivityDataListModel> lstModel = new List <ValidationActivityDataListModel>();

            foreach (var item in obj.lst)
            {
                ValidationActivityDataListModel objModel = new ValidationActivityDataListModel();
                objModel.UserTypeCode = item.UserTypeCode;
                objModel.ActivityCode = item.ActivityCode;
                lstModel.Add(objModel);
            }
            blFlag = _objBluser.checkActivityAlreadMapped(lstModel);
            if (blFlag)
            {
                error = "0";
                return(error);
            }
            foreach (var item in obj.lst)
            {
                //blFlag = _objBluser.getActivityMapped(_objCurrentInfo.GetCompanyCode(), item.UserTypeCode, item.ActivityCode);
                //if (blFlag)
                //{
                //    error = "0";
                //    return error;
                //}

                string UserTypeActivityCode = _objData.GetMaxCode(_objcurrentInfo.GetCompanyCode(), "tbl_SFA_Usertype_Activity_Mapping", "Usertype_Activity_Code", "UTA");
                int    mapActivity          = _objBluser.activityInsert(_objCurrentInfo.GetCompanyCode(), UserTypeActivityCode, item.UserTypeCode, item.ActivityCode, item.StartDate, item.EndDate, item.Sfc_Mandatory);
                result = mapActivity.ToString();
            }
            return(result);
        }
コード例 #11
0
        public ActionResult Index()
        {
            _objCurrentInfo             = new CurrentInfo();
            ViewBag.CompanyCode         = _objCurrentInfo.GetCompanyCode();
            ViewBag.RequestRegionCode   = _objCurrentInfo.GetRegionCode();
            ViewBag.RequestRegionName   = _objCurrentInfo.GetRegionName();
            ViewBag.RequestUserCode     = _objCurrentInfo.GetUserCode();
            ViewBag.RequestUserName     = _objCurrentInfo.GetUserName();
            ViewBag.RequestUserTypeName = _objCurrentInfo.GetUserTypeName();
            ViewBag.RequestUserTypeCode = _objCurrentInfo.GetUserTypeCode();
            DataControl.BLUser _objBlUser = new DataControl.BLUser();
            List <MVCModels.HiDoctor_Master.UserModel> lstUser = new List <MVCModels.HiDoctor_Master.UserModel>();

            lstUser = _objBlUser.GetImmediateChildUserForTree(_objCurrentInfo.GetCompanyCode(), _objCurrentInfo.GetUserCode()).ToList();
            if (lstUser.Count > 0)
            {
                ViewBag.ShowTeam = "YES";
            }
            else
            {
                ViewBag.ShowTeam = "NO";
            }
            return(View());
        }
コード例 #12
0
        public string GetEmployeeAuditReport(string fromDate, string toDate, string isExcel)
        {
            StringBuilder strContent = new StringBuilder();
            string        blobUrl    = string.Empty;

            strContent.Append("<table><tr><td colspan='7'  class='tblhead'>Employee Audit Report - Period  " + fromDate.Split('-')[2]
                              + "/" + fromDate.Split('-')[1] + "/" + fromDate.Split('-')[0] + " to " + toDate.Split('-')[2]
                              + "/" + toDate.Split('-')[1] + "/" + toDate.Split('-')[0] + "</td></tr></table>");
            strContent.Append("<table class='table table-striped'  id='tblEmployee'><thead><tr><th>S.No</th><th>Date</th><th>Employee Name </th><th>Employee Number</th>");
            strContent.Append("<th>Gender</th><th>Date of birth</th><th>Address</th><th>Phone</th><th>Mobile</th>");
            strContent.Append("<th>Employee Status</th><th>Email Id</th><th>Date of Joining</th><th>EDN Proof</th><th>Salary Proof</th>");
            strContent.Append("<th>Resume Given</th><th>Resignation Submitted</th><th>Appointed</th><th>Bank Account Number1</th><th>Bank Account Number2</th>");
            strContent.Append("<th>PF Number</th><th>PAN Number</th><th>Effective From</th><th>Effective To</th><th>Confirmation Date</th>");
            strContent.Append("<th>Employee Entity Type</th><th>Created By</th><th>Created DateTime</th>");
            strContent.Append("<th>Updated By</th><th>Updated DateTime</th></tr></thead><tbody>");
            try
            {
                DataControl.CurrentInfo objCurInfo = new DataControl.CurrentInfo();
                DataControl.BLUser      objUser    = new DataControl.BLUser();
                List <MVCModels.HiDoctor_Master.EmployeeModel> lstEmp =
                    new List <MVCModels.HiDoctor_Master.EmployeeModel>(objUser.GetEmployeeAuditReport(objCurInfo.GetCompanyCode(), fromDate, toDate));
                int i = 0;
                if (lstEmp.Count > 0)
                {
                    foreach (var dr in lstEmp)
                    {
                        i++;
                        strContent.Append("<tr><td>" + i + "</td>");
                        strContent.Append("<td>" + Convert.ToString(dr.Updated_DateTime).Substring(0, 10) + "</td>");
                        strContent.Append("<td>" + dr.Employee_Name + "</td>");
                        strContent.Append("<td>" + dr.Employee_Number + "</td>");
                        strContent.Append("<td>" + dr.Gender + "</td>");
                        if (dr.Date_Of_Birth == "01/01/1900")
                        {
                            strContent.Append("<td></td>");
                        }
                        else
                        {
                            strContent.Append("<td>" + dr.Date_Of_Birth + "</td>");
                        }
                        //strContent.Append("<td>" + dr.Date_Of_Birth + "</td>");
                        strContent.Append("<td>" + dr.Address + "</td>");
                        strContent.Append("<td>" + dr.Phone + "</td>");
                        strContent.Append("<td>" + dr.Mobile + "</td>");
                        strContent.Append("<td>" + dr.Employee_Status + "</td>");
                        strContent.Append("<td>" + dr.Email_Id + "</td>");
                        if (dr.Date_of_Joining == "01/01/1900")
                        {
                            strContent.Append("<td></td>");
                        }
                        else
                        {
                            strContent.Append("<td>" + dr.Date_of_Joining + "</td>");
                        }

                        strContent.Append("<td>" + ((dr.EDN_Proof == "0") ? "No" : "Yes") + "</td>");
                        strContent.Append("<td>" + ((dr.Salary_Proof == "0") ? "No" : "Yes") + "</td>");
                        strContent.Append("<td>" + ((dr.Resume_Given == "0") ? "No" : "Yes") + "</td>");
                        strContent.Append("<td>" + ((dr.Resignation_Submitted == "0") ? "No" : "Yes") + "</td>");
                        strContent.Append("<td>" + ((dr.Appointed == "0") ? "No" : "Yes") + "</td>");
                        strContent.Append("<td>" + dr.SCB_Account_Number + "</td>");
                        strContent.Append("<td>" + dr.ICICI_Account_Number + "</td>");
                        strContent.Append("<td>" + dr.PF_Number + "</td>");
                        strContent.Append("<td>" + dr.PAN_Number + "</td>");
                        if (dr.Effective_From == "01/01/1900")
                        {
                            strContent.Append("<td></td>");
                        }
                        else
                        {
                            strContent.Append("<td>" + dr.Effective_From + "</td>");
                        }
                        if (dr.Effective_To == "01/01/1900")
                        {
                            strContent.Append("<td></td>");
                        }
                        else
                        {
                            strContent.Append("<td>" + dr.Effective_To + "</td>");
                        }
                        if (dr.Confirmation_Date == "01/01/1900")
                        {
                            strContent.Append("<td></td>");
                        }
                        else
                        {
                            strContent.Append("<td>" + dr.Confirmation_Date + "</td>");
                        }
                        strContent.Append("<td>" + dr.Employee_Entity_Type + "</td>");
                        strContent.Append("<td>" + dr.Created_By + "</td>");
                        if (dr.Created_DateTime == "01/01/1900")
                        {
                            strContent.Append("<td></td>");
                        }
                        else
                        {
                            strContent.Append("<td>" + dr.Created_DateTime + "</td>");
                        }
                        strContent.Append("<td>" + dr.Updated_By + "</td>");
                        if (dr.Updated_DateTime == "01/01/1900")
                        {
                            strContent.Append("<td></td>");
                        }
                        else
                        {
                            strContent.Append("<td>" + dr.Updated_DateTime + "</td>");
                        }
                        strContent.Append("</tr>");
                    }
                }
                else
                {
                    strContent.Append("<tr><td colspan='29' style='text-align:center;'>No records found</td></tr>");
                }
                strContent.Append("</tbody>");
                strContent.Append("</table>");
                if ("Y" == isExcel)
                {
                    DataControl.Abstraction.IConfigProvider iConfigPro   = new DataControl.Impl.ConfigProvider();
                    DataControl.Repository.AzureBlobUpload  objAzureBlob = new DataControl.Repository.AzureBlobUpload();
                    string accKey   = iConfigPro.GetConfigValue("SWAASBLOBACCKEY");
                    string userName = objCurInfo.GetUserName();
                    string compCode = objCurInfo.GetCompanyCode();
                    string fileName = "EMPLOYEEAUDITREPORT_" + "_" + compCode + "_" + userName + ".xls";
                    blobUrl = objAzureBlob.AzureBlobUploadText(strContent.ToString(), accKey, fileName, "bulkdatasvc");
                    strContent.Clear();
                    strContent.Append(blobUrl);
                }
            }
            catch (Exception ex)
            {
                Dictionary <string, string> dicContext = new Dictionary <string, string>();
                DataControl.Impl.ExceptionHandler.WriteLog(ex, dicContext);
            }

            return(strContent.ToString());
        }
コード例 #13
0
        ///// <summary>
        ///// Get TP Master report for alumini users
        ///// </summary>
        ///// <param name="userCode"></param>
        ///// <param name="date"></param>
        ///// <returns>return the table content</returns>
        public string GetTPMasterReportForAluminiUsers(string userCode, string month, string year, string isExcel, string monthName)
        {
            StringBuilder strContent = new StringBuilder();

            DataControl.CurrentInfo objCurInfo = new DataControl.CurrentInfo();
            DataControl.BL_Report   objReport  = new DataControl.BL_Report();
            DataControl.BLUser      objUser    = new DataControl.BLUser();
            #region tp header
            strContent.Append(objUser.GetReportHeaderTableString(objCurInfo.GetCompanyCode(), userCode, monthName + "-" + year, "", "", ""));
            strContent.Append("<table class='table table-striped' cellpadding=0 cellspacing=0  id ='tblTPReport'>");
            strContent.Append("<thead>");
            strContent.Append("<tr id='tblTr'>");
            strContent.Append("<th>User Name</th>");
            strContent.Append("<th>TP Date</th>");
            strContent.Append("<th>Call Objective</th>");
            strContent.Append("<th>Activity Name</th>");
            strContent.Append("<th>Category</th>");
            strContent.Append("<th>CP Name</th>");
            strContent.Append("<th>Meeting Point </th>");
            strContent.Append("<th>Meeting Time </th>");
            strContent.Append("<th>Work Place</th>");
            strContent.Append("<th>SFC</th>");
            strContent.Append("<th>Accomp Name</th>");
            strContent.Append("<th>No oF Planned Doctors</th>");
            strContent.Append("<th>Entered Date</th>");
            strContent.Append("<th>Entered By</th>");
            strContent.Append("<th>Remarks</th>");
            strContent.Append("<th>Status</th>");
            strContent.Append("<th>Approved/Unapproved Date</th>");
            strContent.Append("<th>Approve/Unapprove Reason</th>");
            strContent.Append("</tr>");
            strContent.Append("</thead>");
            strContent.Append("<tbody>");
            #endregion tp header
            try
            {
                DataSet ds = new DataSet();
                ds = objReport.GetTPMasterReportForAlumniUsers(objCurInfo.GetCompanyCode(), month, year, userCode);
                if (ds.Tables.Count > 0)
                {
                    int      noOfDays    = System.DateTime.DaysInMonth(Convert.ToInt32(year), Convert.ToInt32(month));
                    DateTime startDate   = Convert.ToDateTime(year + "-" + month + "-01");
                    DateTime endDate     = Convert.ToDateTime(year + "-" + month + "-" + noOfDays);
                    DateTime dtStartDate = new DateTime();
                    DateTime dtEndDate   = new DateTime();
                    dtStartDate = Convert.ToDateTime(startDate);
                    dtEndDate   = Convert.ToDateTime(endDate);
                    DateTime dtDate = dtStartDate;
                    TimeSpan ts;
                    ts = dtEndDate - dtStartDate;
                    for (var j = 0; j <= ts.Days; j++)
                    {
                        if (j != 0)
                        {
                            dtDate = dtDate.AddDays(Convert.ToDouble(1));
                        }

                        DataRow[] dr = ds.Tables[0].AsEnumerable().Where(a => Convert.ToInt32(a["Day"]) == dtDate.Day &&
                                                                         Convert.ToInt32(a["Month"]) == dtDate.Month && Convert.ToInt32(a["Year"]) == dtDate.Year).ToArray();

                        if (dr.Length > 0)
                        {
                            strContent.Append("<tr>");
                            strContent.Append("<td>" + Convert.ToString(dr[0]["User_Name"]) + "</td>");
                            strContent.Append("<td>" + Convert.ToString(dr[0]["TP_Date"]) + "</td>");


                            strContent.Append("<td>" + Convert.ToString(dr[0]["Activity_Code"]) + "</td>");


                            strContent.Append("<td>" + Convert.ToString(dr[0]["Project_Code"]) + "</td>");


                            strContent.Append("<td>" + Convert.ToString(dr[0]["Category"]) + "</td>");


                            strContent.Append("<td>" + Convert.ToString(dr[0]["CP_name"]) + "</td>");
                            strContent.Append("<td>" + Convert.ToString(dr[0]["Meeting_point"]) + "</td>");
                            strContent.Append("<td>" + Convert.ToString(dr[0]["Meeting_Time"]) + "</td>");

                            strContent.Append("<td>" + Convert.ToString(dr[0]["Work_Area"]) + "</td>");

                            #region TP SFC details
                            //  var sfcDet = jsonPath(jsData, "$.Tables[4].Rows[?(@.TP_Id=='" + details[0].TP_Id + "')]");
                            DataRow[]     drSFC  = ds.Tables[2].AsEnumerable().Where(z => Convert.ToString(z["TP_Id"]) == Convert.ToString(dr[0]["TP_Id"])).ToArray();
                            StringBuilder strSFC = new StringBuilder();

                            if (drSFC.Length > 0)
                            {
                                for (int s = 0; s < drSFC.Length; s++)
                                {
                                    if (!string.IsNullOrEmpty(Convert.ToString(drSFC[s]["From_Place"])))
                                    {
                                        strSFC.Append("" + (s + 1) + "/ " + Convert.ToString(drSFC[s]["From_Place"]) + "  to  "
                                                      + Convert.ToString(drSFC[s]["To_Place"]) + "<br />");
                                    }
                                }
                            }
                            strContent.Append("<td>" + strSFC.ToString() + "</td>");
                            #endregion TP SFC details
                            StringBuilder strAccName = new StringBuilder();
                            if (!string.IsNullOrEmpty(Convert.ToString(dr[0]["Accomp_Name"])))
                            {
                                strAccName.Append("" + Convert.ToString(dr[0]["Accomp_Name"]) + " <br />");
                            }
                            if (!string.IsNullOrEmpty(Convert.ToString(dr[0]["Accompanist2_Name"])))
                            {
                                strAccName.Append("" + Convert.ToString(dr[0]["Accompanist2_Name"]) + "<br />");
                            }
                            if (!string.IsNullOrEmpty(Convert.ToString(dr[0]["Accompanist3_Name"])))
                            {
                                strAccName.Append("" + Convert.ToString(dr[0]["Accompanist3_Name"]) + "<br />");
                            }
                            if (!string.IsNullOrEmpty(Convert.ToString(dr[0]["Accompanist4_Name"])))
                            {
                                strAccName.Append("" + Convert.ToString(dr[0]["Accompanist4_Name"]) + "<br /> ");
                            }

                            strContent.Append("<td>" + strAccName.ToString() + "</td>");
                            DataRow[] drDoctors = ds.Tables[1].AsEnumerable().Where(c => Convert.ToString(c["TP_Date"]) ==
                                                                                    Convert.ToString(dr[0]["TP_Date"])).ToArray();


                            if (drDoctors.Length > 0)
                            {
                                // content += "<td>" + dJsonData.length + "</td>";
                                strContent.Append("<td align='center' ><span onclick='fnTPDetails(\"" + userCode + "_"
                                                  + dr[0]["TP_Date"] + "\")' style='text-decoration:underline;cursor:pointer'>" + drDoctors.Length + "</span></td>");
                            }
                            else
                            {
                                strContent.Append("<td></td>");
                            }


                            strContent.Append("<td>" + Convert.ToString(dr[0]["Entered_Date"]) + "</td>");

                            strContent.Append("<td>" + Convert.ToString(dr[0]["Entered_by"]) + "</td>");



                            strContent.Append("<td>" + Convert.ToString(dr[0]["Remarks"]) + "</td>");



                            strContent.Append("<td>" + Convert.ToString(dr[0]["Status"]) + "</td>");


                            strContent.Append("<td>" + Convert.ToString(dr[0]["Approved_Date"]) + "</td>");



                            strContent.Append("<td>" + Convert.ToString(dr[0]["Unapprove_Reason"]) + "</td>");


                            strContent.Append("</tr>");
                        }
                        else
                        {
                            #region holiday details
                            DataRow[] drHoliday = ds.Tables[3].AsEnumerable().Where(a => Convert.ToInt32(a["Day"]) == dtDate.Day &&
                                                                                    Convert.ToInt32(a["Month"]) == dtDate.Month && Convert.ToInt32(a["Year"]) == dtDate.Year).ToArray();
                            // var details = jsonPath(jsData, "$.Tables[5].Rows[?(@.Day=='" + day + "' & @.Month=='" + month + "' & @.Year=='" + year + "')]");
                            if (drHoliday.Length > 0)
                            {
                                if (Convert.ToString(drHoliday[0]["Type"]) == "S")
                                {
                                    strContent.Append("<tr>");
                                    strContent.Append("<td style='background: #efefef;'></td>");


                                    strContent.Append("<td style='background: #efefef;'>" + Convert.ToString(drHoliday[0]["Date"]) + "</td>");

                                    strContent.Append("<td style='background: #efefef;'> - Sunday</td>");
                                    strContent.Append("<td style='background: #efefef;'></td>");
                                    strContent.Append("<td style='background: #efefef;'></td>");
                                    strContent.Append("<td style='background: #efefef;'></td>");

                                    strContent.Append("<td style='background: #efefef;'></td>");
                                    strContent.Append("<td style='background: #efefef;'></td>");
                                    strContent.Append("<td style='background: #efefef;'></td>");
                                    strContent.Append("<td style='background: #efefef;'></td>");
                                    strContent.Append("<td style='background: #efefef;'></td>");

                                    strContent.Append("<td style='background: #efefef;'></td>");
                                    strContent.Append("<td style='background: #efefef;'></td>");
                                    strContent.Append("<td style='background: #efefef;'></td>");
                                    strContent.Append("<td style='background: #efefef;'></td>");
                                    strContent.Append("<td style='background: #efefef;'></td>");

                                    strContent.Append("<td style='background: #efefef;'></td>");
                                    strContent.Append("<td style='background: #efefef;'></td>");
                                    strContent.Append("</tr>");
                                }
                                else
                                {
                                    strContent.Append("<tr>");
                                    strContent.Append("<td style='background: #efefef;'></td>");
                                    strContent.Append("<td style='background: #efefef;'>" + Convert.ToString(drHoliday[0]["Date"]) + "</td>");
                                    strContent.Append("<td style='background: #efefef;'> - Holiday - </td>");

                                    strContent.Append("<td style='background: #efefef;'>" + Convert.ToString(drHoliday[0]["Holiday"]) + "</td>");
                                    strContent.Append("<td style='background: #efefef;'></td>");
                                    strContent.Append("<td style='background: #efefef;'></td>");

                                    strContent.Append("<td style='background: #efefef;'></td>");
                                    strContent.Append("<td style='background: #efefef;'></td>");
                                    strContent.Append("<td style='background: #efefef;'></td>");
                                    strContent.Append("<td style='background: #efefef;'></td>");
                                    strContent.Append("<td style='background: #efefef;'></td>");

                                    strContent.Append("<td style='background: #efefef;'></td>");
                                    strContent.Append("<td style='background: #efefef;'></td>");
                                    strContent.Append("<td style='background: #efefef;'></td>");
                                    strContent.Append("<td style='background: #efefef;'></td>");
                                    strContent.Append("<td style='background: #efefef;'></td>");

                                    strContent.Append("<td style='background: #efefef;'></td>");
                                    strContent.Append("<td style='background: #efefef;'></td>");
                                    strContent.Append("</tr>");
                                }
                            }
                            #endregion holiday details
                        }
                    }
                }
            }
            catch (Exception ex)
            {
            }

            strContent.Append("</tbody>");
            strContent.Append("</table>");
            string blobUrl = string.Empty;
            if ("Y" == isExcel)
            {
                DataControl.Abstraction.IConfigProvider iConfigPro   = new DataControl.Impl.ConfigProvider();
                DataControl.Repository.AzureBlobUpload  objAzureBlob = new DataControl.Repository.AzureBlobUpload();
                string accKey   = iConfigPro.GetConfigValue("SWAASBLOBACCKEY");
                string userName = objCurInfo.GetUserName();
                string compCode = objCurInfo.GetCompanyCode();
                string fileName = "TPMASTERALUMINI_" + "_" + compCode + "_" + userName + ".xls";
                blobUrl = objAzureBlob.AzureBlobUploadText(strContent.ToString(), accKey, fileName, "bulkdatasvc");
                strContent.Clear();
                strContent.Append(blobUrl);
            }
            return(strContent.ToString());
        }
コード例 #14
0
        public string GetBillingReport(string fromDate, string toDate, string mode)
        {
            DataControl.CurrentInfo _objCurrentInfo = new DataControl.CurrentInfo();
            DataControl.BLUser      _blUser         = new DataControl.BLUser();
            List <MVCModels.HiDoctor_Master.BillingReportModel> lstReport = new List <MVCModels.HiDoctor_Master.BillingReportModel>();

            lstReport = _blUser.GetBillingReport(_objCurrentInfo.GetCompanyCode(), fromDate, toDate, mode);
            StringBuilder strText    = new StringBuilder();
            double        userCouunt = 0;
            double        dcrCount   = 0;

            if (lstReport.Count > 0)
            {
                strText.Append("<table class='display data datatable' id='tblReport'><thead><tr>");
                strText.Append("<th>User Name</th>");
                strText.Append("<th>Designation</th>");
                strText.Append("<th>Region Name</th>");
                strText.Append("<th>Division</th>");
                strText.Append("<th>User Status</th>");
                if ("LOG" == mode.ToUpper())
                {
                    strText.Append("<th>User Log Count</th>");
                }
                strText.Append("<th>Reporting Manager</th>");
                strText.Append("<th>Reporting Designation</th>");
                strText.Append("<th>User Activation Date</th>");
                strText.Append("<th>Resignation Date </th>");
                strText.Append("<th>User Disable Date</th>");
                strText.Append("<th>User Work Category</th>");
                if ("DCR" == mode.ToUpper())
                {
                    strText.Append("<th>Entered DCR Count</th>");
                }
                strText.Append("</tr></thead><tbody>");
                for (int i = 0; i < lstReport.Count; i++)
                {
                    strText.Append("<tr>");
                    strText.Append("<td>" + lstReport[i].User_Name + "</td>");
                    strText.Append("<td>" + lstReport[i].User_Type_Name + "</td>");
                    strText.Append("<td>" + lstReport[i].Region_Name + "</td>");
                    strText.Append("<td>" + lstReport[i].Division_Name + "</td>");
                    strText.Append("<td>" + lstReport[i].User_Status + "</td>");
                    if ("LOG" == mode.ToUpper())
                    {
                        strText.Append("<td style='text-align:right;padding-right: 1%;'>" + lstReport[i].Count + "</th>");
                        userCouunt = userCouunt + Convert.ToDouble(lstReport[i].Count);
                    }
                    strText.Append("<td>" + lstReport[i].Reporting_Manager + "</td>");
                    strText.Append("<td>" + lstReport[i].Reporting_User_Type_Name + "</td>");
                    strText.Append("<td>" + lstReport[i].Created_Date + "</td>");
                    strText.Append("<td>" + lstReport[i].Resignation_Date + "</td>");
                    strText.Append("<td>" + lstReport[i].Effective_To + "</td>");
                    strText.Append("<td>" + lstReport[i].User_Type_Category + "</td>");
                    if ("DCR" == mode.ToUpper())
                    {
                        strText.Append("<td style='text-align:right;padding-right: 1%;'>" + lstReport[i].Count + "</td>");
                        dcrCount = dcrCount + Convert.ToDouble(lstReport[i].Count);
                    }
                    strText.Append("</tr>");
                }

                strText.Append("</tbody>");
                strText.Append("<tbody>");
                strText.Append("<tfoot>");
                strText.Append("<tr>");
                strText.Append("<th></th><th></th><th></th><th></th><th></th>");
                if ("LOG" == mode.ToUpper())
                {
                    strText.Append("<th style='text-align:right;'>" + userCouunt + "</th>");
                }
                strText.Append("<th></th><th></th><th></th><th></th><th></th><th></th>");
                if ("DCR" == mode.ToUpper())
                {
                    strText.Append("<th style='text-align:right;'>" + dcrCount + "</th>");
                }
                strText.Append("</tr>");
                strText.Append("</tfoot>");
                strText.Append("</tbody>");
                strText.Append("</table>");
            }
            return(strText.ToString());
        }
コード例 #15
0
        public string UpdateUserTypeNewIndex()
        {
            string result = "";
            string guid   = Guid.NewGuid().ToString();

            try
            {
                DataSet                 ds          = new DataSet();
                DataControl.BLUser      _objBlUser  = new DataControl.BLUser();
                DataControl.CurrentInfo _objCurInfo = new DataControl.CurrentInfo();
                ds = _objBlUser.GetAllUserTypesForMigration(_objCurInfo.GetCompanyCode());
                DataSet   dsAllUserTypes = new DataSet();
                DataRow[] dr;
                dr = ds.Tables[0].AsEnumerable().Where(c => c["User_Type_Code"].ToString() == c["Under_User_Type"].ToString()).ToArray();
                if (dr.Length > 0)
                {
                    string userTypeCode = dr[0]["User_Type_Code"].ToString();
                    string userTypeId   = dr[0]["User_Type_ID"].ToString();
                    dsAllUserTypes = _objBlUser.GetUserTypesHierarchyDataset(_objCurInfo.GetCompanyCode(), userTypeCode, _objCurInfo.GetUserCode(), guid);
                    if (dsAllUserTypes.Tables[0].Rows.Count > 0)
                    {
                        //Display Order Update
                        for (int d = 0; d < dsAllUserTypes.Tables[0].Rows.Count; d++)
                        {
                            dsAllUserTypes.Tables[0].Rows[d]["User_Type_Display_Order"] = d + 1;
                            dsAllUserTypes.AcceptChanges();
                        }
                        //Root user seq and full index update
                        DataRow[] drRoot;
                        drRoot = dsAllUserTypes.Tables[0].AsEnumerable().Where(c => c["User_Type_Code"].ToString() == c["Under_User_Type"].ToString()).ToArray();
                        drRoot[0]["User_Type_Full_Index"] = userTypeId + ".";
                        drRoot[0]["User_Type_Seq_Index"]  = "1";
                        drRoot[0]["Company_Code"]         = _objCurInfo.GetCompanyCode();
                        // Root child nodes seq and full index updation
                        DataRow[] drChild;
                        drChild = dsAllUserTypes.Tables[0].AsEnumerable().Where(d => d["Under_User_Type"].ToString() == userTypeCode).ToArray();
                        if (drChild.Length > 0)
                        {
                            int c = 0;
                            foreach (DataRow drr in drChild)
                            {
                                c++;
                                drr["User_Type_Seq_Index"] = c.ToString();
                                drr["Company_Code"]        = _objCurInfo.GetCompanyCode();
                                dsAllUserTypes.AcceptChanges();
                            }
                        }
                        dsAllUserTypes.AcceptChanges();
                        int displayOrder = 0;
                        for (int i = 0; i < dsAllUserTypes.Tables[0].Rows.Count; i++)
                        {
                            displayOrder++;
                            string curUserTypeCode    = dsAllUserTypes.Tables[0].Rows[i]["User_Type_Code"].ToString();
                            string curParUserTypeCode = dsAllUserTypes.Tables[0].Rows[i]["Under_User_Type"].ToString();
                            if (curUserTypeCode != curParUserTypeCode)
                            {
                                string    curUserTypeId = dsAllUserTypes.Tables[0].Rows[i]["User_Type_ID"].ToString();
                                string    parIndex      = "";
                                DataRow[] drTemp;
                                drTemp = dsAllUserTypes.Tables[0].AsEnumerable().Where(c => c["User_Type_Code"].ToString() == curParUserTypeCode).ToArray();
                                if (drTemp.Length > 0)
                                {
                                    parIndex = drTemp[0]["User_Type_Full_Index"].ToString();
                                    dsAllUserTypes.Tables[0].Rows[i]["User_Type_Full_Index"] = parIndex + curUserTypeId + ".";
                                    dsAllUserTypes.Tables[0].Rows[i]["Company_Code"]         = _objCurInfo.GetCompanyCode();
                                    dsAllUserTypes.Tables[0].Rows[i]["Under_User_Type_ID"]   = drTemp[0]["User_Type_ID"].ToString();
                                }

                                drChild = dsAllUserTypes.Tables[0].AsEnumerable().Where(d => d["Under_User_Type"].ToString() == curUserTypeCode).ToArray();
                                if (drChild.Length > 0)
                                {
                                    int c = 0;
                                    foreach (DataRow drr in drChild)
                                    {
                                        c++;
                                        drr["User_Type_Seq_Index"] = c.ToString();
                                        drr["Company_Code"]        = _objCurInfo.GetCompanyCode();
                                        dsAllUserTypes.AcceptChanges();
                                    }
                                }
                            }
                        }
                        //Update Qry
                        result = _objBlUser.UserTypeBulkTempInsert(_objCurInfo.GetCompanyCode(), dsAllUserTypes.Tables[0], "MIGRATION");
                        if (result.Split(':')[0].ToUpper() == "SUCCESS")
                        {
                            result = _objBlUser.UpdateUserTypeIndexFromTemptoUserMaster(_objCurInfo.GetCompanyCode(), "MIGRATION", guid, _objCurInfo.GetUserCode());
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                result = "FAILURE:" + ex.Message;
            }
            return(result);
        }
コード例 #16
0
        public string GetPaySlipMetaData(string userTypeCode)
        {
            StringBuilder strContent = new StringBuilder();

            DataControl.BLUser      objUser    = new DataControl.BLUser();
            DataControl.CurrentInfo objCurInfo = new DataControl.CurrentInfo();
            IEnumerable <MVCModels.HiDoctor_Master.PaySlipMetaDataModel> lstPaySlipData = null;

            lstPaySlipData = objUser.GetPaySlipMetaData(objCurInfo.GetCompanyCode(), userTypeCode);

            IEnumerable <MVCModels.HiDoctor_Master.PaySlipColDataTypeModel> lstPaySlipColDataType = null;

            lstPaySlipColDataType = objUser.GetPaySlipColDataType(objCurInfo.GetCompanyCode());
            try
            {
                strContent.Append("<table class='table table-striped'  id='tblPaySlipMetaData'><thead><tr><td>Delete</td><td>Col.No</td><td>Col.Name</td>");
                strContent.Append("<td>Label</td><td>Zone Index</td><td>Row Index</td><td>Col.Index</td><td>Hor.Align</td><td>Ver.Align</td>");
                strContent.Append("<td>Col.Type</td><td>Column Data Type</td><td>Status</td></tr></thead><tbody>");
                int j = 0;
                if (lstPaySlipData != null)
                {
                    foreach (var lstData in lstPaySlipData)
                    {
                        StringBuilder strColumnIndex   = new StringBuilder();
                        StringBuilder strRowIndex      = new StringBuilder();
                        StringBuilder strZoneIndex     = new StringBuilder();
                        StringBuilder strVerticalAlign = new StringBuilder();
                        StringBuilder strHorAlign      = new StringBuilder();
                        StringBuilder strColType       = new StringBuilder();
                        StringBuilder strColDatalType  = new StringBuilder();

                        string zoneIndex   = string.Empty;
                        string rowIndex    = string.Empty;
                        string columnIndex = string.Empty;
                        string horAlign    = string.Empty;
                        string verAlign    = string.Empty;
                        string colType     = string.Empty;
                        string coldatatype = string.Empty;
                        j++;
                        strContent.Append("<tr>");
                        if (!string.IsNullOrEmpty(Convert.ToString(lstData.Column_Name)))
                        {
                            strContent.Append("<td><a href='#' onclick='fnChangePaySlipColumnStatus(\""
                                              + lstData.Column_No + "\",\"" + lstData.Record_Status + "\");'>Change Status</a></td>");
                        }
                        else
                        {
                            strContent.Append("<td></td>");
                        }
                        strContent.Append("<td><span id='spnColumnNo_" + j + "'>" + lstData.Column_No + "</span></td>");
                        strContent.Append("<td><input type='text' class='form-control clsCheckSpecial' value='" + lstData.Column_Name
                                          + "' id='txtColumnName_" + j + "' maxlength='30'/></td>");
                        strContent.Append("<td><input type='text' class='form-control clsCheckSpecial' value='" + lstData.Label_Text
                                          + "' id='txtLabelText_" + j + "'  maxlength='500'/></td>");
                        var filtered = lstPaySlipData.Where(z => z.Column_No == Convert.ToString(lstData.Column_No)).ToList();
                        if (filtered.Count > 0)
                        {
                            zoneIndex   = filtered[0].Zone_Index;
                            rowIndex    = filtered[0].Row_Index;
                            columnIndex = filtered[0].Column_Index;
                            horAlign    = filtered[0].Horizontal_Align;
                            verAlign    = filtered[0].Vertical_Align;
                            colType     = filtered[0].Column_Type;
                            coldatatype = filtered[0].Column_Data_Type;
                        }
                        strColumnIndex.Append("<option value='0' selected>-Select-</option>");
                        strRowIndex.Append("<option value='0' selected>-Select-</option>");
                        strZoneIndex.Append("<option value='0' selected>-Select-</option>");
                        for (int i = 1; i <= 25; i++)
                        {
                            if (columnIndex.ToString() == i.ToString())
                            {
                                strColumnIndex.Append("<option value=" + i + " selected>" + i + "</option>");
                            }
                            else
                            {
                                strColumnIndex.Append("<option value=" + i + ">" + i + "</option>");
                            }
                            if (rowIndex.ToString() == i.ToString())
                            {
                                strRowIndex.Append("<option value=" + i + " selected>" + i + "</option>");
                            }
                            else
                            {
                                strRowIndex.Append("<option value=" + i + ">" + i + "</option>");
                            }
                            if (zoneIndex.ToString() == i.ToString())
                            {
                                strZoneIndex.Append("<option value=" + i + " selected>" + i + "</option>");
                            }
                            else
                            {
                                strZoneIndex.Append("<option value=" + i + ">" + i + "</option>");
                            }
                        }
                        #region horizondal align
                        if (horAlign.ToString().ToUpper() == "LEFT")
                        {
                            strHorAlign.Append("<option value=''>-Select-</option>");
                            strHorAlign.Append("<option value='Left' selected>Left</option>");
                            strHorAlign.Append("<option value='Right'>Right</option>");
                            strHorAlign.Append("<option value='Center'>Center</option>");
                        }
                        else if (horAlign.ToString().ToUpper() == "RIGHT")
                        {
                            strHorAlign.Append("<option value=''>-Select-</option>");
                            strHorAlign.Append("<option value='Left'>Left</option>");
                            strHorAlign.Append("<option value='Right' selected>Right</option>");
                            strHorAlign.Append("<option value='Center'>Center</option>");
                        }
                        else if (horAlign.ToString().ToUpper() == "CENTER")
                        {
                            strHorAlign.Append("<option value=''>-Select-</option>");
                            strHorAlign.Append("<option value='Left'>Left</option>");
                            strHorAlign.Append("<option value='Right'>Right</option>");
                            strHorAlign.Append("<option value='Center' selected>Center</option>");
                        }
                        else
                        {
                            strHorAlign.Append("<option value='' selected>-Select-</option>");
                            strHorAlign.Append("<option value='Left'>Left</option>");
                            strHorAlign.Append("<option value='Right'>Right</option>");
                            strHorAlign.Append("<option value='Center'>Center</option>");
                        }
                        #endregion horizondal align

                        #region vertical align
                        if (verAlign.ToString().ToUpper() == "TOP")
                        {
                            strVerticalAlign.Append("<option value=''>-Select-</option>");
                            strVerticalAlign.Append("<option value='Top' selected>Top</option>");
                            strVerticalAlign.Append("<option value='Bottom'>Bottom</option>");
                            strVerticalAlign.Append("<option value='Middle'>Middle</option>");
                        }
                        else if (verAlign.ToString().ToUpper() == "BOTTOM")
                        {
                            strVerticalAlign.Append("<option value=''>-Select-</option>");
                            strVerticalAlign.Append("<option value='Top'>Top</option>");
                            strVerticalAlign.Append("<option value='Bottom' selected>Bottom</option>");
                            strVerticalAlign.Append("<option value='Middle'>Middle</option>");
                        }
                        else if (verAlign.ToString().ToUpper() == "MIDDLE")
                        {
                            strVerticalAlign.Append("<option value=''>-Select-</option>");
                            strVerticalAlign.Append("<option value='Top'>Top</option>");
                            strVerticalAlign.Append("<option value='Bottom'>Bottom</option>");
                            strVerticalAlign.Append("<option value='Middle' selected>Middle</option>");
                        }
                        else
                        {
                            strVerticalAlign.Append("<option value='' selected>-Select-</option>");
                            strVerticalAlign.Append("<option value='Top'>Top</option>");
                            strVerticalAlign.Append("<option value='Right'>Right</option>");
                            strVerticalAlign.Append("<option value='Middle'>Middle</option>");
                        }
                        #endregion vertical align

                        if (colType.ToString().ToUpper() == "KEY_VALUE")
                        {
                            strColType.Append("<option value=''>-Select-</option>");
                            strColType.Append("<option value='Key_Value' selected>Key_Value</option>");
                            strColType.Append("<option value='Key'>Key</option>");
                            strColType.Append("<option value='Header'>Header</option>");
                            strColType.Append("<option value='Key_Header_Value'>Key_Header_Value</option>");
                        }
                        else if (colType.ToString().ToUpper() == "KEY")
                        {
                            strColType.Append("<option value=''>-Select-</option>");
                            strColType.Append("<option value='Key_Value'>Key_Value</option>");
                            strColType.Append("<option value='Key' selected>Key</option>");
                            strColType.Append("<option value='Header'>Header</option>");
                            strColType.Append("<option value='Key_Header_Value'>Key_Header_Value</option>");
                        }
                        else if (colType.ToString().ToUpper() == "HEADER")
                        {
                            strColType.Append("<option value=''>-Select-</option>");
                            strColType.Append("<option value='Key_Value'>Key_Value</option>");
                            strColType.Append("<option value='Key'>Key</option>");
                            strColType.Append("<option value='Header' selected>Header</option>");
                            strColType.Append("<option value='Key_Header_Value'>Key_Header_Value</option>");
                        }
                        else if (colType.ToString().ToUpper() == "KEY_HEADER_VALUE")
                        {
                            strColType.Append("<option value=''>-Select-</option>");
                            strColType.Append("<option value='Key_Value'>Key_Value</option>");
                            strColType.Append("<option value='Key'>Key</option>");
                            strColType.Append("<option value='Header'>Header</option>");
                            strColType.Append("<option value='Key_Header_Value' selected>Key_Header_Value</option>");
                        }
                        else
                        {
                            strColType.Append("<option value='' selected>-Select-</option>");
                            strColType.Append("<option value='Key_Value'>Key_Value</option>");
                            strColType.Append("<option value='Key'>Key</option>");
                            strColType.Append("<option value='Header'>Header</option>");
                            strColType.Append("<option value='Key_Header_Value'>Key_Header_Value</option>");
                        }



                        #region datatype align
                        if (coldatatype.ToString() == "1")
                        {
                            //strHorAlign.Append("<option value=''>-Select-</option>");
                            strColDatalType.Append("<option value='1' selected>Number without decimal places</option>");
                            strColDatalType.Append("<option value='2'>Amount</option>");
                            strColDatalType.Append("<option value='3'>Text</option>");
                            strColDatalType.Append("<option value='4'>Date</option>");
                        }
                        else if (coldatatype.ToString() == "2")
                        {
                            strColDatalType.Append("<option value='1'>Number without decimal places</option>");
                            strColDatalType.Append("<option value='2' selected>Amount</option>");
                            strColDatalType.Append("<option value='3'>Text</option>");
                            strColDatalType.Append("<option value='4'>Date</option>");
                        }
                        else if (coldatatype.ToString() == "4")
                        {
                            strColDatalType.Append("<option value='1'>Number without decimal places</option>");
                            strColDatalType.Append("<option value='2'>Amount</option>");
                            strColDatalType.Append("<option value='3'>Text</option>");
                            strColDatalType.Append("<option value='4' selected>Date</option>");
                        }
                        else
                        {
                            strColDatalType.Append("<option value='1'>Number without decimal places</option>");
                            strColDatalType.Append("<option value='2'>Amount</option>");
                            strColDatalType.Append("<option value='3' selected>Text</option>");
                            strColDatalType.Append("<option value='4'>Date</option>");
                        }
                        #endregion datatype align



                        //if (lstPaySlipColDataType != null)
                        //{

                        //    foreach (var item in lstPaySlipColDataType)
                        //    {
                        //        if (item.DBDataTypeName.ToUpper() == "VARCHAR")
                        //        {
                        //            strColDatalType.Append("<option value=" + item.Id + " selected>" + item.DataTypeAliasName + "</option>");
                        //        }
                        //        if (item.DBDataTypeName.ToUpper() != "VARCHAR")
                        //        {
                        //            strColDatalType.Append("<option value=" + item.Id + ">" + item.DataTypeAliasName + "</option>");
                        //        }
                        //    }

                        //}



                        strContent.Append("<td><select id='cboZoneIndex_" + j + "' class='form-control'>" + strZoneIndex.ToString() + "</select></td>");
                        strContent.Append("<td><select id='cboRowIndex_" + j + "' class='form-control'>" + strRowIndex.ToString() + "</select></td>");
                        strContent.Append("<td><select id='cboColumnIndex_" + j + "' class='form-control'>" + strColumnIndex.ToString() + "</select></td>");
                        strContent.Append("<td><select id='cboHorAlign_" + j + "' class='form-control'>" + strHorAlign.ToString() + "</select></td>");
                        strContent.Append("<td><select id='cboVerAlign_" + j + "' class='form-control'>" + strVerticalAlign.ToString() + "</select></td>");
                        strContent.Append("<td><select id='cboColType_" + j + "' class='form-control'>" + strColType.ToString() + "</select></td>");
                        strContent.Append("<td><select id='cboColDataType_" + j + "' class='form-control'>" + strColDatalType.ToString() + "</select></td>");
                        if (!string.IsNullOrEmpty(Convert.ToString(lstData.Column_Name)))
                        {
                            if (lstData.Record_Status == "1")
                            {
                                strContent.Append("<td>Enabled</td>");
                            }
                            else
                            {
                                strContent.Append("<td>Disabled</td>");
                            }
                        }
                        else
                        {
                            strContent.Append("<td></td>");
                        }
                        strContent.Append("</tr>");
                    }
                    strContent.Append("</tbody></table>");
                }
                if (j == 0)
                {
                    strContent.Clear();
                    strContent.Append("No Payslip column data is available for the selected user type");
                }
            }
            catch (Exception ex)
            {
                Dictionary <string, string> dicObj = new Dictionary <string, string>();
                dicObj.Add("strContent", strContent.ToString());
                DataControl.Impl.ExceptionHandler.WriteLog(ex: ex, dic: dicObj);
            }
            return(strContent.ToString());
        }