コード例 #1
0
 public ActionResult GetCustomer_Scroll(int PageNo, int RowCountPerPage)
 {
     try
     {
         Thread.Sleep(2000);
         int IsPaging = 1;
         CrudDataService objCrd = new CrudDataService();
         List<tblCustomer> modelCust = objCrd.GetCustomerList(PageNo, RowCountPerPage, IsPaging);
         return PartialView("_ListCustomer", modelCust);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #2
0
        public JsonResult Create(tblCustomer objCust)
        {
            try
            {
                CrudDataService objCrd = new CrudDataService();
                Int32 message = 0;

                if ((objCust.CustName != null) && (objCust.CustEmail != null)) message = objCrd.InsertCustomer(objCust);
                else message = -1;
                return Json(new
                {
                    Success = true,
                    Message = message
                });
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #3
0
        public JsonResult Edit(tblCustomer objCust)
        {
            try
            {
                CrudDataService objCrd = new CrudDataService();
                Int32 message = 0;
                message = objCrd.UpdateCustomer(objCust);
                return Json(new
                {
                    Success = true,
                    Message = message
                });

            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #4
0
        public JsonResult Delete(long? id)
        {
            try
            {
                CrudDataService objCrd = new CrudDataService();
                Int32 message = 0;
                message = objCrd.DeleteCustomer(id);
                return Json(new
                {
                    Success = true,
                    Message = message
                });

            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #5
0
 public ActionResult Edit(long? id)
 {
     try
     {
         CrudDataService objCrd = new CrudDataService();
         tblCustomer modelCust = objCrd.GetCustomerDetails(id);
         return View(modelCust);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }