// GET: ContractDetails/Create
 public IActionResult Create()
 {
     ViewData["ContractId"]    = new SelectList(_context.Contract, "Id", "Id");
     ViewData["ObjectsId"]     = new SelectList(_context.Set <Objects>(), "Id", "Floor");
     ViewData["SupportTypeId"] = new SelectList(_context.Set <SupportType>(), "Id", "Defenition");
     return(View());
 }
예제 #2
0
        public ActionResult EditContractDetail(int Id)
        {
            var detail = _context.ContractDetail.Find(Id);

            ViewData["ContractId"]    = new SelectList(_context.Contract, "Id", "Id", detail.ContractId);
            ViewData["ObjectsId"]     = new SelectList(_context.Set <Objects>(), "Id", "Floor", detail.ObjectsId);
            ViewData["SupportTypeId"] = new SelectList(_context.Set <SupportType>(), "Id", "Defenition", detail.SupportTypeId);

            return(PartialView(detail));
        }
예제 #3
0
 public ActionResult NewObject()
 {
     ViewData["BuildingId"]   = new SelectList(_context.Building, "Id", "Address");
     ViewData["ObjectTypeId"] = new SelectList(_context.Set <ObjectType>(), "Id", "Defenition");
     return(PartialView());
 }
 // GET: UserPermissions/Create
 public IActionResult Create()
 {
     ViewData["PermissionId"] = new SelectList(_context.Permission, "Id", "Id");
     ViewData["UserId"]       = new SelectList(_context.Set <Users>(), "Id", "Password");
     return(View());
 }
예제 #5
0
 public ActionResult NewCustomer()
 {
     ViewData["CustomerTypeId"] = new SelectList(_context.Set <CustomerType>(), "Id", "Defenition");
     return(PartialView());
 }
        public ActionResult EditPayment(int id)
        {
            var payments = _context.Payments.Find(id);

            ViewData["CashId"] = new SelectList(_context.Cash, "Id", "Defenition", payments.CashId);
            if (payments.ContractDetailId != null)
            {
                ViewData["ContractDetailId"] = new SelectList(_context.ContractDetail, "Id", "Id", payments.ContractDetailId);
            }
            if (payments.CostTypeId != null)
            {
                ViewData["CostTypeId"] = new SelectList(_context.CostType, "Id", "Defenition", payments.CostTypeId);
            }
            if (payments.IncomeTypeId != null)
            {
                ViewData["IncomeTypeId"] = new SelectList(_context.IncomeType, "Id", "Defenition", payments.IncomeTypeId);
            }
            ViewData["SignTypeId"]        = new SelectList(_context.Set <SignType>(), "Id", "Defenition", payments.SignTypeId);
            ViewData["TransactionTypeId"] = new SelectList(_context.Set <TransactionType>(), "Id", "Defenition", payments.TransactionTypeId);

            return(PartialView(payments));
        }