コード例 #1
0
        public ActionResult AddUpdateCompany(int?id)
        {
            var model = new eCorporateCompanyM();

            if (id.HasValue)
            {
                model = BL_CorporateCompanyM.GetCorporateCompanyById(id.Value);
            }
            else
            {
                model.CountryCodePhoneList = BL_Country.GetAllCountryPhoneCodes();
            }

            return(PartialView("_AddCompany", model));
        }
コード例 #2
0
ファイル: BiddingController.cs プロジェクト: DivakerSIngh/ofr
        public ActionResult Index(PropSearchRequestModel model)
        {
            string type = "";

            if (HttpContext.Request.Params["type"] != null && HttpContext.Request.Params["type"] != "")
            {
                type = HttpContext.Request.Params["type"];
            }
            ViewBag.type = type == "" ? null : type;

            eBiddingSearch obj = new eBiddingSearch();

            if (User.Identity.IsAuthenticated)
            {
                var user = BL_WebsiteUser.GetSingleRecordById(User.Identity.GetUserId <long>());
                obj.sUserTitle     = user.Title;
                obj.sUserFirstName = user.FirstName;
                obj.sUserLastName  = user.LastName;
                obj.sUserEmail     = user.Email;
                obj.sUserMobileNo  = user.PhoneNumber;
                obj.iStateId       = user.StateId.HasValue? user.StateId.Value:0;
            }

            obj.sSearchId            = Convert.ToInt32(model.cid);
            obj.sSearchName          = model.cname;
            obj.sSearchType          = model.ctype == "City" ? "C" : model.ctype == "Locality" ? "L" : "A";
            obj.ctype                = model.ctype;
            obj.sJsonRoomData        = model.sRoomData;
            obj.sCheckIn             = model.sCheckIn;
            obj.sCheckOut            = model.sCheckOut;
            obj.cname                = model.cname;
            obj.type                 = ViewBag.type;
            obj.CountryCodePhoneList = BL_Country.GetAllCountryPhoneCodes();
            List <etblIndianLocalityCordinate> cordinatesList;

            var list = BL_Bidding.GetAreaLocalityForBid(obj.sSearchType, obj.sSearchId, out cordinatesList);

            obj.lstPolygonData = cordinatesList;

            obj.sJsonLocality          = OneFineRateAppUtil.clsUtils.ConvertToJson(list);
            obj.BidSearchData          = "BidSearchData" + Guid.NewGuid().ToString();
            obj.BidData                = "BidData" + Guid.NewGuid().ToString();
            Session[obj.BidSearchData] = obj;
            Session[obj.BidData]       = model;
            //TempData.Keep();
            return(View(obj));
        }