Beispiel #1
0
        public ActionResult ServiceChargeAccount(int PropID = 0, string PropName = "")
        {
            if (Session["CustomerID"] != null && (int)Session["CustomerID"] != 0)
            {
                if (PropID != 0)
                {
                    Session["SelectedPropertyID"] = PropID;
                    Session["SelectedProperty"]   = PropName;
                }

                ServiceChargeBudgetViewModel vm = new ServiceChargeBudgetViewModel();

                if (Session["SelectedPropertyID"] != null && (int)Session["SelectedPropertyID"] != 0)
                {
                    vm.MyServiceCharges = new ServiceCharges();

                    vm.MyServiceCharges.AllTrans = ServiceChargeMethods.AllTransactions((int)Session["SelectedPropertyID"]);
                    vm.MyServiceCharges.AllTrans = ServiceChargeMethods.ReplaceTransactionDateWithPaidDate(vm.MyServiceCharges.AllTrans);
                    return(View(vm));
                }
                else
                {
                    vm.PropertyList   = Models.PropertyMethods.GetAllOwnedProperties((int)Session["CustomerID"]);
                    vm.ViewName       = "ServiceChargeAccount";
                    vm.ControllerName = "ServiceCharges";
                    return(View(vm));
                }
            }
            else
            {
                //return not logged in
                return(View("../Home/NotLoggedIn"));
            }
        }