Пример #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());
        }
Пример #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());
        }
Пример #3
0
 public ActionResult BatchCreation()
 {
     ViewBag.subDomainName   = _objCurrentInfo.GetSubDomain();
     ViewBag.CompanyCode     = _objCurrentInfo.GetCompanyCode();
     ViewBag.LoginRegionCode = _objCurrentInfo.GetRegionCode();
     ViewBag.LoginUserCode   = _objCurrentInfo.GetUserCode();
     return(View());
 }
Пример #4
0
        public void GetHolidayExcelDownload(FormCollection coll)
        {
            string blobUrl = string.Empty, error = string.Empty;

            DataControl.Repository.FileDownload objFileDownload = new DataControl.Repository.FileDownload();
            string holidayDate = string.Empty;

            if (!string.IsNullOrEmpty(coll["hdnSearchDate"]))
            {
                holidayDate = Convert.ToString(coll["hdnSearchDate"]);
            }
            try
            {
                System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
                DataControl.CurrentInfo _objCurr = new DataControl.CurrentInfo();
                string content = GetSearchHolidayDetails(holidayDate);

                DataControl.Abstraction.IConfigProvider iConfigPro   = new DataControl.Impl.ConfigProvider();
                DataControl.Repository.AzureBlobUpload  objAzureBlob = new DataControl.Repository.AzureBlobUpload();
                string accKey   = iConfigPro.GetConfigValue("SWAASBLOBACCKEY");
                string userName = _objCurr.GetUserName();
                string subDomin = _objCurr.GetSubDomain();
                string fileName = "HolidayMaster" + "_" + subDomin + "_" + userName + ".xls";

                blobUrl = objAzureBlob.AzureBlobUploadText(content.ToString(), accKey, fileName, "bulkdatasvc");
                objFileDownload.DownloadFile(blobUrl, fileName, out error);
            }
            catch (Exception ex)
            {
                Dictionary <string, string> dicObj = new Dictionary <string, string>();
                DataControl.Impl.ExceptionHandler.WriteLog(ex: ex, dic: dicObj);
            }
        }
Пример #5
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);
        }
Пример #6
0
        public ActionResult UploadedRegionExcel(HttpPostedFileBase fileUpload)
        {
            _objBLRegion = new BLRegion();
            string companyCode = _objcurrentInfo.GetCompanyCode();
            string subDomain   = _objcurrentInfo.GetSubDomain();
            string user_Code   = _objcurrentInfo.GetUserCode();
            string errorCode   = _objBLRegion.InsertRegionMasterBulkUpload(subDomain, companyCode, fileUpload, user_Code, _objcurrentInfo.GetUserName());

            ViewBag.ErrorCode = errorCode;
            return(View());
        }
Пример #7
0
        public ActionResult DFCExcelBulkAddResult(HttpPostedFileBase file)
        {
            string result = "";

            DataControl.BLMaster    _objMast    = new DataControl.BLMaster();
            DataControl.CurrentInfo _objCurInfo = new DataControl.CurrentInfo();
            string subDomain = _objCurInfo.GetSubDomain();

            result            = _objMast.InsertDFCExcelBulkUpload(subDomain, _objCurInfo.GetCompanyCode(), Guid.NewGuid().ToString(), file, _objCurInfo.GetUserCode());
            ViewBag.ErrorCode = result;
            return(View("DFCExcelBulkAddResult"));
        }
Пример #8
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());
        }
Пример #9
0
        public string GenerateYearWiseHolidayExcel(string regionCodes, string year, string SearchKey, int pageNumber, bool excelDownload)
        {
            int count          = 0;
            int totalPageCount = 0;

            DataControl.CurrentInfo objCurInfo = new DataControl.CurrentInfo();
            DataControl.BLRegion    objRegion  = new DataControl.BLRegion();
            IEnumerable <MVCModels.HiDoctor_Master.HolidayModel> lstHoliday = null;

            lstHoliday = objRegion.GetMappedHolidayDetails(objCurInfo.GetCompanyCode(), regionCodes, year, SearchKey, pageNumber, excelDownload, PAGESIZE,
                                                           ref totalPageCount);
            StringBuilder strContent      = new StringBuilder();
            StringBuilder strExcelContent = new StringBuilder();

            strExcelContent.Append("<table class='table table-striped'><thead><tr><td>S.No</td><td>Date</td><td>Holiday Name</td>");
            strExcelContent.Append("<td>Region Name</td><td>Region Type</td><td>Reporting Region</td><td>Reporting Region Type</td></tr></thead>");
            if (lstHoliday != null)
            {
                int i = 0;
                foreach (var dr in lstHoliday)
                {
                    i++;

                    strExcelContent.Append("<tr><td>" + i + "</td>");
                    strExcelContent.Append("<td><span id='lblHolidayDate_" + i + "'>" + dr.Holiday_Date + "</span></td>");
                    strExcelContent.Append("<td><span id='lblHolidayName_" + i + "'>" + dr.Holiday_Name + "</span></td>");
                    strExcelContent.Append("<td>" + dr.Region_Name + "<input type='hidden' id='hdnRegionCode_" + i + "' value='" + dr.Region_Code + "'/></td>");
                    strExcelContent.Append("<td>" + dr.Region_Type_Name + "</td>");
                    strExcelContent.Append("<td>" + dr.Reporting_Region_Name + "</td>");
                    strExcelContent.Append("<td>" + dr.Reporting_Region_Type_Name + "</td>");
                    strExcelContent.Append("</tr>");
                }
            }
            strExcelContent.Append("</tbody></table>");
            System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
            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 subDomin = objCurInfo.GetSubDomain();
            string fileName = "HolidayMaster" + "_" + subDomin + "_" + userName + ".xls";
            string blobUrl  = string.Empty;

            blobUrl = objAzureBlob.AzureBlobUploadText(strExcelContent.ToString(), accKey, fileName, "bulkdatasvc");
            return(blobUrl);
        }
