예제 #1
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());
        }
예제 #2
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());
        }
예제 #3
0
        public ActionResult OrderProcessing(string Lid)
        {
            if (Lid == null)
            {
                ViewBag.subDomainName = _objCurrentInfo.GetSubDomain();
                ViewBag.CompanyCode   = _objCurrentInfo.GetCompanyCode();
                ViewBag.RegionCode    = _objCurrentInfo.GetRegionCode();
                ViewBag.UserCode      = _objCurrentInfo.GetUserCode();
                ViewBag.Company_Id    = _objCurrentInfo.GetCompanyId();
                ViewBag.IsResponsive  = "No";
                System.Web.HttpContext.Current.Session["IsResponsive"] = "No";
            }
            else
            {
                string        parameters = System.Text.ASCIIEncoding.ASCII.GetString(System.Convert.FromBase64String(Lid));
                ParameterMode dd         = Newtonsoft.Json.JsonConvert.DeserializeObject <ParameterMode>(parameters);

                ViewBag.subDomainName = dd.SubDomain_Name;
                ViewBag.CompanyCode   = dd.Company_Code;
                ViewBag.RegionCode    = dd.Region_Code;
                ViewBag.UserCode      = dd.User_Code;
                ViewBag.Company_Id    = dd.Company_Id;
                ViewBag.IsResponsive  = "Yes";
                System.Web.HttpContext.Current.Session["IsResponsive"] = "Yes";
            }
            return(View());
        }
예제 #4
0
 public ActionResult BatchCreation()
 {
     ViewBag.subDomainName   = _objCurrentInfo.GetSubDomain();
     ViewBag.CompanyCode     = _objCurrentInfo.GetCompanyCode();
     ViewBag.LoginRegionCode = _objCurrentInfo.GetRegionCode();
     ViewBag.LoginUserCode   = _objCurrentInfo.GetUserCode();
     return(View());
 }
예제 #5
0
 public ActionResult SFCRegion(string SFCVersion)
 {
     ViewBag.SFCVersion  = "Y";
     ViewBag.FromDate    = DateTime.Now.AddDays(1).ToString("dd/MM/yyyy");
     ViewBag.Todate      = "31/12/2099";
     ViewBag.Region_Code = _objcurrentInfo.GetRegionCode();
     return(View());
 }
예제 #6
0
        /// <summary>
        ///  Method to bind the data with HtmlCycleMaster Table
        /// </summary>
        /// <returns></returns>
        public string GetCycleMaster()
        {
            string companyCode   = _objcurrentInfo.GetCompanyCode();
            string regionCode    = _objcurrentInfo.GetRegionCode();
            string strRegionCode = string.Empty;

            try
            {
                List <CycleMasterModel> lstCycleMaster = (List <CycleMasterModel>)GetcycleMasterDetails(regionCode);
                StringBuilder           sb             = new StringBuilder();
                BLMaster objMaster = new BLMaster();

                sb.Append("<table WIDTH='60%' 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>Cycle Name</td>");
                sb.Append("<td>Region Name</td>");
                sb.Append("<td>Description</td>");
                sb.Append("<td>Status</td>");
                sb.Append("</tr>");
                sb.Append("</thead>");
                sb.Append("<tbody>");

                if (lstCycleMaster != null && lstCycleMaster.Count > 0)
                {
                    int i = 0;
                    foreach (var lstcycle in lstCycleMaster)
                    {
                        i++;
                        sb.Append("<tr><td class='td-a'><a id='E" + i + "' onclick='fnEdit(this)'>Edit</a></td>");
                        sb.Append("<td style='display:none' id='Cycle_Code" + i + "'>" + lstcycle.Cycle_Code + "</td>");
                        sb.Append("<td id='Cycle_Name" + i + "'>" + lstcycle.Cycle_Name + "</td>");
                        sb.Append("<td style='display:none' id='Region_Code" + i + "'>" + lstcycle.Region_Code + "</td>");
                        sb.Append("<td id='Region_Name" + i + "'>" + lstcycle.Region_Name + "</td>");
                        sb.Append("<td style='display:none' id='Start_Date" + i + "'>" + lstcycle.Start_Date + "</td>");
                        sb.Append("<td style='display:none' id='End_Date" + i + "'>" + lstcycle.End_Date + "</td>");
                        sb.Append("<td id='Long_Description" + i + "'>" + lstcycle.Long_Description + "</td>");
                        sb.Append("<td id='Record_Status" + i + "'>" + lstcycle.Record_Status + "</td></tr>");
                    }
                }
                else
                {
                    sb.Append("<span>No Records TO Display</span>");
                }
                sb.Append("</body>");
                sb.Append("</table>");
                return(sb.ToString());
            }
            catch (Exception ex)
            {
                Dictionary <string, string> dicContext = new Dictionary <string, string>();
                dicContext.Add("Filter:regionCode", regionCode);
                DataControl.Impl.ExceptionHandler.WriteLog(ex, dicContext);
                return(ex.Message.ToString());
            }
        }
