Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="bp_Type"></param>
        /// <returns></returns>
        public JsonResult GetBPHeader(string bp_Type, string Effective_from, string Effective_to, int Value)
        {
            string userCode    = _objCurrentInfo.GetUserCode();
            string companyCode = _objCurrentInfo.GetCompanyCode();
            //  StringBuilder bpHeaderRowsHTMLFormat = new StringBuilder();

            DataSet ds = _objSPData.GetBatchProcessingHeader(companyCode, bp_Type, userCode, Effective_from, Effective_to, Value);

            //if (ds != null && ds.Tables != null && ds.Tables.Count > 0 && ds.Tables[0].Rows != null && ds.Tables[0].Rows.Count > 0)
            //{

            //    DataRowCollection drCollection = ds.Tables[0].Rows;
            // Bind Error Details
            //    bpHeaderRowsHTMLFormat.Append("<table class='bpTable' border='0' cellspacing='0' cellpadding='0' style='margin-top:2%;'><thead><tr><th>File Name</th>");
            //    bpHeaderRowsHTMLFormat.Append("<th>Date of Upload</th><th>Uploaded By</th><th>Status of upload</th><th>Reupload</th></thead><tbody>");
            //    foreach (DataRow dr in drCollection)
            //    {
            //        string errorClass = string.Empty;
            //        errorClass = dr["Status"].ToString().ToUpper() == "ERROR" ? "ERR_ROW" : "";
            //        string fileName = string.Empty;
            //        if (dr["Upload_File_Name"].ToString().Contains("\\"))
            //        {
            //            fileName = dr["Upload_File_Name"].ToString().Substring(dr["Upload_File_Name"].ToString().LastIndexOf('\\')).Replace("\\", "");

            //        }
            //        else
            //        {
            //            fileName = dr["Upload_File_Name"].ToString();
            //        }
            //        bpHeaderRowsHTMLFormat.Append("<tr class='" + errorClass + "'><td>" + fileName + "</td>");
            //        bpHeaderRowsHTMLFormat.Append("<td>" + dr["Upload_Date"].ToString() + "</td>");
            //        bpHeaderRowsHTMLFormat.Append("<td>" + dr["User_Name"].ToString() + "</td>");
            //        if (errorClass.Trim().Length > 0)
            //        {
            //            bpHeaderRowsHTMLFormat.Append("<td><a href='#' onclick='BPPopup(\"" + dr["BP_ID"].ToString() + "\")'> " + dr["Status"].ToString() + "</a></td>");
            //        }
            //        else
            //        {
            //            if (!string.IsNullOrEmpty(dr["DB_Error"].ToString()))
            //            {
            //                bpHeaderRowsHTMLFormat.Append("<td>" + dr["Status"].ToString() + "-" + dr["DB_Error"].ToString() + "</td>");
            //            }
            //            else
            //            {
            //                bpHeaderRowsHTMLFormat.Append("<td>" + dr["Status"].ToString() + "</td>");
            //            }
            //            // bpHeaderRowsHTMLFormat.Append("<td>" + dr["Status"].ToString() + "</td>");
            //        }
            //        bpHeaderRowsHTMLFormat.Append("<td><a href='#' onclick='fnRedirectToUploadScreen()'>" + dr["Reupload"].ToString() + "</a></td>");
            //        bpHeaderRowsHTMLFormat.Append("</tr>");
            //    }
            //    bpHeaderRowsHTMLFormat.Append("</tbody></table>");
            //}
            //else
            //{
            //    bpHeaderRowsHTMLFormat.Append("<span> No Uploaded Found.</span>");
            //}
            DataControl.JSONConverter _objJson = new DataControl.JSONConverter();
            return(Json(_objJson.Serialize(ds), JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 2
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.º 3
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.º 4
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.º 5
0
 public JsonResult GetDailyCallPlanner(FormCollection coll)
 {
     try
     {
         DataControl.JSONConverter objJson = new DataControl.JSONConverter();
         DataTable dtDailyPlan             = new DataTable();
         dtDailyPlan = _objDCRBL.GetDailyCallPlanner(objCurr.GetCompanyCode(), objCurr.GetUserCode(), coll["dcrDate"].ToString());
         return(Json(objJson.Serialize(dtDailyPlan)));
     }
     catch
     {
         throw;
     }
 }
Ejemplo n.º 6
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.º 7
0
 public ActionResult Index()
 {
     _objCurrInfo        = new CurrentInfo();
     ViewBag.CompanyCode = _objCurrInfo.GetCompanyCode();
     ViewBag.UserCode    = _objCurrInfo.GetUserCode();
     return(View());
 }
Ejemplo n.º 8
0
        public JsonResult GetLockDetails()
        {
            CurrentInfo        _objcurrentInfo = new CurrentInfo();
            BLDashBoardLanding objDash         = new BLDashBoardLanding(_objcurrentInfo.GetCompanyCode());

            return(Json(objDash.GetLockDetails(_objcurrentInfo.GetUserCode()), JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 9
0
        public JsonResult GetUnapproveExpenseClaimList()
        {
            CurrentInfo        _objcurrentInfo = new CurrentInfo();
            BLDashBoardLanding objDash         = new BLDashBoardLanding(_objcurrentInfo.GetCompanyCode());

            return(Json(objDash.GetUnapproveExpenseClaimList(_objcurrentInfo.GetUserCode()), JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 10
0
        public JsonResult GetExpenseClaimPendingUserList()
        {
            CurrentInfo        _objcurrentInfo = new CurrentInfo();
            BLDashBoardLanding objDash         = new BLDashBoardLanding(_objcurrentInfo.GetCompanyCode());

            return(Json(objDash.GetPendingApprovalUserList(_objcurrentInfo.GetUserCode(), DashBoardLanding.Entity.EXPNESECLAIM), JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 11
0
        public JsonResult GetMyTaskCount()
        {
            BL_ICE      objtskscount = new BL_ICE();
            CurrentInfo objInfo      = new CurrentInfo();

            return(Json(objtskscount.GetTaskLiveCount(objInfo.GetCompanyCode(), objInfo.GetUserCode(), objInfo.GetUserName()), JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 12
0
        //public bool EditRegions(string Region_Code, string Under_Region_Code, string Region_Type_Code ,string Under_Region_Id, string Region_Classification_Code, string Expense_Group_Id, string Country, string State, string City, string Local_Area, string divisionCode, string Region_Name, string Notional_Territory)
        public bool EditRegions(RegionHierarchyChanges _ObjHirearchyChanges)
        {
            bool   result      = false;
            string companyCode = null;
            string UserCode    = null;
            string Companyid   = null;

            try
            {
                _objCurrInfo = new CurrentInfo();
                companyCode  = _objCurrInfo.GetCompanyCode();
                UserCode     = _objCurrInfo.GetUserCode();
                Companyid    = _objCurrInfo.GetCompanyId();
                //result = _objbl.EditRegions(companyCode, UserCode, Companyid, Region_Code, Under_Region_Code, Region_Type_Code, Under_Region_Id, Region_Classification_Code, Expense_Group_Id, Country, State, City, Local_Area, divisionCode, Region_Name, Notional_Territory);
                result = _objbl.EditRegions(companyCode, UserCode, Companyid, _ObjHirearchyChanges.Region_Code, _ObjHirearchyChanges.Under_Region_Code,
                                            _ObjHirearchyChanges.Region_Type_Code, _ObjHirearchyChanges.Under_Region_Id, _ObjHirearchyChanges.Region_Classification_Code,
                                            _ObjHirearchyChanges.Expense_Group_Id, _ObjHirearchyChanges.Country, _ObjHirearchyChanges.State, _ObjHirearchyChanges.City, _ObjHirearchyChanges.Local_Area,
                                            _ObjHirearchyChanges.DivisionCode, _ObjHirearchyChanges.Region_Name, _ObjHirearchyChanges.Notional_Territory, _ObjHirearchyChanges.Primary_Division, _ObjHirearchyChanges.Ref_Key1, _ObjHirearchyChanges.Ref_key2, _ObjHirearchyChanges.Depot_Name, _ObjHirearchyChanges.Depot_Code);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Ejemplo n.º 13
0
        //public bool InsertRegions(string Region_Name, string Under_Region_Code, string Under_Region_Id, string Region_Type_Code, string Region_Classification_Code, string Expense_Group_Id, string Country, string State, string City, string Local_Area, string Weekend_Code, string Price_group_code, string Region_Lock, string Chemist_Lock, string Effective_From, string Effective_To_Month, string Effective_To_Year, string divisionCode, string holiday_Code, string holiday_name)
        public bool InsertRegions(RegionCreationChanges _objCreationChanges)
        {
            bool   result      = false;
            string companyCode = null;
            string UserCode    = null;
            string Companyid   = null;
            string regionCode  = null;

            try
            {
                _objCurrInfo = new CurrentInfo();
                companyCode  = _objCurrInfo.GetCompanyCode();
                UserCode     = _objCurrInfo.GetUserCode();
                regionCode   = _objData.GetMaxCode(companyCode, "tbl_SFA_Region_Master", "Region_Code", "REC");
                Companyid    = _objCurrInfo.GetCompanyId();
                //result = _objbl.InsertRegions(companyCode, UserCode, regionCode, Companyid, Region_Name, Under_Region_Code, Under_Region_Id, Region_Type_Code, Region_Classification_Code, Expense_Group_Id, Country, State, City, Local_Area);
                result = _objbl.InsertRegions(companyCode, UserCode, regionCode, Companyid, _objCreationChanges.Region_Name, _objCreationChanges.Under_Region_Code, _objCreationChanges.Under_Region_Id, _objCreationChanges.Region_Type_Code, _objCreationChanges.Region_Classification_Code,
                                              _objCreationChanges.Expense_Group_Id, _objCreationChanges.Country, _objCreationChanges.State, _objCreationChanges.City, _objCreationChanges.Local_Area, _objCreationChanges.Primary_Division, _objCreationChanges.Ref_Key1, _objCreationChanges.Ref_Key2, _objCreationChanges.Depot_Code);

                _objbl.SaveMapping(companyCode, UserCode, regionCode, Companyid, _objCreationChanges.Weekend_Code, _objCreationChanges.Price_group_code, _objCreationChanges.Region_Lock, _objCreationChanges.Chemist_Lock, _objCreationChanges.Region_Type_Code, _objCreationChanges.Effective_From, _objCreationChanges.Effective_To_Month, _objCreationChanges.Effective_To_Year, _objCreationChanges.Division_Code, _objCreationChanges.Holiday_Code, _objCreationChanges.Holiday_Name);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Ejemplo n.º 14
0
        //
        // GET: /Messaging/

        public ActionResult Index()
        {
            DataControl.CurrentInfo objCurInfo = new CurrentInfo();
            ViewBag.CurrentUserCode   = objCurInfo.GetUserCode();
            ViewBag.CurrentRegionCode = objCurInfo.GetRegionCode();
            return(View());
        }
Ejemplo n.º 15
0
        public JsonResult Getallcategorysetting()
        {
            CurrentInfo _obj      = new CurrentInfo();
            string      user_code = _obj.GetUserCode();

            return(Json(_objBLSetting.Getallcategorysetting(user_code), JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 16
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.º 17
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.º 18
0
 public PartialViewResult HospitalDetails()
 {
     ViewBag.CompanyCode = _objCurrentInfo.GetCompanyCode();
     ViewBag.RegionCode  = _objCurrentInfo.GetRegionCode();
     ViewBag.UserCode    = _objCurrentInfo.GetUserCode();
     return(PartialView());
 }
        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.º 20
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.º 21
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.º 22
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.º 23
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.º 24
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);
        }
Ejemplo n.º 25
0
 //ActionResult to Direct into  Purchase Requisition Form
 public ActionResult PurchaseRequisitionForm(string CampaignCode, string StartDate, string EndDate)
 {
     ViewBag.User_Name    = ObjCurrInfo.GetUserName();
     ViewBag.User_Code    = ObjCurrInfo.GetUserCode();
     ViewBag.CampaignCode = CampaignCode;
     ViewBag.StartDate    = StartDate;
     ViewBag.EndDate      = EndDate;
     return(View());
 }
Ejemplo n.º 26
0
        public string GetReportData(string companyCode, string userName, System.Web.Mvc.FormCollection coll, string subDominName, out string error)
        {
            DALAPI      objdalAPI       = new DALAPI();
            CurrentInfo _objcurrentInfo = new CurrentInfo();
            Data        _objData        = new Data();
            int         apiID           = Convert.ToInt32(coll["APIId"]);
            string      serviceId       = coll["ServiceId"].ToString();
            //string ErrorMSG = string.Empty;
            string TransNumber     = Guid.NewGuid().ToString();
            string CurrentUserCode = _objcurrentInfo.GetUserCode();
            //string CurrentUserName = _objcurrentInfo.GetUserName();
            string        ConnectionString = _objData.GetConnectionString_Client();
            string        ExcelURL         = string.Empty;
            StringBuilder ParamDetails     = new StringBuilder();

            DataSet ds = GetAPIUIElements(apiID);

            object[] param = new object[ds.Tables[0].Rows.Count];
            int      i     = 0;

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                if (dr["Show_In_UI"].ToString().ToUpper() == "N")
                {
                    param[i] = HttpContext.Current.Session[dr["Session_Key"].ToString()].ToString();
                }
                else
                {
                    if (dr["Type"].ToString() != "TEXT_CSV")
                    {
                        param[i] = coll[dr["InputParam"].ToString()].ToString();
                    }
                    else
                    {
                        // input string formate for TEXT_CSV aaa^bbb^ccc^bbbb^
                        string paramValue = coll[dr["InputParam"].ToString()].ToString();
                        paramValue = paramValue.Replace("^", "','");
                        paramValue = "'" + paramValue + "'";
                        param[i]   = paramValue;
                    }
                }
                ParamDetails.Append(dr["InputParam"].ToString() + ": " + param[i].ToString() + "<br />");
                i++;
            }

            //Log Bulk API SVC Log
            string hdLogId = Guid.NewGuid().ToString();
            string OutError;

            objdalAPI.BulkAPISvcLog(companyCode, userName, serviceId, hdLogId, apiID);
            HDCoreDataService.HDCoreDataServiceClient coreClt = new HDCoreDataService.HDCoreDataServiceClient();
            DataSet dsReport = new DataSet();

            dsReport = coreClt.ExecuteServiceDS("SWAAS", subDominName, apiID, "", "", 0, param, out OutError);

            // dsReport = coreClt.ExecuteServiceDS(out OutError,"SWAAS", subDominName, apiID, "", "", 0, param);
            error = "";
            return(bindReport(dsReport).ToString());
        }
Ejemplo n.º 27
0
        // To View In Chamber Effectiveness Form
        public ActionResult InChamberEffectivenessForm()
        {
            CurrentInfo _ObjectCurrentInfo = new CurrentInfo();

            ViewBag.User_Code = _ObjectCurrentInfo.GetUserCode();
            ViewBag.User_Name = _ObjectCurrentInfo.GetUserName();
            return(View());
        }
Ejemplo n.º 28
0
 public ActionResult TargetSettings()
 {
     _objCurrentInfo           = new CurrentInfo();
     ViewBag.CompanyCode       = _objCurrentInfo.GetCompanyCode();
     ViewBag.RequestRegionCode = _objCurrentInfo.GetRegionCode();
     ViewBag.RequestUserCode   = _objCurrentInfo.GetUserCode();
     return(View());
 }
Ejemplo n.º 29
0
        public int InsertCategorySetting(CategoryDetails obj)
        {
            CurrentInfo _obj      = new CurrentInfo();
            int         result    = 0;
            string      user_code = _obj.GetUserCode();

            return(result = _objBLSetting.InsertCategorySetting(obj, user_code));
        }
Ejemplo n.º 30
0
        public int ChangeStatus(int id)
        {
            int         result = 0;
            CurrentInfo _obj   = new CurrentInfo();

            result = _objBLSetting.ChangeStatus(id, _obj.GetUserCode());
            return(result);
        }