Exemple #1
0
 public ActionResult Create(AgreementDetail model)
 {
     if (ModelState.IsValid)
     {
         objAgree.Insert(model);
         return(RedirectToAction("Index"));
     }
     return(View(model));
 }
        public void Update(AgreementDetail model)
        {
            uc_Agreements details = new uc_Agreements();

            details.Value     = model.Value;
            details.EndDate   = model.EndDate;
            details.ID        = model.ID;
            details.Name      = model.Name;
            details.StartDate = model.StartDate;
            details.Status    = model.Status;
            AgreementRepository.Update(details);
        }
        public AgreementDetail GetbyID(int ID)
        {
            uc_Agreements   temp    = AgreementRepository.GetbyID(ID);
            AgreementDetail details = new AgreementDetail();

            details.Value     = temp.Value;
            details.EndDate   = temp.EndDate;
            details.ID        = temp.ID;
            details.Name      = temp.Name;
            details.StartDate = temp.StartDate;
            details.Status    = temp.Status;
            return(details);
        }