Ejemplo n.º 1
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.º 2
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.º 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 Insertuserproduct(List <MVCModels.UserProductModel> lstuserproduct, string UserCode)
        {
            //string result = string.Empty;
            bool result = false;

            DataControl.CurrentInfo _objcurr = new CurrentInfo();
            string companyid  = _objcurr.GetCompanyId();
            int    Company_id = Int32.Parse(companyid);

            result = _objBLPromotionalInput.Insertuserproduct(_objcurr.GetCompanyCode(), _objcurr.GetUserCode(), Company_id, lstuserproduct, UserCode);
            return(result);
        }
Ejemplo n.º 5
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.º 6
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.º 7
0
        /// <summary>
        /// Method to Insert Purchase Requisition Form
        /// </summary>
        /// <param name="ObjPurchaseRequisitionModel"></param>
        /// <returns></returns>

        public bool InsertPurchaseRequisition(PurchaseRequisitionModel ObjPurchaseRequisitionModel)
        {
            bool   result      = false;
            string companyCode = null;
            int    companyId   = 0;
            string companyid   = null;
            string createdBy   = null;
            string regionCode  = null;

            try
            {
                companyCode = ObjCurrInfo.GetCompanyCode();
                companyid   = ObjCurrInfo.GetCompanyId();
                Int32.TryParse(companyid, out companyId);
                createdBy  = ObjCurrInfo.GetUserCode();
                regionCode = ObjCurrInfo.GetRegionCode();
                result     = ObjPR.InsertPurchaseRequisition(companyCode, companyId, createdBy, ObjPurchaseRequisitionModel, regionCode);
            }catch (Exception ex)
            {
                throw;
            }
            return(result);
        }
Ejemplo n.º 8
0
        public static string InsertErrorLogsurvey(string ex, string screen_name, string menuurl)
        {
            string result = "";

            _objSPData = new SPData();
            _objData   = new Data();
            CurrentInfo _objCur = new CurrentInfo();

            try
            {
                string companycode    = _objCur.GetCompanyCode();
                string UserCode       = _objCur.GetUserCode();
                string Companyid      = _objCur.GetCompanyId();
                string message        = ex;
                string errdata        = "";
                string errstacktrace  = "";
                string innerexception = "";
                string source         = "";
                using (SqlConnection cn = _objData.GetConnectionObject(companycode))
                {
                    cn.Open();
                    var p = new DynamicParameters();
                    p.Add("@Company_Code", companycode);
                    p.Add("@User_Code", UserCode);
                    p.Add("@Companyid", Companyid);
                    p.Add("@errmsg", message);
                    p.Add("@errdata", errdata);
                    p.Add("@errstack", errstacktrace);
                    p.Add("@errinnerex", innerexception);
                    p.Add("@errsrc", source);
                    p.Add("@screenname", screen_name);
                    p.Add("@menuurl", menuurl); //file/controller/method name
                    result = cn.Query <string>(SP_HD_Error_Log, p, commandType: CommandType.StoredProcedure).SingleOrDefault();
                    cn.Close();
                }
                if (result == "" || result == null)
                {
                    result = "Please contact salesadmin,there is some error in data";
                }

                return(result);
            }
            catch (Exception exp)
            {
                throw exp;
            }
        }
Ejemplo n.º 9
0
        public string urlEncodeing()
        {
            MVCModels.UserInfoModel objuser    = new MVCModels.UserInfoModel();
            CurrentInfo             objCurInfo = new CurrentInfo();
            string userParam = string.Empty;

            objuser.Company_Code   = objCurInfo.GetCompanyCode();
            objuser.User_Code      = objCurInfo.GetUserCode();
            objuser.User_Type_Code = objCurInfo.GetUserTypeCode();
            objuser.Region_Code    = objCurInfo.GetRegionCode();
            objuser.Company_Id     = objCurInfo.GetCompanyId();
            objuser.User_Details   = objCurInfo.GetUserName() + " (" + objCurInfo.GetUserTypeName() + ")";
            objuser.Is_Mobile      = "NO";
            userParam = Newtonsoft.Json.JsonConvert.SerializeObject(objuser);
            byte[] LoginParamsEncode = System.Text.Encoding.UTF8.GetBytes(userParam);
            userParam = Convert.ToBase64String(LoginParamsEncode);
            return(userParam);
        }
Ejemplo n.º 10
0
        public bool SaveDisableRegion(string Disable_Date, string Region_Name, string Region_Code)
        {
            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.SaveDisableRegion(companyCode, UserCode, Companyid, Disable_Date, Region_Name, Region_Code);
            }
            catch (Exception ex)
            {
                throw;
            }
            return(result);
        }
Ejemplo n.º 11
0
        public ActionResult MasterDataHandler(string SSID)
        {
            UserInfoModel _objcomp = new UserInfoModel();

            if (!string.IsNullOrEmpty(SSID))
            {
                byte[] EncodedParams = Convert.FromBase64String(SSID);
                string Params        = System.Text.Encoding.UTF8.GetString(EncodedParams);
                _objcomp = Newtonsoft.Json.JsonConvert.DeserializeObject <UserInfoModel>(Params);

                ViewBag.CompanyCode       = _objcomp.Company_Code;
                ViewBag.UserCode          = _objcomp.User_Code;
                ViewBag.UTypeCode         = _objcomp.User_Type_Code;
                ViewBag.RegionCode        = _objcomp.Region_Code;
                ViewBag.UserDetails       = _objcomp.User_Details;
                ViewBag.Company_Id        = _objcomp.Company_Id;
                ViewBag.BatchProcessingId = _objcomp.BatchProcessingId;
                ViewBag.BP_Guid           = _objcomp.BP_Guid;
                ViewBag.LoadType          = "Mail";
                ViewBag.FileProcessId     = _objcomp.FileProcessId;
                ViewBag.ViewType          = _objcomp.ViewType;
            }
            else
            {
                CurrentInfo _objCurrentInfo = new CurrentInfo();
                ViewBag.CompanyCode       = _objCurrentInfo.GetCompanyCode();
                ViewBag.UserCode          = _objCurrentInfo.GetUserCode();
                ViewBag.UTypeCode         = _objCurrentInfo.GetUserTypeCode();
                ViewBag.RegionCode        = _objCurrentInfo.GetRegionCode();
                ViewBag.UserDetails       = _objCurrentInfo.GetCompanyCode();
                ViewBag.Company_Id        = _objCurrentInfo.GetCompanyId();
                ViewBag.LoadType          = "Screen";
                ViewBag.BatchProcessingId = 155;
                ViewBag.BP_Guid           = "32EAA70B-89C3-42CC-9F19-F8BA55224531";
                ViewBag.FileProcessId     = 66;
                ViewBag.ViewType          = "MasterData";
            }
            return(View());
        }