예제 #7
0
        public ActionResult Index(string id)
        {
            if (!string.IsNullOrEmpty(id))
            {
                ViewBag.TargetCode = id;
            }

            ViewBag.regionCode = _objCurr.GetRegionCode();
            return(View());
        }
예제 #8
0
        public string Index(FormCollection form)
        {
            string             result = "";
            HttpPostedFileBase file   = Request.Files[0];

            DataControl.CurrentInfo _objCurInfo   = new DataControl.CurrentInfo();
            MVCModels.RCPA_Header   objrcpaHeader = new MVCModels.RCPA_Header();
            objrcpaHeader.Company_Id   = Convert.ToInt32(_objCurInfo.GetCompanyId());
            objrcpaHeader.Company_code = _objCurInfo.GetCompanyCode();
            objrcpaHeader.user_code    = _objCurInfo.GetUserCode();
            // objrcpaHeader.Region_Code = _objCurInfo.GetRegionCode();
            // objrcpaHeader.PeriodTo = DateTime.Now;
            //objrcpaHeader.PeriodFrom = DateTime.Now;
            try
            {
                DateTime dt = DateTime.ParseExact(Request.Form["txtPeriodFrom"].ToString(), "dd/MM/yyyy", CultureInfo.InvariantCulture);
                objrcpaHeader.PeriodFrom = Convert.ToDateTime(dt.ToString("yyyy-MM-dd"));
                dt = DateTime.ParseExact(Request.Form["txtPeriodTo"].ToString(), "dd/MM/yyyy", CultureInfo.InvariantCulture);
                objrcpaHeader.PeriodTo    = Convert.ToDateTime(dt);
                objrcpaHeader.Region_Code = Request.Form["hdnRegion_Code"].ToString();
                string subDomain = _objCurInfo.GetSubDomain();
                result            = _objBLRCPACompetator.RCPAExcelBulkAddResult(subDomain, _objCurInfo.GetCompanyCode(), _objCurInfo.GetRegionCode(), Guid.NewGuid().ToString(), file, _objCurInfo.GetUserCode(), objrcpaHeader);
                ViewBag.ErrorCode = result;
                DataControl.CurrentInfo objCurInfo = new DataControl.CurrentInfo();
                ViewBag.Companycode = objCurInfo.GetCompanyCode();
                ViewBag.RegionCode  = objCurInfo.GetRegionCode();
            }
            catch (Exception ex)
            {
                result = ex.Message;
            }
            return(result);
        }
예제 #9
0
        public JsonResult CheckTPAvailableForSelectedDCRDates(string DCRDates)
        {
            try
            {
                _objSPData      = new SPData();
                _objcurrentInfo = new CurrentInfo();

                string company_Code = _objcurrentInfo.GetCompanyCode();
                string user_Code    = _objcurrentInfo.GetUserCode();
                string region_Code  = _objcurrentInfo.GetRegionCode();

                List <string> lstDCRDates = _objSPData.CheckTPAvailableForSelectedDCRDates(company_Code, user_Code, region_Code, DCRDates);

                // List<string> DCR_Dates = DCRDates.Split('^').ToList();
                // DCR_Dates = DCR_Dates.Where(d => d != "").ToList();
                // //compare two list and return not matching items using linq
                //List<string> lstDCRDatesWithoutPlan =  DCR_Dates.Except(lstDCRDates).ToList();
                if (lstDCRDates != null)
                {
                    return(Json(lstDCRDates));
                }
                return(null);
            }
            catch
            {
                throw;
            }
        }
