Exemplo n.º 1
0
 public ActionResult Create(string reasonName, string isAdjust)
 {
     try {
         if (!string.IsNullOrEmpty(reasonName))
         {
             ReasonTendered ReasonTendered = new ReasonTendered();
             ReasonTendered.Name      = reasonName;
             ReasonTendered.IsDeleted = false;
             if (isAdjust == "True")
             {
                 ReasonTendered.IsAdjust = true;
             }
             if (ModelState.IsValid)
             {
                 objBs.ReasonTenderedBs.Insert(ReasonTendered);
             }
             return(RedirectToAction("Index", new { sms = "Created Successfully !" }));
         }
         else
         {
             return(RedirectToAction("Index", new { sms = "reason is null or empty !" }));
         }
     }
     catch (Exception ex) {
         return(RedirectToAction("Index", new { sms = "Operation Create failed ! " + ex.InnerException.InnerException.Message.ToString() }));
     }
 }
Exemplo n.º 2
0
        //Delete
        public void Delete(int Id)
        {
            ReasonTendered ReasonTendereds = db.ReasonTendereds.Find(Id);

            ReasonTendereds.IsDeleted       = true;
            db.Entry(ReasonTendereds).State = EntityState.Modified;
            Save();
        }
Exemplo n.º 3
0
 //Update
 public void Update(ReasonTendered ReasonTendereds)
 {
     db.Entry(ReasonTendereds).State = EntityState.Modified;
     Save();
 }
Exemplo n.º 4
0
 //Insert
 public void Insert(ReasonTendered ReasonTendereds)
 {
     db.ReasonTendereds.Add(ReasonTendereds);
     Save();
 }
Exemplo n.º 5
0
 //Update
 public void Update(ReasonTendered ReasonTendereds)
 {
     db.Entry(ReasonTendereds).State = EntityState.Modified;
     Save();
 }
Exemplo n.º 6
0
 //Insert
 public void Insert(ReasonTendered ReasonTendereds)
 {
     db.ReasonTendereds.Add(ReasonTendereds);
     Save();
 }
Exemplo n.º 7
0
 //Update
 public void Update(ReasonTendered ReasonTendered)
 {
     objDb.Update(ReasonTendered);
 }
Exemplo n.º 8
0
 //Insert
 public void Insert(ReasonTendered ReasonTendered)
 {
     objDb.Insert(ReasonTendered);
 }
Exemplo n.º 9
0
 //Update
 public void Update(ReasonTendered ReasonTendered)
 {
     objDb.Update(ReasonTendered);
 }
Exemplo n.º 10
0
 //Insert
 public void Insert(ReasonTendered ReasonTendered)
 {
     objDb.Insert(ReasonTendered);
 }