Ejemplo n.º 1
0
        public ActionResult DoctorsReason(string Lid)
        {
            if (Lid == null)
            {
                ViewBag.subDomainName   = _objCurrentInfo.GetSubDomain();
                ViewBag.CompanyCode     = _objCurrentInfo.GetCompanyCode();
                ViewBag.LoginRegionCode = _objCurrentInfo.GetRegionCode();
                ViewBag.LoginUserCode   = _objCurrentInfo.GetUserCode();
                //ViewBag.SelectedRegionCode = _objCurrentInfo.GetSRegionCode();
                ViewBag.CompanyId    = _objCurrentInfo.GetCompanyId();
                ViewBag.IsResponsive = "NO";
            }
            else
            {
                string parameters = System.Text.ASCIIEncoding.ASCII.GetString(System.Convert.FromBase64String(Lid));
                MVCModels.DoctorMissedReason.ParameterMode dd = Newtonsoft.Json.JsonConvert.DeserializeObject <MVCModels.DoctorMissedReason.ParameterMode>(parameters);


                ViewBag.subDomainName   = _objCurrentInfo.GetSubDomain();
                ViewBag.CompanyCode     = _objCurrentInfo.GetCompanyCode();
                ViewBag.LoginRegionCode = _objCurrentInfo.GetRegionCode();
                ViewBag.LoginUserCode   = _objCurrentInfo.GetUserCode();
                //ViewBag.SelectedRegionCode = _objCurrentInfo.GetSRegionCode();
                ViewBag.CompanyId    = _objCurrentInfo.GetCompanyId();
                ViewBag.IsResponsive = "YES";
            }
            return(View());
        }
Ejemplo n.º 2
0
        public ActionResult PSAndSSSalesEntry(string Lid)
        {
            //string parameters = System.Text.ASCIIEncoding.ASCII.GetString(System.Convert.FromBase64String(Lid));
            //ParameterMode obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ParameterMode>(parameters);
            if (Lid == null)
            {
                ViewBag.subDomainName   = _objCurrentInfo.GetSubDomain();
                ViewBag.CompanyCode     = _objCurrentInfo.GetCompanyCode();
                ViewBag.LoginRegionCode = _objCurrentInfo.GetRegionCode();
                ViewBag.LoginUserCode   = _objCurrentInfo.GetUserCode();
                ViewBag.CompanyId       = _objCurrentInfo.GetCompanyId();
                ViewBag.IsResponsive    = "No";
            }
            else
            {
                string parameters = System.Text.ASCIIEncoding.ASCII.GetString(System.Convert.FromBase64String(Lid));
                MVCModels.PSAndSSSalesEntry.ParameterMode dd = Newtonsoft.Json.JsonConvert.DeserializeObject <MVCModels.PSAndSSSalesEntry.ParameterMode>(parameters);


                ViewBag.subDomainName   = dd.SubDomain_Name;
                ViewBag.CompanyCode     = dd.Company_Code;
                ViewBag.LoginRegionCode = dd.Region_Code;
                ViewBag.LoginUserCode   = dd.User_Code;
                ViewBag.CompanyId       = dd.Company_Id;
                ViewBag.IsResponsive    = "YES";
            }
            return(View());
        }