예제 #10
0
 public PartialViewResult ChemistDetails()
 {
     ViewBag.CompanyCode = _objCurrentInfo.GetCompanyCode();
     ViewBag.UserCode    = _objCurrentInfo.GetUserCode();
     ViewBag.RegionCode  = _objCurrentInfo.GetRegionCode();
     return(PartialView());
 }
예제 #11
0
 public ActionResult NewLeaveEntry(string SSID)
 {
     if (!string.IsNullOrEmpty(SSID))
     {
         string         parameters = System.Text.ASCIIEncoding.ASCII.GetString(System.Convert.FromBase64String(SSID));
         DieticianModel obj        = Newtonsoft.Json.JsonConvert.DeserializeObject <DieticianModel>(parameters);
         ViewBag.CompanyCode  = obj.Company_Code;
         ViewBag.RegionCode   = obj.Region_Code;
         ViewBag.UserCode     = obj.User_Code;
         ViewBag.UserTypeCode = obj.User_Type_Code;
         ViewBag.UserName     = obj.User_Name;
         ViewBag.RegionName   = obj.Region_Name;
         ViewBag.latitude     = obj.latitude;
         ViewBag.longitude    = obj.longitude;
     }
     else
     {
         DataControl.CurrentInfo objCurInfo = new DataControl.CurrentInfo();
         ViewBag.Companycode  = objCurInfo.GetCompanyCode();
         ViewBag.Usercode     = objCurInfo.GetUserCode();
         ViewBag.RegionCode   = objCurInfo.GetRegionCode();
         ViewBag.UserTypecode = objCurInfo.GetUserTypeCode();
         ViewBag.UserName     = objCurInfo.GetUserName();
     }
     return(View());
 }
예제 #12
0
 public ActionResult OBOUserRegionMapping()
 {
     DataControl.CurrentInfo _objcurrentInfo = new DataControl.CurrentInfo();
     ViewBag.Cur_Region_Code = _objcurrentInfo.GetRegionCode();
     ViewBag.Cur_User_Code   = _objcurrentInfo.GetUserCode();
     return(View());
 }
예제 #13
0
        //
        // GET: /Organogram/Create

        public ActionResult Create()
        {
            ViewBag.Cur_Region_Code = _objcurrentInfo.GetRegionCode();
            ViewBag.Cur_User_Code   = _objcurrentInfo.GetUserCode();
            ViewBag.Lat             = _objcurrentInfo.GetLattitude();
            ViewBag.Long            = _objcurrentInfo.GetLongitude();
            return(View());
        }
예제 #14
0
 public ActionResult Index()
 {
     DataControl.CurrentInfo objCurInfo = new DataControl.CurrentInfo();
     ViewBag.Companycode = objCurInfo.GetCompanyCode();
     ViewBag.RegionCode  = objCurInfo.GetRegionCode();
     ViewBag.ErrorCode   = "";
     return(View());
 }
예제 #15
0
        public JsonResult GetRegionTypes()
        {
            DAL_Reports_CategoryWiseDrVisitAnalysis objDAL = new DAL_Reports_CategoryWiseDrVisitAnalysis();

            DataControl.CurrentInfo _objcurrentInfo = new DataControl.CurrentInfo();

            string companyCode = _objcurrentInfo.GetCompanyCode();

            dsRegionType = objDAL.GetRegionTypes(companyCode);

            DataRow[] rowFilter;

            rowFilter = dsRegionType.Tables[0].Select("Region_Type_Code = Under_Region_Type");

            if (rowFilter.Length > 0)
            {
                foreach (DataRow dr in rowFilter)
                {
                    regionTypeLevelNo = 1;

                    dr["Level_No"] = regionTypeLevelNo.ToString();

                    dsRegionType.Tables[0].AcceptChanges();
                }

                foreach (DataRow dr in rowFilter)
                {
                    GenerateRegionTypeLevel(dr["Region_Type_Code"].ToString());
                }
            }

            DataSet ds             = new DataSet();
            string  regionCode     = string.Empty;
            string  regionTypeCode = string.Empty;

            regionCode     = _objcurrentInfo.GetRegionCode();
            regionTypeCode = objDAL.GetRegionTypeCode(companyCode, regionCode);

            ds = dsRegionType.Clone();

            rowFilter = dsRegionType.Tables[0].Select("Region_Type_Code = '" + regionTypeCode + "'");

            if (rowFilter.Length > 0)
            {
                regionTypeLevelNo = Convert.ToInt16(rowFilter[0]["Level_No"].ToString());

                rowFilter = dsRegionType.Tables[0].Select("Level_No >= '" + regionTypeLevelNo + "'");

                foreach (DataRow dr in rowFilter)
                {
                    ds.Tables[0].ImportRow(dr);
                    ds.Tables[0].AcceptChanges();
                }
            }

            DataControl.JSONConverter json = new DataControl.JSONConverter();
            return(Json(json.Serialize(ds), JsonRequestBehavior.AllowGet));
        }
