public bool UpdateCustomer(CustomerDetails CustDetails) { bool result = false; DLCustomerDetails customer = new DLCustomerDetails(); customer.CustomerID = CustDetails.CustomerID; customer.CustomerName = CustDetails.CustomerName; customer.PrimaryMailID = CustDetails.PrimaryMailID; customer.PrimaryPhoneNo = CustDetails.PrimaryPhoneNo; customer.Fax = CustDetails.Fax; customer.Website = CustDetails.Website; customer.IndustryCategoryId = CustDetails.IndustryCategoryId; customer.ContactPersonNo = CustDetails.ContactPersonNo; customer.ContactPersonName = CustDetails.ContactPersonName; customer.ShippingAddress = CustDetails.ShippingAddress; customer.ShippingAddress1 = CustDetails.ShippingAddress1; customer.ShippingCity = CustDetails.ShippingCity; customer.ShippingState = CustDetails.ShippingState; customer.ShippingCountry = CustDetails.ShippingCountry; customer.ShippingPincode = CustDetails.ShippingPincode; customer.BillingAddress = CustDetails.BillingAddress; customer.BillingAddress1 = CustDetails.BillingAddress1; customer.BillingCity = CustDetails.BillingCity; customer.BillingState = CustDetails.BillingState; customer.BillingCountry = CustDetails.BillingCountry; customer.BillingPincode = CustDetails.BillingPincode; customer.GSTNO = CustDetails.GSTNO; result = _customerProvider.UpdateCustomer(customer); return(result); }
public bool SaveCustomer(DLCustomerDetails customerDetails) { try { con = connManager.GetConnection(); con.Open(); con.Execute(addNewCustomer, customerDetails, commandType: CommandType.StoredProcedure); return(true); } catch (Exception ex) { throw; } finally { con.Close(); } }
public DLCustomerDetails GetCustomerByID(int custID) { DLCustomerDetails customerDetails = new DLCustomerDetails(); con = connManager.GetConnection(); con.Open(); try { DynamicParameters param = new DynamicParameters(); param.Add("@CustomerID", custID); return(customerDetails = dbConnection.Query <DLCustomerDetails>(getCustomerByID, param, commandType: CommandType.StoredProcedure).SingleOrDefault()); } catch (Exception ex) { throw; } finally { con.Close(); } }