Ejemplo n.º 1
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.º 2
0
        public JsonResult GetTPApprovalMenuAccess()
        {
            CurrentInfo        _objcurrentInfo = new CurrentInfo();
            BLDashBoardLanding objDash         = new BLDashBoardLanding(_objcurrentInfo.GetUserTypeCode());

            return(Json(objDash.GetTPApprovalMenuAccessList(_objcurrentInfo.GetUserTypeCode()), JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 3
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.º 4
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.º 5
0
        //
        // GET: /Messaging/

        public ActionResult Index()
        {
            DataControl.CurrentInfo objCurInfo = new CurrentInfo();
            ViewBag.CurrentUserCode   = objCurInfo.GetUserCode();
            ViewBag.CurrentRegionCode = objCurInfo.GetRegionCode();
            return(View());
        }
Ejemplo n.º 6
0
        public string InsertCompanyAppMapping(string appDetails)
        {
            CurrentInfo _objCurr   = new CurrentInfo();
            BLMaster    _objMaster = new DataControl.BLMaster();

            return(_objMaster.UpdateCompanyApp(_objCurr.GetCompanyCode(), appDetails, _objCurr.GetUserCode()));
        }
Ejemplo n.º 7
0
        public JsonResult GetChildRegions()
        {
            BLRegion    _objBlRegion = new BLRegion();
            CurrentInfo objCurInfo   = new CurrentInfo();

            return(Json(_objBlRegion.GetChildRegions(objCurInfo.GetCompanyCode())));
        }
Ejemplo n.º 8
0
        public ActionResult SecondarySalesDelete()
        {
            CurrentInfo _objCunr = new CurrentInfo();

            ViewBag.currentregioncode = _objCunr.GetRegionCode();
            return(View());
        }
        public string InheritStockiest(string companyCode, List <MVCModels.StockiestHeaderDetails> lstStock, string targetRegionCode)
        {
            DAL_StockiestInheritance _objDALStockiest = new DAL_StockiestInheritance();
            SPData objData      = new SPData();
            string result       = string.Empty;
            string rowsAffected = string.Empty;

            string[] regionCode = targetRegionCode.Split('^');
            DataControl.CurrentInfo _objcurrentInfo = new CurrentInfo();
            //for (int i = 0; i < lstStock.Count; i++)
            //{
            //    long SeqNum =objData.GetSeqNumber("SEQ_TBL_SFA_STOCKIEST_INHERITANCE");
            //    lstStock[i].Customer_Code = SeqNum.ToString();
            //}

            if (lstStock != null && lstStock.Count > 0)
            {
                lstStock.ForEach
                (
                    s => s.Company_Code = _objcurrentInfo.GetCompanyCode()
                );


                rowsAffected = _objDALStockiest.InheritStockiest(lstStock, regionCode, out result);
                if (rowsAffected == "-2")
                {
                    return(result);
                }
                else if (rowsAffected != "0")
                {
                    result = "Inserted Successfully";
                }
            }
            return(result);
        }
        public string ShiftStockiest(string companyCode, List <MVCModels.StockiestHeaderDetails> lstStock, List <MVCModels.StockiestHeaderDetails> lstStock1, string targetRegionCode, string customerCodes)
        {
            string[] regionCode = targetRegionCode.Split('^');

            DAL_StockiestInheritance _objDALStockiest = new DAL_StockiestInheritance();
            string result       = string.Empty;
            string rowsAffected = string.Empty;
            SPData objData      = new SPData();

            DataControl.CurrentInfo _objcurrentInfo = new CurrentInfo();

            if (lstStock != null && lstStock.Count > 0)
            {
                lstStock.ForEach
                (
                    s => s.Company_Code = _objcurrentInfo.GetCompanyCode()
                );
                rowsAffected = _objDALStockiest.GetCustomerData1(lstStock, lstStock1, regionCode, customerCodes);
                if (rowsAffected != "0")
                {
                    result = "Inserted Successfully";
                }
            }
            return(result);
        }
Ejemplo n.º 11
0
        public bool InsertNewMappingQuestions(string usertypeCode, string Questions)
        {
            bool result = false;

            try
            {
                string companyCode = null;
                string createdBy   = null;
                if (!string.IsNullOrEmpty(Questions))
                {
                    var questions = JsonConvert.DeserializeObject <List <string> >(Questions);

                    foreach (string qstns in questions)
                    {
                        BL_ICE      objmapqstns        = new BL_ICE();
                        CurrentInfo _ObjectCurrentInfo = new CurrentInfo();
                        companyCode = ViewBag.Company_Code = _ObjectCurrentInfo.GetCompanyCode();
                        createdBy   = ViewBag.Created_By = _ObjectCurrentInfo.GetUserName();
                        result      = objmapqstns.InsertNewMappingQuestions(companyCode, usertypeCode, createdBy, qstns);
                    }
                }
            }
            catch (Exception ex)
            {
                throw;
            }
            return(result);
        }
Ejemplo n.º 12
0
        public string DownloadPSParametersExcelTemplate()
        {
            //try
            //{
            //    DataControl.Repository.FileDownload objFileDownload = new DataControl.Repository.FileDownload();
            //    DataControl.Abstraction.IFileProvider objProvider = new DataControl.Impl.FileSystemProvider();
            //    string error = string.Empty;
            //    CurrentInfo objCurInfo = new CurrentInfo();
            //    DataControl.BLProduct objProduct = new BLProduct();
            //    string fileName = objProduct.GetPrimarySalesParametersExcelData(objCurInfo.GetCompanyCode());
            //    string blobURL = objProvider.GetConfigValue("EXCELTEMPLATES") + fileName;
            //    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);
            //}

            DataControl.BLProduct _objBLProduct = new BLProduct();
            string      _fileNameString         = string.Empty;
            CurrentInfo objCurInfo = new CurrentInfo();

            _fileNameString = _objBLProduct.GetPrimarySalesParametersExcelData(objCurInfo.GetCompanyCode());
            return(_fileNameString);
        }
Ejemplo n.º 13
0
        public string UploadAttachment()
        {
            var           result     = "";
            StringBuilder strbuilder = new StringBuilder();

            try
            {
                System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
                CurrentInfo            _objCurr       = new CurrentInfo();
                var                    objAzureUpload = new DataControl.Repository.AzureBlobUpload();
                var                    objPathProv    = new DataControl.Impl.FileSystemProvider();
                string                 accKey         = objPathProv.GetConfigValue("UPLOADEDFILEBLOBACCKEY");
                HttpFileCollectionBase files          = Request.Files;
                if (files.Count > 0)
                {
                    for (var i = 0; i < files.Count; i++)
                    {
                        HttpPostedFileBase fileUpload        = files[i];
                        String             fileNametimeStamp = DateTime.Now.ToString("ddMMyyyyHHmmssfff");
                        fileNametimeStamp = fileNametimeStamp + '_' + fileUpload.FileName;
                        strbuilder.Append(objAzureUpload.PutAzureBlobStorage(fileUpload.InputStream, fileNametimeStamp, accKey, _objCurr.GetCompanyCode()));
                        strbuilder.Append("~");
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            result = strbuilder.ToString();
            return(result);
        }
Ejemplo n.º 14
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.º 15
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.º 16
0
        /// <summary>
        /// Retrive the Inward Acknowledgement Value.
        /// </summary>
        /// <returns>JsonResult</returns>
        public JsonResult GetUserDashboardInwardAcknowlegementConfigValue()
        {
            CurrentInfo     _objcurrentInfo  = new CurrentInfo();
            IConfigSettings IConfig_Settings = new Config_Settings();
            string          INWARD_ACKNOWLEDGEMENT_NEEDED = IConfig_Settings.GetConfigDefaultValue(_objcurrentInfo.GetCompanyCode(), CONFIG_TYPE.INWARD, CONFIG_KEY.INWARD_ACKNOWLEDGEMENT_NEEDED);

            return(Json(INWARD_ACKNOWLEDGEMENT_NEEDED, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 17
0
        public int ChangeStatus(int id)
        {
            int         result = 0;
            CurrentInfo _obj   = new CurrentInfo();

            result = _objBLSetting.ChangeStatus(id, _obj.GetUserCode());
            return(result);
        }
Ejemplo n.º 18
0
 public AsyncEnumeratorForClasses(
     InitialMoveNextAsyncDelegate <T> initialMoveNext
     )
 {
     this._state           = STATE_INITIAL;
     this._current         = null;
     this._initialMoveNext = initialMoveNext ?? throw new ArgumentNullException(nameof(initialMoveNext));
 }
Ejemplo n.º 19
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.º 20
0
 public ActionResult TargetSettings()
 {
     _objCurrentInfo           = new CurrentInfo();
     ViewBag.CompanyCode       = _objCurrentInfo.GetCompanyCode();
     ViewBag.RequestRegionCode = _objCurrentInfo.GetRegionCode();
     ViewBag.RequestUserCode   = _objCurrentInfo.GetUserCode();
     return(View());
 }
Ejemplo n.º 21
0
        public int InsertMenuVistDetails(string menuID)
        {
            CurrentInfo objCurInfo = new CurrentInfo();

            DataControl.HiDoctorFactoryClasses.BL_ChangePassword objBLChangePass = new DataControl.HiDoctorFactoryClasses.BL_ChangePassword();
            int count = objBLChangePass.InsertVisitedScreen(objCurInfo.GetCompanyCode(), menuID, objCurInfo.GetUserCode(), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:fff"));

            return(count);
        }
Ejemplo n.º 22
0
        public Boxes(int id)
        {
            InitializeComponent();
            CurrentInfo currentuser = new CurrentInfo();

            //MessageBox.Show(currentuser.ToString());
            //MessageBox.Show(id.ToString());
            DisplayBoxes(id);
        }
Ejemplo n.º 23
0
        public ActionResult ComplaintForm()
        {
            _objCurrentInfo           = new CurrentInfo();
            ViewBag.CompanyCode       = _objCurrentInfo.GetCompanyCode();
            ViewBag.RequestRegionCode = _objCurrentInfo.GetRegionCode();
            ViewBag.User_Code         = _objCurrentInfo.GetUserCode();

            return(View());
        }
Ejemplo n.º 24
0
        //public ITickData GetCurrentTickData()
        //{
        //    return navigate.CurrentTickData;
        //}

        //public int CurrentTickIndex
        //{
        //    get { return navigate.CurrentTickIndex; }
        //}

        //public IGraphicOperator_CurrentInfo GetOperator()
        //{
        //    return graphicOperator;
        //}

        public void ChangeData(CurrentInfo currentInfo, ITickData tickData)
        {
            this.currentInfo = currentInfo;
            this.tickData    = tickData;
            if (OnGraphicDataChange != null)
            {
                OnGraphicDataChange(this, new GraphicDataChangeArgument());
            }
        }
Ejemplo n.º 25
0
        //To show the list of data to be approved/////////////

        public JsonResult GetUsersForApproval()
        {
            _objBLPromotionalInput = new BLPromotionalInput();
            _objCurrentInfo        = new CurrentInfo();
            List <MVCModels.promotionalApprovalModel> lstuserapproval = new List <MVCModels.promotionalApprovalModel>();

            lstuserapproval = _objBLPromotionalInput.GetUsersForApproval(_objCurrentInfo.GetCompanyCode(), _objCurrentInfo.GetUserCode()).ToList();
            return(Json(lstuserapproval, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 26
0
        public JsonResult GetRemarksHistory(int TransId, string Product_Code)
        {
            _objBLPromotionalInput = new BLPromotionalInput();
            _objCurrentInfo        = new CurrentInfo();
            List <MVCModels.promotionalApprovalModel> lstuserapproval = new List <MVCModels.promotionalApprovalModel>();

            lstuserapproval = _objBLPromotionalInput.GetRemarksHistory(_objCurrentInfo.GetCompanyCode(), TransId, Product_Code).ToList();
            return(Json(lstuserapproval, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 27
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="username"></param>
        /// <param name="sourceusercode"></param>
        /// <param name="destinationusercode"></param>
        /// <param name="transferid"></param>
        /// <returns></returns>
        //To show particular transfer details on clicking view

        public JsonResult GetUserDetailsOnView(string username, string sourceusercode, string destinationusercode, int transferid)
        {
            _objBLPromotionalInput = new BLPromotionalInput();
            _objCurrentInfo        = new CurrentInfo();
            List <MVCModels.ViewTransferModel> lstviewselecteduser = new List <MVCModels.ViewTransferModel>();

            lstviewselecteduser = _objBLPromotionalInput.GetUserDetailsOnView(_objCurrentInfo.GetCompanyCode(), _objCurrentInfo.GetUserCode(), username, sourceusercode, destinationusercode, transferid).ToList();
            return(Json(_objJson.Serialize(lstviewselecteduser)));
        }
Ejemplo n.º 28
0
 /// <summary>
 /// view page for Inward Adjustment
 /// </summary>
 /// <returns></returns>
 public ActionResult InwardAdjustment()
 {
     _objCurrentInfo      = new CurrentInfo();
     IConfig_Settings     = new Config_Settings();
     ViewBag.Cur_UserCode = _objCurrentInfo.GetUserCode();
     ViewBag.InwardAcknowledgementNeeded = IConfig_Settings.GetConfigDefaultValue(_objCurrentInfo.GetCompanyCode(), CONFIG_TYPE.INWARD, CONFIG_KEY.INWARD_ACKNOWLEDGEMENT_NEEDED);
     ViewBag.UserTypeName = _objCurrentInfo.GetUserTypeName();
     return(View());
 }
Ejemplo n.º 29
0
        /// <summary>
        /// Retrieve My Unapproved DCR Count.
        /// </summary>
        /// <returns>int</returns>
        public int GetMyDCRUnapprovedCount()
        {
            // Cretaes Instance.
            CurrentInfo        objInfo = new CurrentInfo();
            BLDashBoardLanding objDash = new BLDashBoardLanding(objInfo.GetCompanyCode());

            // Get My Unapprove DCR.
            return(objDash.GetMyUnapprovedEntries(objInfo.GetUserCode(), objInfo.GetRegionCode(), DashBoardLanding.Entity.DCR));
        }
Ejemplo n.º 30
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));
        }