예제 #16
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;
            }
        }
예제 #17
0
 public ActionResult MasterDataDownload()
 {
     DataControl.CurrentInfo objCurInfo = new DataControl.CurrentInfo();
     ViewBag.Companycode = objCurInfo.GetCompanyCode();
     ViewBag.UserCode    = objCurInfo.GetUserCode();
     ViewBag.RegionCode  = objCurInfo.GetRegionCode();
     ViewBag.Usercode    = objCurInfo.GetUserCode();
     return(View());
 }
예제 #18
0
        //
        // GET: /Order/

        public ActionResult OrderList()
        {
            BLUser objUser = new BLUser();
            List <MVCModels.HiDoctor_Master.UserModel> lstUser = new List <MVCModels.HiDoctor_Master.UserModel>();

            lstUser = objUser.GetChildUsersCodeAndNameOnly(_objCurrentInfo.GetCompanyCode(), _objCurrentInfo.GetUserCode());
            ViewBag.Child_User_Count = lstUser.Count();

            string strRegionCode = _objCurrentInfo.GetRegionCode();

            strRegionCode         += "^";
            ViewBag.LineOfBusiness = objBLOrder.GetCheckLineOfBusiness(strRegionCode);
            ViewBag.Region_Code    = _objCurrentInfo.GetRegionCode();
            ViewBag.Region_Name    = _objCurrentInfo.GetRegionName();
            ViewBag.Current_Month  = System.DateTime.Now.Month + "-" + System.DateTime.Now.Year;
            ViewBag.Previous_Month = System.DateTime.Now.AddMonths(-1).Month + "-" + System.DateTime.Now.AddMonths(-1).Year;
            ViewBag.Next_Month     = System.DateTime.Now.AddMonths(1).Month + "-" + System.DateTime.Now.AddMonths(1).Year;
            return(View());
        }
예제 #19
0
        public JsonResult GetRegionTypes()
        {
            DAL_DoctorVisitAnalysis objDAL = new DAL_DoctorVisitAnalysis();

            DataControl.CurrentInfo _objcurrentInfo = new DataControl.CurrentInfo();
            DataSet ds = new DataSet();

            ds = objDAL.GetRegionTypes(_objcurrentInfo.GetCompanyCode(), _objcurrentInfo.GetRegionCode());
            DataControl.JSONConverter json = new DataControl.JSONConverter();
            return(Json(json.Serialize(ds), JsonRequestBehavior.AllowGet));
        }
예제 #20
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));
        }
예제 #21
0
        //
        // GET: /Division/

        public ActionResult Index()
        {
            DataControl.CurrentInfo _objCurInfo = new DataControl.CurrentInfo();
            string getusertypename = GetUserType();

            ViewBag.getusertypename = getusertypename;
            ViewBag.CompanyCode     = _objCurInfo.GetCompanyCode();
            ViewBag.UserName        = _objCurInfo.GetUserName();
            ViewBag.User_Code       = _objCurInfo.GetUserCode();
            ViewBag.Region_Code     = _objCurInfo.GetRegionCode();
            return(View());
        }