Пример #10
0
 public ActionResult ProductExcelUploadResult(HttpPostedFileBase file)
 {
     try
     {
         string result = string.Empty;
         DataControl.BLProduct   _objBlProduct = new DataControl.BLProduct();
         DataControl.CurrentInfo _objCurInfo   = new DataControl.CurrentInfo();
         result = _objBlProduct.ProductBulkInsert(_objCurInfo.GetCompanyCode(), Guid.NewGuid().ToString(), file, _objCurInfo.GetUserCode(),
                                                  _objCurInfo.GetSubDomain());
         ViewBag.ErrorCode = result;
         return(View("ProductExcelUploadResult"));
     }
     catch (Exception ex)
     {
         Dictionary <string, string> dicObj = new Dictionary <string, string>();
         DataControl.Impl.ExceptionHandler.WriteLog(ex: ex, dic: dicObj);
         ViewBag.ErrorCode = ex.Message;
         return(View("ProductExcelUploadResult"));
     }
 }
Пример #11
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"));
        }
Пример #12
0
 public ActionResult ExcellPayslipDefiner(HttpPostedFileBase file, FormCollection collection)
 {
     try
     {
         string                  result           = string.Empty;
         DataControl.BLUser      objBlUser        = new BLUser();
         DataControl.CurrentInfo _objCurInfo      = new DataControl.CurrentInfo();
         string                  selectedUserType = collection["userTypeCode"].ToString();
         selectedUserType = selectedUserType.Replace(",,", ",");
         selectedUserType = selectedUserType.TrimEnd(',');
         result           = objBlUser.PayslipDefinerBulkUpload(_objCurInfo.GetCompanyCode(), Guid.NewGuid().ToString(), file, _objCurInfo.GetUserCode(),
                                                               _objCurInfo.GetSubDomain(), selectedUserType);
         ViewBag.ErrorCode = result;
         return(View("PayslipColumnDefinerResult"));
     }
     catch (Exception ex)
     {
         Dictionary <string, string> dicObj = new Dictionary <string, string>();
         DataControl.Impl.ExceptionHandler.WriteLog(ex: ex, dic: dicObj);
         ViewBag.ErrorCode = string.Empty;
         return(View("PayslipColumnDefinerResult"));
     }
 }
Пример #13
0
 public ActionResult PrimarySalesExcelUploadResult(HttpPostedFileBase file, FormCollection collection)
 {
     try
     {
         const string            TransType       = "hdnTransType";
         string                  transactionType = Convert.ToString(collection[TransType]);
         string                  result          = string.Empty;
         DataControl.BLProduct   _objBlProduct   = new DataControl.BLProduct();
         DataControl.CurrentInfo _objCurInfo     = new DataControl.CurrentInfo();
         result = _objBlProduct.PrimarySalesBulkInsert(_objCurInfo.GetCompanyCode(),
                                                       Guid.NewGuid().ToString(), file, _objCurInfo.GetUserCode(),
                                                       _objCurInfo.GetSubDomain(), transactionType);
         ViewBag.ErrorCode = result;
         return(View("PrimarySalesExcelUploadResult"));
     }
     catch (Exception ex)
     {
         Dictionary <string, string> dicObj = new Dictionary <string, string>();
         DataControl.Impl.ExceptionHandler.WriteLog(ex: ex, dic: dicObj);
         ViewBag.ErrorCode = string.Empty;
         return(View("PrimarySalesExcelUploadResult"));
     }
 }
Пример #14
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);
        }