Ejemplo n.º 1
0
        public JsonResult GetEntityAndUserType()
        {
            try
            {
                List <object> lstCat      = new List <object>();
                List <object> lstUserType = new List <object>();

                BL_DCRHeader _objHead = new BL_DCRHeader();
                BLMaster     _objMast = new BLMaster();

                lstCat      = _objHead.GetCategory(_objCurr.GetCompanyCode());
                lstUserType = _objMast.GetUserType(_objCurr.GetCompanyCode());

                List <JsonResult> lst = new List <JsonResult> {
                    Json(lstCat, JsonRequestBehavior.AllowGet), Json(lstUserType, JsonRequestBehavior.AllowGet)
                };
                return(Json(lst, JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                Dictionary <string, string> dicObj = new Dictionary <string, string>();
                DataControl.Impl.ExceptionHandler.WriteLog(ex: ex, dic: dicObj);
                return(null);
            }
        }
Ejemplo n.º 2
0
        public ActionResult Index()
        {
            string companyCode = _objCurrentInfo.GetCompanyCode();

            IConfig_Settings    = new Config_Settings();
            ViewBag.PS_filesize = IConfig_Settings.GetConfigDefaultValue(companyCode, CONFIG_TYPE.PRIMARY_SALES,
                                                                         CONFIG_KEY.MAX_FILE_SIZE_PS);
            return(View());
        }
Ejemplo n.º 3
0
 //Beat Plan Creation Screen
 public ActionResult CreateBeatPlan()
 {
     ViewBag.Company_Code   = _objCurrentInfo.GetCompanyCode();
     ViewBag.Company_Id     = _objCurrentInfo.GetCompanyId();
     ViewBag.Region_Code    = _objCurrentInfo.GetRegionCode();
     ViewBag.User_Code      = _objCurrentInfo.GetUserCode();
     ViewBag.User_Type_Code = _objCurrentInfo.GetUserTypeCode();
     return(View());
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Get Team TP Count for Approval.
        /// its only picking immediate users count. Not an entire reporting list.
        /// </summary>
        /// <returns>int</returns>
        public int GetTPPendingApprovalCountForTeam()
        {
            // create instances
            CurrentInfo        objInfo = new CurrentInfo();
            BLDashBoardLanding objDash = new BLDashBoardLanding(objInfo.GetCompanyCode());

            // get TP Pending Approval count.
            return(objDash.GetPendingApprovalCountForTeam(objInfo.GetCompanyCode(), objInfo.GetUserCode(), DashBoardLanding.Entity.TP));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Get Team Expense claims for Approval.
        /// Its get entire reporting user list.
        /// </summary>
        /// <returns>int</returns>
        public int GetExpenseClaimPendingApprovalCountForTeam()
        {
            // Cretaes Instance.
            CurrentInfo        objInfo = new CurrentInfo();
            BLDashBoardLanding objDash = new BLDashBoardLanding(objInfo.GetCompanyCode());

            // Get Count for Entire Team Applied Expense claims.
            return(objDash.GetPendingApprovalCountForTeam(objInfo.GetCompanyCode(), objInfo.GetUserCode(), DashBoardLanding.Entity.EXPNESECLAIM));
        }
Ejemplo n.º 6
0
 public ActionResult DailyReporting(string dcrActualDate)
 {
     ViewBag.CompanyCode  = _objCurrentInfo.GetCompanyCode();
     ViewBag.RegionCode   = _objCurrentInfo.GetRegionCode();
     ViewBag.UserCode     = _objCurrentInfo.GetUserCode();
     ViewBag.UserTypeCode = _objCurrentInfo.GetUserTypeCode();
     ViewBag.dcrdate      = dcrActualDate;
     ViewBag.UserName     = _objCurrentInfo.GetUserName();
     ViewBag.RegionName   = _objCurrentInfo.GetRegionName();
     return(View());
 }
Ejemplo n.º 7
0
 public JsonResult GetWorkCategory()
 {
     try
     {
         BL_WorkCategoryRule obj = new BL_WorkCategoryRule();
         return(Json(obj.GetWorkCategory(objCurrInfo.GetCompanyCode()), JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         return(Json(ex.Message, JsonRequestBehavior.AllowGet));
     }
 }
Ejemplo n.º 8
0
        public DataSet GetPrimarySalesMasterData(string Mode, int Month, int Year)
        {
            ds = new DataSet();
            SPData _objSPData = new SPData();

            _objData.OpenConnection();
            {
                string strSQL = "" + "EXEC" + "  " + SP_GetPrimarySalesMasterData + " '" + _objCurrentinfo.GetCompanyCode() + "','" + _objCurrentinfo.GetRegionCode() + "','" + Mode + "','" + Month + "','" + Year + "'";
                ds = _objData.ExecuteDataSet(strSQL);
                _objData.CloseConnection();
            }
            return(ds);
        }
Ejemplo n.º 9
0
        public ActionResult Index(string dcrActualDate, string flag, string Company_Code, string UserCode, string RegionCode, int CompanyId)
        {
            string today = DateTime.Now.ToShortDateString();

            ViewBag.possibleDays = _objBLDCR.GetNextTwoPossibleDays(objCurr.GetCompanyCode(), objCurr.GetUserCode(), objCurr.GetRegionCode(), today);
            ViewBag.flag         = flag;
            ViewBag.dcrDate      = dcrActualDate;
            ViewBag.Company_Code = objCurr.GetCompanyCode();
            ViewBag.UserCode     = objCurr.GetUserCode();
            ViewBag.RegionCode   = objCurr.GetRegionCode();
            ViewBag.CompanyId    = objCurr.GetCompanyId();
            return(View());
        }
Ejemplo n.º 10
0
 public ActionResult Index(string dcrActualDate, string flag, string Company_Code, string UserCode, string RegionCode, int CompanyId)
 {
     GetPrivillegeValue();
     ViewBag.DCRActualDate    = dcrActualDate;
     ViewBag.Flag             = flag;
     ViewBag.doctor_caption   = DOCTOR_CAPTION;
     ViewBag.chemist_caption  = CHEMIST_CAPTION;
     ViewBag.stockist_caption = STOCKIEST_CAPTION;
     ViewBag.Company_Code     = _objCurrentInfo.GetCompanyCode();
     ViewBag.UserCode         = _objCurrentInfo.GetUserCode();
     ViewBag.RegionCode       = _objCurrentInfo.GetRegionCode();
     ViewBag.CompanyId        = _objCurrentInfo.GetCompanyId();
     return(View());
 }
Ejemplo n.º 11
0
        /// <summary>
        /// Dashboard landing page.
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
            // create intances.
            CurrentInfo        objInfo = new CurrentInfo();
            BLDashBoardLanding objDash = new BLDashBoardLanding(objInfo.GetCompanyCode());

            ViewBag.User_Code = objInfo.GetUserCode();
            int teamCount = objDash.GetImmediateChildUserCount(objInfo.GetUserCode());

            ViewBag.teamCount   = teamCount;
            ViewBag.CompanyCode = objInfo.GetCompanyCode();
            ViewBag.Region_Code = objInfo.GetRegionCode();
            return(View());
        }
Ejemplo n.º 12
0
 public JsonResult GetAPIServices()
 {
     try
     {
         Repository.APIRepository objAPIRepo = new Repository.APIRepository();
         DataSet ds = objAPIRepo.GetAPIServices(_objCur.GetCompanyCode(), _objCur.GetUserTypeCode());
         return(Json(_objJSON.Serialize(ds), JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         Dictionary <string, string> dicObj = new Dictionary <string, string>();
         DataControl.Impl.ExceptionHandler.WriteLog(ex: ex, dic: dicObj);
         return(null);
     }
 }
Ejemplo n.º 13
0
        public string GetWideAngleURL()
        {
            CurrentInfo objCurInfo   = new CurrentInfo();
            string      wideAngleUrl = string.Empty;

            try
            {
                string companyCode  = objCurInfo.GetCompanyCode();
                string userTypeCode = objCurInfo.GetUserTypeCode();
                string userCode     = objCurInfo.GetUserCode();
                string waUrl        = objCurInfo.GetWideAngleUrl();
                string sessionId    = objCurInfo.GetSessionId();
                string regionCode   = objCurInfo.GetRegionCode();
                string userName     = objCurInfo.GetUserName();

                if (!string.IsNullOrEmpty(waUrl))
                {
                    wideAngleUrl = "" + waUrl + "?User_Code=" + userCode + "&Comp_Code=" + companyCode + "&Session_Id=" + sessionId + "&Return_URL=" + Request.Url.Authority + "&User_Type_Code=" + userTypeCode + "&Region_Code=" + regionCode + "&User_Name=" + userName + "";
                }
                return(wideAngleUrl);
            }
            catch (Exception ex)
            {
                ErrorLog.LogError(ex, "GetWideAngleURL()");
                return(ex.Message.ToString());
            }
        }
Ejemplo n.º 14
0
        public JsonResult GetLockDetails()
        {
            CurrentInfo        _objcurrentInfo = new CurrentInfo();
            BLDashBoardLanding objDash         = new BLDashBoardLanding(_objcurrentInfo.GetCompanyCode());

            return(Json(objDash.GetLockDetails(_objcurrentInfo.GetUserCode()), JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 15
0
        public string GetOneLibURL()
        {
            CurrentInfo objCurInfo = new CurrentInfo();
            string      oneLibUrl  = string.Empty;

            try
            {
                string companyCode          = objCurInfo.GetCompanyCode();
                string userTypeCode         = objCurInfo.GetUserTypeCode();
                string userCode             = objCurInfo.GetUserCode();
                string oneLibRedirectionUrl = objCurInfo.GetOneLibUrl();
                string sessionId            = objCurInfo.GetSessionId();
                string regionCode           = objCurInfo.GetRegionCode();
                string userName             = objCurInfo.GetUserName();

                if (!string.IsNullOrEmpty(oneLibRedirectionUrl))
                {
                    oneLibUrl = "" + oneLibRedirectionUrl + "?User_Code=" + userCode + "&Comp_Code=" + companyCode + "&Session_Id=" + sessionId + "&Return_URL=" + Request.Url.Authority + "&User_Type_Code=" + userTypeCode + "&Region_Code=" + regionCode + "&User_Name=" + userName + "";
                }
                return(oneLibUrl);
            }
            catch (Exception ex)
            {
                DataControl.Impl.ExceptionHandler.WriteLog(ex, null);
                return(string.Empty);
            }
        }
Ejemplo n.º 16
0
 public ActionResult Index()
 {
     _objCurrInfo        = new CurrentInfo();
     ViewBag.CompanyCode = _objCurrInfo.GetCompanyCode();
     ViewBag.UserCode    = _objCurrInfo.GetUserCode();
     return(View());
 }
Ejemplo n.º 17
0
        public string GetFormManagementURL()
        {
            CurrentInfo _objcurrentinfo   = new CurrentInfo();
            string      formManagementURL = string.Empty;

            try
            {
                string formmanagementstring = _objcurrentinfo.GetFormManagementURL();
                string subDomainName        = _objcurrentinfo.GetSubDomain();
                string userName             = _objcurrentinfo.GetUserName();

                byte[] companyEncode           = System.Text.Encoding.UTF8.GetBytes(_objcurrentinfo.GetCompanyCode());
                String EncodeCompanyCodeString = Convert.ToBase64String(companyEncode);

                byte[] Userencode           = System.Text.Encoding.UTF8.GetBytes(_objcurrentinfo.GetUserCode());
                String EncodeUserCodeString = Convert.ToBase64String(Userencode);


                if (!string.IsNullOrEmpty(formmanagementstring))
                {
                    formManagementURL = "" + formmanagementstring + "?C=" + EncodeCompanyCodeString + "&U=" + EncodeUserCodeString + "";
                }
                return(formManagementURL);
            }
            catch (Exception ex)
            {
                DataControl.Impl.ExceptionHandler.WriteLog(ex, null);
                return(ex.Message.ToString());
            }
        }
Ejemplo n.º 18
0
        public JsonResult GetWorkCategory()
        {
            CurrentInfo _obj        = new CurrentInfo();
            string      companyCode = _obj.GetCompanyCode();

            return(Json(_objBLSetting.GetWorkCategory(companyCode), JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 19
0
 public PartialViewResult HospitalDetails()
 {
     ViewBag.CompanyCode = _objCurrentInfo.GetCompanyCode();
     ViewBag.RegionCode  = _objCurrentInfo.GetRegionCode();
     ViewBag.UserCode    = _objCurrentInfo.GetUserCode();
     return(PartialView());
 }
Ejemplo n.º 20
0
        public JsonResult GetProduts(string Region_Code)
        {
            CurrentInfo _obj        = new CurrentInfo();
            string      companyCode = _obj.GetCompanyCode();

            return(Json(_objBLSetting.GetProduts(Region_Code), JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 21
0
        /// <summary>
        /// Used to get the count of Existing SFC record for same region
        /// </summary>
        /// <param name="regionCode"></param>
        /// <param name="fromPlace"></param>
        /// <param name="toPlace"></param>
        /// <param name="categoryName"></param>
        /// <param name="travelMode"></param>
        /// <returns></returns>
        public JsonResult CheckExistingSFCforRegion(string regionCode, string fromPlace, string toPlace, string categoryName, string travelMode)
        {
            string message = string.Empty;
            Dictionary <string, int> dicTravleModeCount = new Dictionary <string, int>();

            try
            {
                BLMaster    _objDAL         = new BLMaster();
                CurrentInfo _objCurrentInfo = new CurrentInfo();

                dicTravleModeCount = _objDAL.GetExistingSFCCount(_objCurrentInfo.GetCompanyCode(), regionCode, fromPlace, toPlace, categoryName, travelMode);
                return(Json(dicTravleModeCount));
            }
            catch (Exception ex)
            {
                Dictionary <string, string> dicContext = new Dictionary <string, string>();
                dicContext.Add("regionCode", regionCode);
                dicContext.Add("fromPlace", fromPlace);
                dicContext.Add("toPlace", toPlace);
                dicContext.Add("categoryName", categoryName);
                dicContext.Add("travelMode", travelMode);
                DataControl.Impl.ExceptionHandler.WriteLog(ex, dicContext);
                throw ex;
            }
        }
Ejemplo n.º 22
0
        public void DownloadSFCExcelFormat(FormCollection col)
        {
            System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
            DataControl.Repository.FileDownload   objFileDownload = new DataControl.Repository.FileDownload();
            DataControl.Abstraction.IFileProvider objProvider     = new DataControl.Impl.FileSystemProvider();
            _objCurrentInfo = new CurrentInfo();
            string regioncode  = col["hdnRegionCode"].ToString();
            string sfcStatus   = col["SFCStatus"].ToString();
            int    archived    = Convert.ToInt32(col["rdoShowArchived"].ToString());
            int    totalPageNo = 0;
            string error       = "";
            List <SFCRegionModel> lstRegionModel = GetSFCRegions(regioncode, 1, true, ref totalPageNo, "", "", "", sfcStatus, archived).ToList();
            string SFCGrid = SFCExcelTable(lstRegionModel);

            DataControl.Abstraction.IConfigProvider iConfigPro   = new DataControl.Impl.ConfigProvider();
            DataControl.Repository.AzureBlobUpload  objAzureBlob = new DataControl.Repository.AzureBlobUpload();
            string accKey = iConfigPro.GetConfigValue("SWAASBLOBACCKEY");

            string userName = _objCurrentInfo.GetUserName();
            string compCode = _objCurrentInfo.GetCompanyCode();

            string fileName = "SFCMASTER" + "_" + compCode + "_" + userName + ".xls";
            string blobUrl  = objAzureBlob.AzureBlobUploadText(SFCGrid, accKey, fileName, "bulkdatasvc");

            objFileDownload.DownloadFile(blobUrl, fileName, out error);
        }
        public string GetAsyncReportByID(string TransactionID)
        {
            DataControl.CurrentInfo _objCurrentInfo = new CurrentInfo();
            string CompanyCode     = _objCurrentInfo.GetCompanyCode();
            string UserCode        = _objCurrentInfo.GetUserCode();
            string HTMLFileContent = string.Empty;

            DataControl.HiDoctor_ReportsFactoryClasses.BL_ReportRegion objBLReportRegion = new DataControl.HiDoctor_ReportsFactoryClasses.BL_ReportRegion();
            try
            {
                List <MVCModels.HiDoctor_Reports.UsersReportQueues> ReportQueueByID = objBLReportRegion.GetReportQueueByID(CompanyCode, TransactionID).ToList();

                using (WebClient client = new WebClient())
                {
                    HTMLFileContent = client.DownloadString(ReportQueueByID.FirstOrDefault().HTML_File_Path.ToString());
                }

                return(HTMLFileContent);
            }
            finally
            {
                _objCurrentInfo   = null;
                objBLReportRegion = null;
            }
        }
Ejemplo n.º 24
0
        public string GetHrmsURL()
        {
            CurrentInfo _objCurrInfo        = new CurrentInfo();
            string      LoginParams         = string.Empty;
            string      HRMS_Url            = string.Empty;
            string      HRMS_RedirectingUrl = string.Empty;

            try
            {
                HRMS_RedirectingUrl = _objCurrInfo.GetHRMURL();
                CompanyDetails lstcompdetails = new CompanyDetails();
                lstcompdetails.Company_Code    = _objCurrInfo.GetCompanyCode();
                lstcompdetails.Region_Code     = _objCurrInfo.GetRegionCode();
                lstcompdetails.User_Code       = _objCurrInfo.GetUserCode();
                lstcompdetails.Employee_Code   = _objCurrInfo.GetEmployeeCode();
                lstcompdetails.Employee_Number = _objCurrInfo.GetEmployeeNumber();
                lstcompdetails.UserName        = _objCurrInfo.GetUserName();
                lstcompdetails.User_Type_Code  = _objCurrInfo.GetUserTypeCode();

                LoginParams = JsonConvert.SerializeObject(lstcompdetails);
                byte[] LoginParamsEncode = System.Text.Encoding.UTF8.GetBytes(LoginParams);
                LoginParams = Convert.ToBase64String(LoginParamsEncode);

                if (!string.IsNullOrEmpty(HRMS_RedirectingUrl))
                {
                    HRMS_Url = "" + HRMS_RedirectingUrl + "?SSID=" + LoginParams;
                }
                return(HRMS_Url);
            }
            catch (Exception ex)
            {
                DataControl.Impl.ExceptionHandler.WriteLog(ex, null);
                return(string.Empty);
            }
        }
Ejemplo n.º 25
0
        public string GetUsersByUserNameEmployeeNameMD(string userName, string treeId, string filterId)
        {
            StringBuilder strContent = new StringBuilder();

            try
            {
                BLUser objUser = new BLUser();
                DataControl.CurrentInfo objCurInfo = new CurrentInfo();
                List <UserModel>        lstUser    = new List <UserModel>();
                lstUser = (List <UserModel>)objUser.GetUsersByUserNameNew(objCurInfo.GetCompanyCode(), userName, objCurInfo.GetUserCode());
                if (lstUser.Count > 0)
                {
                    strContent.Append("<div class='list-group'>");
                    foreach (MVCModels.HiDoctor_Master.UserModel user in lstUser)
                    {
                        strContent.Append("<li><a href='#' class='list-group-item' onclick='fnBindTreeWithSelectedUserChecked(\"" + user.User_Code + "\",\""
                                          + treeId + "\",\"" + filterId + "\");'>" + user.Employee_Name + "(" + user.User_Name + ")" + "," + user.User_Type_Name + "," + user.Region_Name + "</li>");
                    }
                    strContent.Append("</div>");
                }
                else
                {
                    strContent.Append("NO_USERS");
                }
            }

            catch (Exception ex)
            {
                strContent.Append("NO_USERS");
            }
            return(strContent.ToString());
        }
Ejemplo n.º 26
0
        public string GetCRMURL()
        {
            CurrentInfo _objCurrInfo = new CurrentInfo();
            string      LoginParams  = string.Empty;
            string      CRMURL       = string.Empty;

            try
            {
                CompanyDetails lstcompdetails = new CompanyDetails();
                lstcompdetails.Company_Code    = _objCurrInfo.GetCompanyCode();
                lstcompdetails.Region_Code     = _objCurrInfo.GetRegionCode();
                lstcompdetails.User_Code       = _objCurrInfo.GetUserCode();
                lstcompdetails.Employee_Code   = _objCurrInfo.GetEmployeeCode();
                lstcompdetails.Employee_Number = _objCurrInfo.GetEmployeeNumber();
                lstcompdetails.UserName        = _objCurrInfo.GetUserName();
                lstcompdetails.User_Type_Code  = _objCurrInfo.GetUserTypeCode();

                LoginParams = JsonConvert.SerializeObject(lstcompdetails);
                byte[] LoginParamsEncode = System.Text.Encoding.UTF8.GetBytes(LoginParams);
                LoginParams = Convert.ToBase64String(LoginParamsEncode);


                CRMURL = LoginParams;
                return(CRMURL);
            }
            catch (Exception ex)
            {
                DataControl.Impl.ExceptionHandler.WriteLog(ex, null);
                return(string.Empty);
            }
        }
Ejemplo n.º 27
0
        private DataTable ConvertRCPAExcelToDataTable(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[] { "*" };

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

            //  postedFile.SaveAs(_employeeExcelTemplateFileName);

            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, "D_Doctor_Name");
            return(dt);
        }
Ejemplo n.º 28
0
        public JsonResult GetProductsMaxCountConfig()
        {
            try
            {
                _objCurrentInfo  = new CurrentInfo();
                IConfig_Settings = new Config_Settings();
                string companyCode = _objCurrentInfo.GetCompanyCode();

                // Retrives the Max Products count value.
                string UserTypeMaxProductCount = IConfig_Settings.GetConfigDefaultValue(companyCode, CONFIG_TYPE.INWARD,
                                                                                        CONFIG_KEY.INWARD_MAX_PRODUCT_COUNT_USERTYPEWISE);

                string UserMaxProductCount = IConfig_Settings.GetConfigDefaultValue(companyCode, CONFIG_TYPE.INWARD,
                                                                                    CONFIG_KEY.INWARD_MAX_PRODUCT_COUNT_USERWISE);

                // Returns the Max Products Count
                Dictionary <string, string> dic = new Dictionary <string, string>();
                dic.Add("UserTypeMaxProductCount", UserTypeMaxProductCount);
                dic.Add("UserMaxProductCount", UserMaxProductCount);
                return(Json(dic));
            }
            catch
            {
                throw;
            }
        }
Ejemplo n.º 29
0
        protected void AssignExisitingPassword()
        {
            try
            {
                DataControl.HiDoctorFactoryClasses.BL_ChangePassword _objBLChangePass = new DataControl.HiDoctorFactoryClasses.BL_ChangePassword();
                StringBuilder passBuilder = new StringBuilder();
                CurrentInfo   objCurInfo  = new CurrentInfo();

                string companyCode          = objCurInfo.GetCompanyCode();
                string userCode             = objCurInfo.GetUserCode();
                string passwordHistoryCount = objCurInfo.GetPrivilegeValue("PASSWORD_HISTORY_COUNT", "0");

                if (passwordHistoryCount != "0")
                {
                    IEnumerable <MVCModels.PasswordHistory> iePassHis = _objBLChangePass.GetPasswordHistory(companyCode, userCode, passwordHistoryCount);

                    foreach (MVCModels.PasswordHistory objPassHisModel in iePassHis)
                    {
                        passBuilder.Append(objPassHisModel.User_Pass + ",");
                    }

                    ViewBag.PassHistory = passBuilder.ToString().TrimEnd(',');
                }
            }
            catch (Exception ex)
            {
                DataControl.Impl.ExceptionHandler.WriteLog(ex, null);
            }
        }
Ejemplo n.º 30
0
        /// <summary>
        /// Release the Activity lock.
        /// </summary>
        /// <param name="user_Code"></param>
        /// <param name="dcrActualDate"></param>
        /// <param name="flag"></param>
        /// <returns></returns>
        ///
        public bool ReleasetheActivityLock(string user_Code, string dcrDetails)
        {
            bool result = false;

            // Creates Instance.
            _objCurrentInfo = new CurrentInfo();
            _objdcrLock     = new BLDCRLock();

            // Assign to the Model property.
            DCRActivityLockModel dcrActivityLockModel = new DCRActivityLockModel();

            dcrActivityLockModel.User_Code = user_Code;
            // multiple dcr actual dates and flags with ^ symbol.
            // dcrActivityLockModel.DCR_Actual_Date = dcrActualDates;
            //  dcrActivityLockModel.Activity_Flag = flags;
            dcrActivityLockModel.Released_By         = _objCurrentInfo.GetUserCode();
            dcrActivityLockModel.Released_Date       = DateTime.Now.ToShortDateString();
            dcrActivityLockModel.Request_Released_By = dcrActivityLockModel.Request_Released_By;
            dcrActivityLockModel.Released_Reason     = dcrActivityLockModel.Released_Reason;


            // Call the funtion.
            string activityResult = _objdcrLock.ReleaseActivityLock(_objCurrentInfo.GetCompanyCode(), user_Code, dcrDetails, _objCurrentInfo.GetUserCode());

            if (activityResult.ToUpper() == "SUCCESS")
            {
                result = true;
            }
            return(result);
        }