예제 #22
0
 public JsonResult GetDrCoverage(MVCModels.DashboardV2Model _objData)
 {
     _objDashboardV2.CompanyCode   = _objCurrentInfo.GetCompanyCode();
     _objDashboardV2.RegionCode    = _objCurrentInfo.GetRegionCode();
     _objDashboardV2.DivisionCode  = _objData.DivisionCode;
     _objDashboardV2.CoverageInput = _objData.CoverageInput;
     return(Json(_objDashboardV2.GetDrCoverage().ToList(), JsonRequestBehavior.AllowGet));
 }
예제 #23
0
        public ViewResult ReconSummary(bool IsEdit = false, int HeaderId = 0)
        {
            DataControl.CurrentInfo _objcurr = new DataControl.CurrentInfo();
            ViewBag.Compnay_Code    = _objcurr.GetCompanyCode();
            ViewBag.loginUserCode   = _objcurr.GetUserCode();
            ViewBag.LoginRegionCode = _objcurr.GetRegionCode();

            //purpose of recon approve functions used
            ViewBag.Compnay_Id = _objcurr.GetCompanyId();
            ViewBag.IsEdit     = IsEdit;
            ViewBag.HeaderId   = HeaderId;

            return(View());
        }
예제 #24
0
        //private string _queueAccountKey = ConfigurationManager.AppSettings["ServiceBusConnection"].ToString();
        //private string _topicName = ConfigurationManager.AppSettings["busDCRTopicName"].ToString();
        //private string _subscriptionName = ConfigurationManager.AppSettings["busDCRSubscriptionName"].ToString();
        #endregion Private Variables

        public ActionResult Index(string dcrDate, string dcrStatus, string entity, string travelkm, string isRCPA, string flag, string actvity, string cpCode, string tpCode, string isThereAnyOneDoctorSavedA)
        {
            string[] viewArray    = new string[6];
            string   cvforPrefill = string.Empty;

            viewArray[0] = dcrDate;
            viewArray[1] = dcrStatus;
            viewArray[2] = entity;
            viewArray[3] = travelkm;
            viewArray[4] = _objCurr.GetDCRCode(dcrDate);
            viewArray[5] = flag;

            ViewBag.isrcpa   = isRCPA;
            ViewBag.userCode = _objCurr.GetUserCode();
            ViewBag.activity = actvity;
            ViewBag.CPCode   = cpCode;
            ViewBag.TPCode   = tpCode;

            ViewBag.viewArray   = viewArray;
            cvforPrefill        = GetConfigvalues();
            ViewBag.PrefillCV   = cvforPrefill;
            ViewBag.CompanyCode = _objCurr.GetCompanyCode();
            ViewBag.User_Code   = _objCurr.GetUserCode();
            ViewBag.Region_Code = _objCurr.GetRegionCode();
            ViewBag.isThereAnyOneDoctorSavedA = isThereAnyOneDoctorSavedA;


            if (DataControl.CurrentInfo.IsMobile(Request.UserAgent))
            {
                return(View("Index.Mobile"));
            }
            else
            {
                return(View());
            }
        }
예제 #25
0
        // customer detail based on the entity
        public JsonResult GetCustomerDetails(FormCollection coll)
        {
            List <MVCModels.HiDoctor_Master.CustomerModel> lstCust = new List <MVCModels.HiDoctor_Master.CustomerModel>();
            IOTC   icustDetail = new BAL_OTC();
            string regionCode  = string.Empty;

            if (coll["customerEntity"].ToString().ToUpper() == customerEntity) //  if cust entity is equals to ALL, it returns all the customer detail for the reion code.
            {
                string mode = coll["mode"].ToString();
                lstCust = icustDetail.GetCustomerDetails(_objcurrentInfo.GetCompanyCode(), _objcurrentInfo.GetRegionCode(), mode);
            }
            else
            {
                regionCode = (coll["regionCode"].ToString() == IsSession) ? _objcurrentInfo.GetRegionCode() : coll["regionCode"].ToString();
                lstCust    = icustDetail.GetCustomerDetails(_objcurrentInfo.GetCompanyCode(), coll["match"].ToString(), regionCode, coll["customerEntity"].ToString());
            }

            return(Json(lstCust, JsonRequestBehavior.AllowGet));
        }
