public tblCustomer GetCustomer(long? id) { try { CrudDataService objCrd = new CrudDataService(); tblCustomer modelCust = objCrd.GetCustomerDetails(id); return modelCust; } catch { throw; } }
public IEnumerable<tblCustomer> GetCustomerScroll(int pageNumber, int pageSize) { try { int IsPaging = 1; CrudDataService objCrd = new CrudDataService(); List<tblCustomer> modelCust = objCrd.GetCustomerList(pageNumber, pageSize, IsPaging); return modelCust; } catch (Exception ex) { throw ex; } }
public IEnumerable<tblCustomer> GetCustomers(int pageSize) { try { int pageNumber = 0; int IsPaging = 0; CrudDataService objCrd = new CrudDataService(); List<tblCustomer> modelCust = objCrd.GetCustomerList(pageNumber, pageSize, IsPaging); return modelCust; } catch { throw; } }
public string 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 message.ToString(); } catch { throw; } }
public string Edit(tblCustomer objCust) { try { CrudDataService objCrd = new CrudDataService(); Int32 message = 0; message = objCrd.UpdateCustomer(objCust); return message.ToString(); } catch { throw; } }
public string Delete(long? id) { try { CrudDataService objCrd = new CrudDataService(); Int32 message = 0; message = objCrd.DeleteCustomer(id); return message.ToString(); } catch { throw; } }