Ejemplo n.º 3
0
        public string UpdateMsgReadStatus(string isRead, string msgDetails)
        {
            string result = string.Empty;
            List <MVCModels.MessagingModel> lstMsg = new List <MVCModels.MessagingModel>();

            DataControl.CurrentInfo objCurInfo = new DataControl.CurrentInfo();
            DataControl.BLMessaging objMsg     = new DataControl.BLMessaging();
            try
            {
                if (!string.IsNullOrEmpty(msgDetails))
                {
                    string[] ar = msgDetails.Split('^');
                    if (ar.Length > 0)
                    {
                        for (int i = 0; i < ar.Length; i++)
                        {
                            if (!string.IsNullOrEmpty(Convert.ToString(ar[i]).Split('~')[0]))
                            {
                                string targetAddress = Convert.ToString(ar[i]).Split('~')[1];
                                MVCModels.MessagingModel objMsgModel = new MVCModels.MessagingModel();
                                objMsgModel.Company_Code   = objCurInfo.GetCompanyCode();
                                objMsgModel.Msg_Code       = Convert.ToString(ar[i]).Split('~')[0];
                                objMsgModel.Target_Address = targetAddress;
                                lstMsg.Add(objMsgModel);
                            }
                        }
                        int rowsAffected = 0;
                        rowsAffected = objMsg.UpdateMsgReadStatus(objCurInfo.GetCompanyCode(), lstMsg, isRead);
                        if (rowsAffected > 0)
                        {
                            if (isRead == "1")
                            {
                                result = "The conversation has been marked as read.";
                            }
                            else
                            {
                                result = "The conversation has been marked as unread.";
                            }
                        }
                        else
                        {
                            if (isRead == "1")
                            {
                                result = "Error while change the conversation as read.";
                            }
                            else
                            {
                                result = "Error while change the conversation as unread.";
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Dictionary <string, string> dicObj = new Dictionary <string, string>();
                DataControl.Impl.ExceptionHandler.WriteLog(ex: ex, dic: dicObj);
            }
            return(result);
        }//The conversation has been moved to the Trash.
Ejemplo n.º 4
0
        public string GetRegionsForHolidaySearch()
        {
            DataControl.CurrentInfo objCurInfo = new DataControl.CurrentInfo();
            DataControl.BLRegion    objRegion  = new DataControl.BLRegion();
            IEnumerable <MVCModels.HiDoctor_Master.RegionModel> lstRegion         = null;
            IEnumerable <MVCModels.HiDoctor_Master.RegionModel> lstUnMappedRegion = null;

            lstRegion         = objRegion.GetHolidayMappedRegions(objCurInfo.GetCompanyCode());
            lstUnMappedRegion = objRegion.GetHolidayUnMappedRegions(objCurInfo.GetCompanyCode());
            StringBuilder strContent = new StringBuilder();

            strContent.Append("<table class='table table-striped' id='tblUnMappedRegion'><thead><tr><td>S.No</td><td><input type='checkbox' name='chkAllUnMappedRegion' onclick='fnSelectAllUnMappedRegions();'/></td>");
            strContent.Append("<td>Region Name</td><td>Region Type</td><td>Reporting Region</td><td>Reporting Region Type</td></tr></thead>");
            if (lstUnMappedRegion != null)
            {
                int i = 0;
                foreach (var dr in lstUnMappedRegion)
                {
                    i++;
                    strContent.Append("<tr><td>" + i + "</td>");
                    strContent.Append("<td><input type='checkbox' id='chkSelect_" + i + "' name='chkUnMappedRegion' value='" + dr.Region_Code + "'/></td>");
                    strContent.Append("<td>" + dr.Region_Name + "</td>");
                    strContent.Append("<td>" + dr.Region_Type_Name + "</td>");
                    strContent.Append("<td>" + dr.Reporting_Region_Name + "</td>");
                    strContent.Append("<td>" + dr.Reporting_Region_Type_Name + "</td>");
                    strContent.Append("</tr>");
                }
            }
            strContent.Append("</table>");
            DataControl.JSONConverter objJson = new DataControl.JSONConverter();
            return(objJson.Serialize(lstRegion) + "~" + strContent.ToString());
        }
Ejemplo n.º 5
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);
        }
Ejemplo n.º 6
0
        public JsonResult GetActicitySummary(FormCollection coll)
        {
            try
            {
                DataControl.JSONConverter objJson = new DataControl.JSONConverter();
                DataSet dsActivity = new DataSet();

                string toDate   = DateTime.Now.ToShortDateString();
                string fromDate = string.Empty;
                //fromDate = toDate.Split('-')[0] + "-" + toDate.Split('-')[1] + "-01";
                fromDate = DateTime.Now.Month + "/01/" + DateTime.Now.Year;

                objData.OpenConnection(objCurr.GetCompanyCode());
                {
                    dsActivity = objData.ExecuteDataSet("exec SP_hdGetActivitySummaryIR '" + objCurr.GetCompanyCode() + "','" + objCurr.GetUserCode() + "','" + fromDate + "','" + toDate + "'");
                }


                return(Json(objJson.Serialize(dsActivity)));
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                objData.CloseConnection();
            }
        }
Ejemplo n.º 7
0
        public void ExcuteAsynReport(FormCollection collection)
        {
            BL_ReportRegion _objBLReport = new BL_ReportRegion();
            string          userCode     = collection["hdnDownload"].ToString();

            string startDate = collection["txtFromDate"].ToString();

            //string startDate = DateTime.Parse(sd).ToString("yyyy-MM-dd");
            //01/04/2016
            string endDate = collection["txtToDate"].ToString();
            // string endDate = DateTime.Parse(ed).ToString("yyyy-MM-dd");

            // string unlistedDoctor = collection["type"].ToString();
            string dateSelection = collection["reportType"].ToString();
            string MissedDoc     = "";

            if (collection["missed"] == "MISSED")
            {
                MissedDoc = "1";
            }
            else
            {
                MissedDoc = "0";
            }
            string UnlistedDoc = "";

            if (collection["Unlisted"] == "INCLUDE")
            {
                UnlistedDoc = "1";
            }
            else
            {
                UnlistedDoc = "0";
            }
            string UserSelection = string.Empty;

            // string reportName = collection["title"].ToString();
            //string missedDoctor = collection["missed"].ToString();
            //string reportViewType = collection["reportViewType"].ToString();
            if (userCode.ToUpper() == "ALL")
            {
                userCode      = _objcurrentInfo.GetUserCode();
                UserSelection = "ALL";
            }
            else
            {
                userCode = userCode.Replace(",,", ",");
            }

            //string userSelection = collection["type"].ToString();
            string userSelection = string.Empty;

            string[] stDate = startDate.Split('/');
            string[] enDate = endDate.Split('/');
            startDate = stDate[2] + "-" + stDate[1] + "-" + stDate[0];
            endDate   = enDate[2] + "-" + enDate[1] + "-" + enDate[0];

            _objBLReport.ExcuteAsynLastSubmitted(_objcurrentInfo.GetCompanyCode(), _objcurrentInfo.GetUserCode(), userCode, startDate, endDate, userSelection, _objcurrentInfo.GetSubDomain(), MissedDoc, UnlistedDoc);
        }
Ejemplo n.º 8
0
 public ActionResult BatchCreation()
 {
     ViewBag.subDomainName   = _objCurrentInfo.GetSubDomain();
     ViewBag.CompanyCode     = _objCurrentInfo.GetCompanyCode();
     ViewBag.LoginRegionCode = _objCurrentInfo.GetRegionCode();
     ViewBag.LoginUserCode   = _objCurrentInfo.GetUserCode();
     return(View());
 }
Ejemplo n.º 9
0
        // Messages
        public int GetUnreadMessageCount()
        {
            int msgCount = 0;

            DataControl.BLMessaging objMsg = new DataControl.BLMessaging();
            msgCount = objMsg.GetUnreadMessageCount(objCurr.GetCompanyCode(), objCurr.GetUserCode());
            return(msgCount);
        }
Ejemplo n.º 10
0
        public ActionResult Index()
        {
            try
            {
                string managerApprovalPri = string.Empty;
                managerApprovalPri = GetpendingDCR();
                int    TPPendingApprovalUserCount = GetPendingApprovedTPUsersCount();
                int    SSPendingApprovalUserCount = GetPendingApprovedSSUsersCount();
                string regionCode = _objcurrentInfo.GetRegionCode();

                ViewBag.CurrentDate = System.DateTime.Now.ToShortDateString();
                bool isPayRollIntegrated = _objcurrentInfo.GetPayRollIntegratedStatus();
                ViewBag.isPayRollIntegrated = isPayRollIntegrated;
                string unApprovedDCRConfigValue = GetUnapprovedDCRCheckConfigValue();
                ViewBag.unApprovedDCRCheck = unApprovedDCRConfigValue;
                string singleActivityPerDay = GetSingleActivityperday();
                string LeaveEntryMode       = GetLeaveEntryMode();
                ViewBag.singleActivityPerDay       = singleActivityPerDay;
                ViewBag.LeaveEntryMode             = LeaveEntryMode;
                ViewBag.TPPendingApprovalUserCount = TPPendingApprovalUserCount;
                ViewBag.SSPendingApprovalUserCount = SSPendingApprovalUserCount;
                ViewBag.Region_Code  = regionCode;
                ViewBag.Company_Code = _objcurrentInfo.GetCompanyCode();
                //if (DataControl.CurrentInfo.IsMobile(Request.UserAgent))
                //{
                //    return View("Index.Mobile");
                //}
                //if (!string.IsNullOrEmpty(managerApprovalPri))
                //{
                //    return View("PendingApprovalScreen");
                //}
                //else
                //{
                //    return View();
                //}
                if (!string.IsNullOrEmpty(managerApprovalPri) || TPPendingApprovalUserCount > 0 || SSPendingApprovalUserCount > 0)
                {
                    if (DataControl.CurrentInfo.IsMobile(Request.UserAgent))
                    {
                        return(View("PendingApprovalScreen.Mobile"));
                    }
                    return(View("PendingApprovalScreen"));;
                }

                else
                {
                    if (DataControl.CurrentInfo.IsMobile(Request.UserAgent))
                    {
                        return(View("Index.Mobile"));
                    }
                    return(View());
                }
            }
            catch
            {
                throw;
            }
        }
Ejemplo n.º 11
0
        public ActionResult Index()
        {
            ViewBag.LoginUserCode = _objcurrentInfo.GetUserCode();
            ViewBag.todayDate     = DateTime.Now.ToString("yyyy/MM/dd");
            List <MVCModels.HiDoctor_Master.WeekendGroupModel> lstHolidayMethod = WeekendOffHolidayMethods(_objcurrentInfo.GetCompanyCode());

            ViewBag.holidayMethod = lstHolidayMethod.ToArray();
            return(View());
        }
Ejemplo n.º 12
0
        public bool InsertRegionTypeTree(FormCollection collection)
        {
            try
            {
                bool      result = true;
                string    query = "", parentregionTypeCode = "";
                int       level        = 0;
                DataSet   dsRegionType = new DataSet();
                DataRow[] drFilter;

                string companyCode = _objcurrentInfo.GetCompanyCode();
                dsRegionType = _objSPData.GetRegionTypeMaster(companyCode);
                if (dsRegionType.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow dr in dsRegionType.Tables[0].Rows)
                    {
                        if (dr["Region_Type_Code"].ToString() == dr["Under_Region_Type"].ToString())
                        {
                            level++;
                            parentregionTypeCode = dr["Region_Type_Code"].ToString();
                        }
                        else
                        {
                            drFilter = dsRegionType.Tables[0].Select("Under_Region_Type='" + parentregionTypeCode + "' AND Region_Type_Code <> '" + parentregionTypeCode + "'");
                            if (drFilter.Length > 0)
                            {
                                parentregionTypeCode = drFilter[0]["Region_Type_Code"].ToString();
                                level++;
                            }
                        }
                        query += "UPDATE tbl_SFA_Region_Type_Master  SET Region_Type_Level ='L" + level + "' ,Region_Type_Order =" + level + " WHERE Region_Type_Code='" + dr["Region_Type_Code"].ToString() + "' AND Region_Type_ID='" + dr["Region_Type_ID"].ToString() + "';";
                    }

                    if (!string.IsNullOrEmpty(query))
                    {
                        query = query.TrimEnd(';');
                    }
                    int results = _objSPData.ExecuteStoredProcedure("ExecQuery", query, companyCode);
                    if (results == 1)
                    {
                        result = true;
                    }
                    else
                    {
                        result = false;
                    }
                    return(result);
                }


                return(result);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 13
0
        public JsonResult GetUserType()
        {
            DataControl.CurrentInfo objCurInfo = new DataControl.CurrentInfo();
            BLMaster _objMaster = new BLMaster();
            List <DivisionUserProducts> lstUserType = new List <DivisionUserProducts>();

            lstUserType = _objMaster.GetUserTypeNamesforProductMapping(_objcurrentInfo.GetCompanyCode()).ToList();
            DataControl.JSONConverter objJson = new DataControl.JSONConverter();
            return(Json(objJson.Serialize(lstUserType)));
        }
Ejemplo n.º 14
0
        public JsonResult GetReportsMenu(FormCollection collection)
        {
            DataSet dsReport = new DataSet();

            DataControl.JSONConverter json = new DataControl.JSONConverter();

            dsReport = _objSPData.GetSFAWAReportsMenu(_objcurrentInfo.GetCompanyCode(), _objcurrentInfo.GetUserTypeCode());

            return(Json(json.Serialize(dsReport), JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 15
0
        /// <summary>
        /// Bind the ExpenseEntityMaster with Html table
        /// </summary>
        /// <returns></returns>
        public string GetExpenseEntityMaster()
        {
            string companyCode = _objcurrentInfo.GetCompanyCode();

            try
            {
                BLMaster Master = new BLMaster();
                DataSet  dsExpenseEntityMaster = new DataSet();
                dsExpenseEntityMaster = Master.GetExpenseEntityMaster(companyCode);

                StringBuilder sb = new StringBuilder();
                sb.Append("<table WIDTH='75%' id='tblsummary' class='table table-striped' >");
                sb.Append("<thead class='active'>");
                sb.Append("<tr style='background-color:grey;'>");
                sb.Append("<td>Edit</td>");
                sb.Append("<td>Change Status</td>");
                sb.Append("<td>Entity Name</td>");
                sb.Append("<td>Effective From</td>");
                sb.Append("<td>Effective To</td>");
                sb.Append("<td>Status</td>");
                sb.Append("</tr>");
                sb.Append("</thead>");
                sb.Append("<tbody>");

                if (dsExpenseEntityMaster != null && dsExpenseEntityMaster.Tables[0] != null && dsExpenseEntityMaster.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < dsExpenseEntityMaster.Tables[0].Rows.Count; i++)
                    {
                        sb.Append("<tr><td class='td-a'><a id='E" + i + "' onclick='fnEdit(this)'>Edit</a></td>");
                        sb.Append("<td class='td-a'><a id='C" + i + "' onclick='fnchangeStatus(this)'>Change Status</a></td>");
                        sb.Append("<td style='display:none' id='Expense_Entity_Code" + i + "'>" + dsExpenseEntityMaster.Tables[0].Rows[i]["Expense_Entity_Code"].ToString() + "</td>");
                        sb.Append("<td id='Expense_Entity_Name" + i + "'>" + dsExpenseEntityMaster.Tables[0].Rows[i]["Expense_Entity_Name"].ToString() + "</td>");
                        sb.Append("<td id='Effective_From" + i + "'>" + dsExpenseEntityMaster.Tables[0].Rows[i]["Effective_From"].ToString() + "</td>");
                        sb.Append("<td id='Effective_To" + i + "'>" + dsExpenseEntityMaster.Tables[0].Rows[i]["Effective_To"].ToString() + "</td>");
                        sb.Append("<td id='Row_Status" + i + "'>" + dsExpenseEntityMaster.Tables[0].Rows[i]["Row_Status"].ToString() + "</td></tr>");
                    }
                }

                else
                {
                    sb.Append("<tr><td>No records To Display</td></tr>");
                }

                sb.Append("</body>");
                sb.Append("</table>");
                return(sb.ToString());
            }
            catch (Exception ex)
            {
                Dictionary <string, string> dicContext = new Dictionary <string, string>();
                dicContext.Add("Filter:companyCode", companyCode);
                DataControl.Impl.ExceptionHandler.WriteLog(ex, dicContext);
                return(ex.Message.ToString());
            }
        }
Ejemplo n.º 16
0
        public object GetUserInstantReport(string dcrActualDate, string flag)
        {
            string  companyCode  = _objCurrentInfo.GetCompanyCode();
            string  userCode     = _objCurrentInfo.GetUserCode();
            string  regionCode   = _objCurrentInfo.GetRegionCode();
            string  dcrCode      = _objCurrentInfo.GetDCRCode(dcrActualDate);
            DataSet dsDCRDetails = _objSPData.GetInstantReportDetails(companyCode, userCode, regionCode, dcrActualDate, dcrCode, flag);

            DataControl.JSONConverter jsonConvert = new  DataControl.JSONConverter();
            return(jsonConvert.Serialize(dsDCRDetails));
        }
Ejemplo n.º 17
0
        /// <summary>
        /// get the selected message details
        /// </summary>
        /// <param name="msgCode"></param>
        /// <returns>returns the selected message details in the form of json </returns>
        public string GetSelectedMsgDetails(string msgCode, string TargetAddress)
        {
            DataControl.CurrentInfo   objCurInfo = new DataControl.CurrentInfo();
            DataControl.BLMessaging   objMsg     = new DataControl.BLMessaging();
            DataControl.JSONConverter objJson    = new DataControl.JSONConverter();
            DataControl.Repository.AzureBlobUpload objAzureUpload = new DataControl.Repository.AzureBlobUpload();
            DataControl.Abstraction.IFileProvider  objPathProv    = new DataControl.Impl.FileSystemProvider();
            string accKey  = objPathProv.GetConfigValue("NBFILES");
            string blobURL = accKey + objCurInfo.GetCompanyCode().ToLower();

            return(objJson.Serialize(objMsg.GetSelectedMsgDetails(objCurInfo.GetCompanyCode(), msgCode, TargetAddress)) + "~" + blobURL);
        }
Ejemplo n.º 18
0
        /// <summary>
        /// Bind the RegionCategory with Html
        /// </summary>
        /// <returns></returns>
        public string GetRegionCategoryMaster()
        {
            string companyCode = _objcurrentInfo.GetCompanyCode();

            try
            {
                BLMaster Master           = new BLMaster();
                DataSet  dsRegionCategory = new DataSet();
                dsRegionCategory = Master.GetRegionCategory(companyCode);

                StringBuilder sb = new StringBuilder();
                //sb.Append("<table WIDTH='50%' id='tblsummary' class='table table-striped' >");
                //sb.Append("<thead class='active'>");
                //sb.Append("<tr  style='background-color:#428bca;'>");
                //sb.Append("<td>Edit</td>");
                ////sb.Append("<td>Change Status</td>");
                //sb.Append("<td>Region Category Name</td>");
                //sb.Append("<td>Status</td>");
                //sb.Append("</tr>");
                //sb.Append("</thead>");
                //sb.Append("<tbody>");
                ////
                //if (dsRegionCategory != null && dsRegionCategory.Tables[0] != null && dsRegionCategory.Tables[0].Rows.Count > 0)
                //{
                //    for (int i = 0; i < dsRegionCategory.Tables[0].Rows.Count; i++)
                //    {
                //        sb.Append("<tr><td class='td-a'><a id='E" + i + "' onclick='fnEdit(this)'>Edit</a></td>");
                //      // sb.Append("<tr><td class='td-b'><b id='D" + i + "' onclick='fnChange(this)'>Change Status</b></td>");
                //        sb.Append("<td style='display:none' id='Region_Classification_Code" + i + "'>" + dsRegionCategory.Tables[0].Rows[i]["Region_Classification_Code"] + "</td>");
                //        sb.Append("<td id='Region_Classification_Name" + i + "'>" + dsRegionCategory.Tables[0].Rows[i]["Region_Classification_Name"] + "</td>");
                //        sb.Append("<td id='Record_Status" + i + "'>" + dsRegionCategory.Tables[0].Rows[i]["Record_Status"] + "</td></tr>");
                //    }
                //}
                //else
                //{
                //    sb.Append("<tr><td>No records To Display</td></tr>");
                //}
                //sb.Append("</tbody>");
                //sb.Append("</table>");
                DataControl.JSONConverter _objJson = new DataControl.JSONConverter();
                return(_objJson.Serialize(dsRegionCategory));
            }
            catch (Exception ex)
            {
                //Dictionary<string, string> dicContext = new Dictionary<string, string>();
                //dicContext.Add("Filter:CompanyCode", companyCode);
                //DataControl.Impl.ExceptionHandler.WriteLog(ex, dicContext);
                //return ex.Message.;
                throw (ex);
            }
        }
Ejemplo n.º 19
0
        /// <summary>
        /// Returns a table string of All SubRegion Master
        /// </summary>
        /// <returns></returns>
        public string GetSubRegionMaster()
        {
            string companyCode = _objcurrentInfo.GetCompanyCode();

            try
            {
                StringBuilder strTbl       = new StringBuilder();
                BLMaster      _objBlMaster = new BLMaster();
                List <SubRegionMasterModel> lstSubRegionMaster = _objBlMaster.GetSubRegionMaster(companyCode).ToList();
                if (lstSubRegionMaster != null && lstSubRegionMaster.Count() > 0)
                {
                    strTbl.Append("<div class='table-responsive'>");
                    strTbl.Append("<table class='table table-striped' id='tblSubRegion' cellspacing='0' cellpadding='0'>");
                    strTbl.Append("<thead>");
                    strTbl.Append("<tr>");
                    strTbl.Append("<th>Edit</th>");
                    strTbl.Append("<th>Change Status</th>");
                    strTbl.Append("<th>Sub Region Name</th>");
                    strTbl.Append("<th>Under Region</th>");
                    strTbl.Append("<th>Status</th></tr>");
                    strTbl.Append("</thead>");
                    strTbl.Append("<tbody>");
                    int rowCount = 0;
                    foreach (var subRegion in lstSubRegionMaster)
                    {
                        strTbl.Append("<tr id='" + rowCount + "'>");
                        strTbl.Append("<td ><a href='#' onclick='fnEditSubRegionMaster(\"" + subRegion.SubRegion_Code + "|" + subRegion.SubRegion_Name + "|" + subRegion.UnderRegion_Code + "|" + subRegion.UnderRegion + "\");'>Edit</a></td>");
                        strTbl.Append("<td ><a href='#' onclick='fnChangestatusSubRegionMaster(\"" + subRegion.SubRegion_Code + "|" + subRegion.SubRegion_Status + "\");'>Change Status</a></td>");
                        strTbl.Append("<td>" + subRegion.SubRegion_Name + "</td>");
                        strTbl.Append("<td>" + subRegion.UnderRegion + "</td>");
                        strTbl.Append("<td>" + subRegion.SubRegion_Status + "</td>");
                        strTbl.Append("<tr>");
                    }
                }
                else
                {
                    strTbl.Append("No Records To Display.");
                }
                strTbl.Append("</tbody>");
                strTbl.Append("</table></div>");

                return(strTbl.ToString());
            }
            catch (Exception ex)
            {
                Dictionary <string, string> dicContext = new Dictionary <string, string>();
                DataControl.Impl.ExceptionHandler.WriteLog(ex, dicContext);
                return("FAIL^" + ex.Message);
            }
        }
Ejemplo n.º 20
0
        public int InsertCampaignPlanner(string regionCode, string regionName, string cpName, string categoryCode, string categoryName,
                                         string sfcDetails, string doctorDetails, string Mode, string CPCode, string workArea, string CPStatus, string EditPrivilege)
        {
            int rowsAffected = 0;

            try
            {
                DataControl.CurrentInfo       _objCurInfo = new DataControl.CurrentInfo();
                DataControl.BLCampaignPlanner _objBlCP    = new DataControl.BLCampaignPlanner();
                rowsAffected = _objBlCP.InsertCampaignPlanner(_objCurInfo.GetCompanyCode(), regionCode, regionName, cpName, categoryCode,
                                                              categoryName, sfcDetails, doctorDetails,
                                                              Mode, CPCode, _objCurInfo.GetUserName(), workArea, CPStatus, EditPrivilege);
            }
            catch (Exception ex)
            {
                Dictionary <string, string> dicObj = new Dictionary <string, string>();
                dicObj.Add("regionCode", regionCode);
                dicObj.Add("regionName", regionName);
                dicObj.Add("cpName", cpName);
                dicObj.Add("categoryCode", categoryCode);
                dicObj.Add("categoryName", categoryName);
                dicObj.Add("sfcDetails", sfcDetails);
                dicObj.Add("doctorDetails", doctorDetails);
                dicObj.Add("Mode", Mode);
                dicObj.Add("CPCode", CPCode);
                DataControl.Impl.ExceptionHandler.WriteLog(ex: ex, dic: dicObj);
            }
            return(rowsAffected);
        }
Ejemplo n.º 21
0
 public ActionResult RCPABatchIndex()
 {
     DataControl.CurrentInfo objCurInfo = new DataControl.CurrentInfo();
     ViewBag.Companycode = objCurInfo.GetCompanyCode();
     ViewBag.ErrorCode   = "";
     return(View());
 }
Ejemplo n.º 22
0
        private DataTable ConvertCCMExcelToDataTable(System.Web.HttpPostedFileBase postedFile)
        {
            IFileProvider fileProvider  = new FileSystemProvider();
            IExcelFactory excelFactory  = new ExcelFactory();
            CurrentInfo   objCurInfo    = new CurrentInfo();
            string        containerName = objCurInfo.GetCompanyCode().ToLower();
            string        fileName      = postedFile.FileName;

            string[] excelRetrieveColumns = new string[] { "Row_No", "Customer_Name", "Sur_Name", "Speciality_Name", "Gender", "Qualification", "Address1",
                                                           "Address2", "Local_Area", "Pin_Code", "City", "State", "Country", "Phone", "Mobile", "Fax", "Email", "Hospital_Name", "Hospital_Classification",
                                                           "DOB", "Anniversary_Date", "Registration_No" };

            _CCMExcelTemplateFileName = fileProvider.GetFilePathToSave(UPLOAD_PATH_KEY_NAME, fileName);
            string whereQuery = " LEN(Customer_Name) >0 ";

            DataControl.Repository.AzureBlobUpload objAzureUpload = new Repository.AzureBlobUpload();
            DataControl.Abstraction.IFileProvider  objPathProv    = new DataControl.Impl.FileSystemProvider();

            string accKey = objPathProv.GetConfigValue("UPLOADEDFILEBLOBACCKEY");

            string blobURL = objAzureUpload.PutAzureBlobStorage(postedFile.InputStream, postedFile.FileName, accKey, containerName);

            System.IO.Stream stream = objAzureUpload.AzureblockDownload(postedFile.FileName, accKey, containerName);
            DataTable        dt     = new DataTable();

            dt = objAzureUpload.ConvertStreamToDataTable(stream, "Customer_Name");
            return(dt);
        }
Ejemplo n.º 23
0
 public PartialViewResult ChemistDetails()
 {
     ViewBag.CompanyCode = _objCurrentInfo.GetCompanyCode();
     ViewBag.UserCode    = _objCurrentInfo.GetUserCode();
     ViewBag.RegionCode  = _objCurrentInfo.GetRegionCode();
     return(PartialView());
 }
Ejemplo n.º 24
0
 /// <summary>
 /// Method is Used To get the User details for HidoctorStartDate
 /// </summary>
 /// <returns></returns>
 private IEnumerable <MVCModels.HiDoctor_Master.UserModel> GetHidoctorStartDate()
 {
     try
     {
         MVCModels.HiDoctor_Master.UserModel objHidoctorstartdate = new MVCModels.HiDoctor_Master.UserModel();
         BLMaster objMaster = new BLMaster();
         objHidoctorstartdate.Company_Code = _objcurrentInfo.GetCompanyCode();
         return(objMaster.GetHidoctorStartdateDetails(objHidoctorstartdate));
     }
     catch (Exception ex)
     {
         Dictionary <string, string> dicObj = new Dictionary <string, string>();
         DataControl.Impl.ExceptionHandler.WriteLog(ex, dicObj);
         return(null);
     }
 }
Ejemplo n.º 25
0
 public string RegionChangeStatus(string regionTypeCode, string ChangeStatus)
 {
     try
     {
         string result       = "";
         string statusChange = "0";
         if (ChangeStatus == "0")
         {
             statusChange = "1";
         }
         else
         {
             statusChange = "0";
         }
         DataControl.BLMaster    _objBlmaster    = new DataControl.BLMaster();
         DataControl.CurrentInfo _objCurrentInfo = new DataControl.CurrentInfo();
         string updatedDate = System.DateTime.Now.ToString("yyyy-MM-dd");
         string status      = _objBlmaster.RegionChangeStatus(_objCurrentInfo.GetCompanyCode(), regionTypeCode, statusChange, _objCurrentInfo.GetUserCode(), updatedDate);
         result = status.ToString();
         return(result);
     }
     catch (Exception ex)
     {
         Dictionary <string, string> dicContext = new Dictionary <string, string>();
         dicContext.Add("Filter:RegionTypeCode", regionTypeCode);
         dicContext.Add("Filter:ChangeStatus", ChangeStatus);
         DataControl.Impl.ExceptionHandler.WriteLog(ex, dicContext);
         throw new Exception("Sorry an error occurred. Please try again later");
     }
 }
Ejemplo n.º 26
0
 public ActionResult Index()
 {
     _objCurrentInfo      = new CurrentInfo();
     ViewBag.Company_Code = _objCurrentInfo.GetCompanyCode();
     ViewBag.User_Code    = _objCurrentInfo.GetUserCode();
     return(View());
 }
Ejemplo n.º 27
0
        public string GetUnderUserTypes()
        {
            StringBuilder strContent = new StringBuilder();

            try
            {
                DataControl.CurrentInfo objCurInfo = new DataControl.CurrentInfo();
                string userCode    = objCurInfo.GetUserCode();
                string companyCode = objCurInfo.GetCompanyCode();
                List <MVCModels.HiDoctor_Master.UserTypeModel> lstUserType = new List <MVCModels.HiDoctor_Master.UserTypeModel>();
                lstUserType = _objBLDcrStatusMaster.GetUnderUserTypes(companyCode, userCode).ToList();
                strContent.Append("<option value=''>-Select User Type-</option>");
                if (lstUserType.Count > 0)
                {
                    foreach (var dr in lstUserType)
                    {
                        strContent.Append("<option value='" + dr.User_Type_Code + "'>" + dr.User_Type_Name + "</option>");
                    }
                }
            }
            catch (Exception ex)
            {
                Dictionary <string, string> dicObj = new Dictionary <string, string>();
                DataControl.Impl.ExceptionHandler.WriteLog(ex: ex, dic: dicObj);
            }
            return(strContent.ToString());
        }
Ejemplo n.º 28
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);
        }
Ejemplo n.º 29
0
        public string GetDoctorSufPreColumns()
        {
            IConfigSettings IConfig_Settings = new Config_Settings();

            _objCurrentInfo = new CurrentInfo();
            return(IConfig_Settings.GetConfigDefaultValue(_objCurrentInfo.GetCompanyCode(), CONFIG_TYPE.DCR, CONFIG_KEY.DCR_DOCTOR_SUFIX_COLUMNS));
        }
Ejemplo n.º 30
0
 public JsonResult GetNotification(FormCollection collection)
 {
     try
     {
         DataSet dsCategory = new DataSet();
         objData.OpenConnection(objCurr.GetCompanyCode());
         {
             dsCategory = objData.ExecuteDataSet("exec SP_mhdGetNotification '" + objCurr.GetCompanyCode() + "','" + objCurr.GetUserCode() + "'");
         }
         return(Json(_objJson.Serialize(dsCategory), JsonRequestBehavior.AllowGet));
     }
     finally
     {
         objData.CloseConnection();
     }
 }