예제 #26
0
        public string InsertandUpdatetheDCRRequestScreen(string editRequestId, string requestcategoryId, string reguestCategoryName, string fromDate, string toDate, string mode, string remarks)
        {
            string result       = string.Empty;
            int    rowsAffected = 0;
            long   requestId    = 0;
            List <DCRRestrictionModel> lstDCRRequest = new List <DCRRestrictionModel>();
            BLMaster _objMaster = new BLMaster();

            try
            {
                DALCampaignPlanner Objcampaign = new DALCampaignPlanner();
                requestId = Objcampaign.GetSeqNumber("SEQ_tbl_SFA_DCR_Restriction");
                string companyCode   = _objcurrentInfo.GetCompanyCode();
                string userCode      = _objcurrentInfo.GetUserCode();
                string regionCode    = _objcurrentInfo.GetRegionCode();
                string requestedDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:fff");
                if (mode.ToUpper() == "I")
                {
                    DCRRestrictionModel objDCRRequest = new DCRRestrictionModel();
                    objDCRRequest.Request_Id            = requestId.ToString();
                    objDCRRequest.Company_Code          = companyCode;
                    objDCRRequest.User_Code             = userCode;
                    objDCRRequest.Region_Code           = regionCode;
                    objDCRRequest.Request_Category_Id   = requestcategoryId;
                    objDCRRequest.Request_Category_Name = reguestCategoryName;
                    objDCRRequest.Date_From             = fromDate;
                    objDCRRequest.Date_To        = toDate;
                    objDCRRequest.Request_Status = "1";
                    lstDCRRequest.Add(objDCRRequest);
                    rowsAffected = _objMaster.InsertforDCRRequestScreen(lstDCRRequest, requestId.ToString(), remarks, requestedDate);
                }
                else
                {
                    DCRRestrictionModel objDCRRequest = new DCRRestrictionModel();
                    objDCRRequest.Request_Id            = editRequestId;
                    objDCRRequest.Company_Code          = companyCode;
                    objDCRRequest.User_Code             = userCode;
                    objDCRRequest.Region_Code           = regionCode;
                    objDCRRequest.Request_Category_Id   = requestcategoryId;
                    objDCRRequest.Request_Category_Name = reguestCategoryName;
                    objDCRRequest.Date_From             = fromDate;
                    objDCRRequest.Date_To        = toDate;
                    objDCRRequest.Request_Status = "1";
                    lstDCRRequest.Add(objDCRRequest);
                    rowsAffected = _objMaster.UpdateforDCRRequestScreen(lstDCRRequest, editRequestId, remarks, requestedDate);
                }
                if (rowsAffected > 0)
                {
                    result = "SUCCESS: Saved Successfully.";
                }
                else
                {
                    result = "ERROR:Error while Inserrting.";
                }
                return(result);
            }
            catch (Exception ex)
            {
                Dictionary <string, string> dicContext = new Dictionary <string, string>();
                dicContext.Add("Filter:editRequestId", editRequestId);
                dicContext.Add("Filter:requestcategoryId", requestcategoryId);
                dicContext.Add("Filter:reguestCategoryName", reguestCategoryName);
                dicContext.Add("Filter:mode", mode);
                dicContext.Add("Filter:fromDate", fromDate);
                dicContext.Add("Filter:toDate", toDate);
                dicContext.Add("Filter:remarks", remarks);
                DataControl.Impl.ExceptionHandler.WriteLog(ex, dicContext);
                return(ex.Message.ToString());
            }
        }
예제 #27
0
 private string GetNextTwoPossibleDays(string dcrDate)
 {
     try
     {
         string possibleDays = string.Empty;
         objData.OpenConnection(objCurr.GetCompanyCode());
         {
             possibleDays = Convert.ToString(objData.ExecuteScalar("exec SP_hdGetNextTwoPossibleDays '" + objCurr.GetCompanyCode() + "','" + objCurr.GetUserCode() + "','" + objCurr.GetRegionCode() + "','" + dcrDate + "'"));
         }
         return(possibleDays);
     }
     finally
     {
         objData.CloseConnection();
     }
 }
