Exemplo n.º 1
0
 public ActionResult URSSE_Child_Form(URSSEModel m)
 {
     if (ModelState.IsValid)
     {
         using (var con = new SqlConnection(_connectionString))
         {
             var result = con.Query <int>("Insert_into_URSSE_Page_transactions "
                                          , new {
                 CC_NO        = m.CcNo,
                 SerialNumber = m.Serial_No,
                 m.IMEI1,
                 m.IMEI2,
                 m.RepairStatus,
                 m.TotalCost,
                 m.CollectableAmount,
                 m.PaymentMode,
                 m.CashReceived,
                 m.TransactionAmount,
                 m.TransactionDateTime,
                 m.TransactionNumber,
                 m.ReVisitDateTime
             }, commandType: CommandType.StoredProcedure).FirstOrDefault();
             if (result == 1)
             {
                 TempData["Message"] = "Updated Successfully";
             }
         }
     }
     return(RedirectToAction("URSSEForm", "Logistics"));
 }
Exemplo n.º 2
0
 public ActionResult URSSEForm()
 {
     if (TempData["Message"] != null)
     {
         ViewBag.Message = TempData["Message"].ToString();
     }
     ViewBag.CallStatus   = new SelectList(dropdown.BindCall_Status_Master(), "Value", "Text");
     ViewBag.CourierName  = new SelectList(dropdown.BindCourier(CurrentUser.CompanyId), "Value", "Text");
     ViewBag.EngineerName = new SelectList(dropdown.BindEngineer(CurrentUser.CompanyId), "Value", "Text");
     using (var con = new SqlConnection(_connectionString))
     {
         var result  = new URSSEModel();
         var result1 = con.Query <URSSE_Page_Model>("URSSE_Page_Single_Table", null, commandType: CommandType.StoredProcedure).ToList();
         result.URSSE_Table = result1;
         return(View(result));
     }
 }