Example #1
0
        public ActionResult AddUpdate(int?id)
        {
            var model = new etblMasterTaxMap();

            if (id.HasValue)
            {
                var dbModel = BL_tblMasterTaxMap.GetMasterTaxMapById(id.Value);

                if (dbModel != null)
                {
                    model = dbModel;

                    model.sStayFrom = string.Format("{0:dd/MM/yyyy}", dbModel.dtStayFrom);
                    model.sStayTo   = string.Format("{0:dd/MM/yyyy}", dbModel.dtStayTo);
                    model.iStateIds = dbModel.iStateIdList.ToArray();
                }
            }
            else
            {
                //model.ListTaxes = BL_Tax.GetAllTax().Where(x => x.sTaxName.ToLower() == "sgst" || x.sTaxName.ToLower() == "cgst").ToList();
                model.ListTaxes = BL_Tax.GetAllTax().Where(x => x.cStatus.ToUpper() == "A").ToList();
            }

            model.ListRoomRateRange = BL_tblMasterTaxMap.GetRoomRateRange();

            return(PartialView("_AddUpdate", model));
        }
Example #2
0
 public ActionResult Add()
 {
     obj.ListTaxes     = BL_Tax.GetAllTax();
     obj.ListRatePlans = BL_tblPropertyRoomMap.GetAllPropertyTypes(Convert.ToInt32(Session["PropId"]));
     obj.Mode          = "ADD";
     ViewBag.heading   = "Add Taxes";
     return(PartialView("PropertyTax", obj));
 }