public DataSet getStates(int CountryId) { ShopingDataContext context = new ShopingDataContext(); var datset = context.ExecuteDataSet(getState, BuildStatePrams(CountryId)); return(datset); }
public DataSet getCountrys() { ShopingDataContext context = new ShopingDataContext(); var datset = context.ExecuteDataSetwithOutParameter(cmdCountry); return(datset); }
public List <Customer> getAllCustomer() { ShopingDataContext context = new ShopingDataContext(); var details = context.ExecuteDataSet(spGetCustomers, BuildCustomerparams(0)); return(HarnessUtilitys.ConvertDataTable <Customer>(details.Tables[0])); }
public int Create(Customer cust) { ShopingDataContext context = new ShopingDataContext(); var res = Convert.ToInt32(context.executeScaler <decimal>(CreateOrUpdateSP, customerParamsBuilder(cust))); return(res); }
public Customer GetCustomer(int Id) { ShopingDataContext context = new ShopingDataContext(); var details = context.executeDataReadar(spGetCustomers, BuildCustomerparams(Id)); details.Read(); Customer cus = new Customer() { Id = Convert.ToInt32(details["Id"]), FirstName = Convert.ToString(details["FirstName"]), LastName = Convert.ToString(details["LastName"]), City = Convert.ToString(details["City"]), Country = Convert.ToString(details["Country"]), Phone = Convert.ToString(details["Phone"]) }; details.Close(); return(cus); }