Ejemplo n.º 1
0
        public string UpdateStatus(int Id, bool Mode)
        {
            object result    = null;
            string strReturn = string.Empty;

            try
            {
                obj         = BL_tblPropertyRoomMap.GetSingleRecordById(Id);
                obj.bActive = Mode ? true : false;
                int i = BL_tblPropertyRoomMap.UpdateRecord(obj);
                if (i == 1)
                {
                    if (Mode)
                    {
                        result = new { st = 1, msg = "Room enabled Successfully ." };
                    }
                    else
                    {
                        result = new { st = 1, msg = "Room disabled Successfully ." };
                    }
                }
                else
                {
                    result = new { st = 0, msg = "Kindly try after some time." };
                }
            }
            catch (Exception)
            {
                result = new { st = 0, msg = "Kindly try after some time." };
            }
            strReturn = OneFineRateAppUtil.clsUtils.ConvertToJson(result);
            return(strReturn);
        }
Ejemplo n.º 2
0
        public ActionResult Edit(int Id)
        {
            ViewBag.HeaderText = "Modify Room";
            obj          = BL_tblPropertyRoomMap.GetSingleRecordById(Id);
            obj.Mode     = "Edit";
            obj.SizeType = obj.sSizeType;
            decimal ft = (decimal)obj.dSizeSqft;
            decimal mt = (decimal)obj.dSizeMtr;

            if (obj.SizeType == "Sq.Mtr")
            {
                obj.dSizeSqft = mt;
                obj.dSizeMtr  = ft;
            }
            else
            {
                obj.dSizeSqft = ft;
                obj.dSizeMtr  = mt;
            }

            obj.AccessibilityItems           = BL_tblRoomAccessibilityM.GetRoomAccessibility(obj.sRoomAccessibilityIds);
            obj.BuildingcharacteristicsItems = BL_tblBuildingCharacteristicsM.GetBuildingCharacteristics(obj.sBuildingCharacteristicsIds);
            obj.OutdoorViewItems             = BL_tblRoomOutdoorViewM.GetRoomOutdoorViews(obj.sRoomOutdoorViewIds);
            return(PartialView("_PropertyRoom", obj));
        }