예제 #28
0
        public string InsertStockistPoolAllocation(FormCollection col)
        {
            string      result  = string.Empty;
            BL_Customer objCust = new BL_Customer();

            result = objCust.InsertStockistPoolAllocation(_objcurrentInfo.GetCompanyCode(), col["stockist"].ToString(), col["product"].ToString(), col["territory"].ToString(), col["from"].ToString(), col["to"].ToString(), Convert.ToInt16(col["status"]), col["stockID"].ToString(), col["baseRegion"].ToString(), _objcurrentInfo.GetRegionCode());
            return(result);
        }
예제 #29
0
        public string GetMyDocumentstoDownload()
        {
            StringBuilder strTbl = new StringBuilder();
            List <MyDocumentTypeModel> lstDocumentTypes = new List <MyDocumentTypeModel>();
            int i = 0;

            try
            {
                lstDocumentTypes = _objBlMaster.GetMyDocumentstoDownload(_objcurrentInfo.GetCompanyCode(), _objcurrentInfo.GetUserCode(), _objcurrentInfo.GetRegionCode()).ToList();

                strTbl.Append("<table WIDTH='75%' id='tblMydoc' class='table table-striped'>");
                strTbl.Append("<thead class='active'>");
                strTbl.Append("<tr style='background-color:#428bca;'>");
                strTbl.Append("<th>Sl.No.</th>");
                strTbl.Append("<th>Type</th>");
                strTbl.Append("<th>Name</th>");
                strTbl.Append("<th> Actual File Name</th>");
                strTbl.Append("<th>Download</th>");
                strTbl.Append("</tr>");
                strTbl.Append("</thead>");
                strTbl.Append("<tbody>");
                if (lstDocumentTypes != null && lstDocumentTypes.Count > 0)
                {
                    foreach (var document in lstDocumentTypes)
                    {
                        i++;
                        strTbl.Append("<tr>");
                        //S.NO
                        strTbl.Append("<td>");
                        strTbl.Append(i);
                        strTbl.Append("</td>");
                        //Doc Type
                        strTbl.Append("<td>");
                        strTbl.Append(document.Doc_Type_Name);
                        strTbl.Append("</td>");
                        //Doc Name
                        strTbl.Append("<td>");
                        strTbl.Append(document.Doc_Name);
                        strTbl.Append("</td>");
                        strTbl.Append("<td>");
                        strTbl.Append(document.File_name);
                        strTbl.Append("</td>");
                        //Download
                        byte[] docidEncode = System.Text.Encoding.UTF8.GetBytes(document.Doc_Id);
                        String docId       = Convert.ToBase64String(docidEncode);
                        strTbl.Append("<td>");
                        strTbl.Append("<a class='td-a downloadicon' data-id= id='aSubmit'  style='text-decoration:underline !important;' onclick=\"fnSetDocId('" + docId + "');\">&nbsp;</a>");
                        strTbl.Append("</td>");
                        strTbl.Append("</tr>");
                    }
                }
                else
                {
                    strTbl.Append("No Document details found to download.");
                }
                strTbl.Append("</tbody>");
                strTbl.Append("</table>");

                return(strTbl.ToString());
            }
            catch (Exception ex)
            {
                Dictionary <string, string> dicContext = new Dictionary <string, string>();
                DataControl.Impl.ExceptionHandler.WriteLog(ex, dicContext);
                return(ex.Message.ToString());
            }
        }
예제 #30
0
 public int InsertDivisionEntityMapping(string divisionCode, string entityCode, string entityName)
 {
     try
     {
         DataControl.CurrentInfo _objCurInfo    = new DataControl.CurrentInfo();
         DataControl.BLDivision  _objBlDivision = new DataControl.BLDivision();
         return(_objBlDivision.DivisionEntityMapping(_objCurInfo.GetCompanyCode(), _objCurInfo.GetUserCode(), _objCurInfo.GetRegionCode(), entityCode, divisionCode, entityName, _objCurInfo.GetUserName()));
     }
     catch (Exception ex)
     {
         Dictionary <string, string> dicObj = new Dictionary <string, string>();
         dicObj.Add("EntityCode", entityCode);
         dicObj.Add("divisionCode", divisionCode);
         dicObj.Add("entityName", entityName);
         DataControl.Impl.ExceptionHandler.WriteLog(ex: ex, dic: dicObj);
         return(0);
     }
 }