public Task <bool> DeleteAsync(CustomerBranchesVM entity) { return(Task.Run <bool>(() => { CustomerBranches cus = new CustomerBranches { ACC_BRN_AR_NAME = entity.ACC_BRN_AR_NAME, ACC_BRN_EN_NAME = entity.ACC_BRN_EN_NAME, BRN_ADDR_REMARKS = entity.BRN_ADDR_REMARKS, BRN_REMARKS = entity.BRN_REMARKS, CUST_BRN_ID = entity.CUST_BRN_ID, ACC_ID = entity.ACC_ID, GOV_ID = entity.GOV_ID, NATION_ID = entity.NATION_ID, TOWN_ID = entity.TOWN_ID, VILLAGE_ID = entity.VILLAGE_ID, AddedBy = entity.AddedBy, AddedOn = entity.AddedOn, UpdatedBy = entity.UpdatedBy, updatedOn = entity.updatedOn }; customerBrancheRepo.Delete(cus, entity.CUST_BRN_ID); return true; })); }
public JsonResult SaveNewRequest(CustomerBranches Model) { var OrderData = CustBranchesData.AddCustomerBranchesx(Model); return(new JsonResult { Data = OrderData, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }
public bool Delete(CustomerBranchesVM entity) { CustomerBranches cus = new CustomerBranches { ACC_BRN_AR_NAME = entity.ACC_BRN_AR_NAME, ACC_BRN_EN_NAME = entity.ACC_BRN_EN_NAME, BRN_ADDR_REMARKS = entity.BRN_ADDR_REMARKS, BRN_REMARKS = entity.BRN_REMARKS, CUST_BRN_ID = entity.CUST_BRN_ID, ACC_ID = entity.ACC_ID, GOV_ID = entity.GOV_ID, NATION_ID = entity.NATION_ID, TOWN_ID = entity.TOWN_ID, VILLAGE_ID = entity.VILLAGE_ID, AddedBy = entity.AddedBy, AddedOn = entity.AddedOn, UpdatedBy = entity.UpdatedBy, updatedOn = entity.updatedOn }; customerBrancheRepo.Delete(cus, entity.CUST_BRN_ID); return(true); }
//customer branches public List <dynamic> AddCustomerBranchesx(CustomerBranches customerBranches) { List <dynamic> ObjDynamic = new List <dynamic>(); CustBrnches custBranches = new CustBrnches(); custBranches.BranchId = customerBranches.BranchId; custBranches.CustId = customerBranches.CustomerId; custBranches.BrName = customerBranches.BranchName; custBranches.DisplayName = customerBranches.DisplayName; custBranches.BIsHeadOffice = customerBranches.HeadOffice; custBranches.PreSetAddress = customerBranches.PreSetAddress; custBranches.BrAdd1 = customerBranches.BrAdd1; custBranches.BrAdd2 = customerBranches.BrAdd2; custBranches.BrAdd3 = customerBranches.BrAdd3; if (!string.IsNullOrEmpty(customerBranches.BrCity)) { custBranches.BrCity = Int64.Parse(customerBranches.BrCity); } custBranches.BrCityName = customerBranches.BrCityName; custBranches.BrState = customerBranches.BrState; if (!string.IsNullOrEmpty(customerBranches.BrCountry)) { custBranches.BrCountry = Int64.Parse(customerBranches.BrCountry); } custBranches.BrCountryName = customerBranches.BrCountryName; custBranches.BrPin = customerBranches.Brpin; custBranches.BrEmailId = customerBranches.BrEmail; custBranches.BrContactNo = customerBranches.BrContact; custBranches.BrContactPerson = customerBranches.BrConName; custBranches.BrFullAddress = customerBranches.BrFullAddress; custBranches.BlAdd1 = customerBranches.BIAdd1; custBranches.BlAdd2 = customerBranches.BIAdd2; custBranches.BlAdd3 = customerBranches.BIAdd3; if (!string.IsNullOrEmpty(customerBranches.BICity)) { custBranches.BlCity = Int64.Parse(customerBranches.BICity); } custBranches.BICityName = customerBranches.BICityName; custBranches.BlState = customerBranches.BlState; if (!string.IsNullOrEmpty(customerBranches.BlCountry)) { custBranches.BlCountry = Int64.Parse(customerBranches.BlCountry); } custBranches.BillCountryName = customerBranches.BillCountryName; custBranches.BlPin = customerBranches.BIpin; custBranches.BlEmailId = customerBranches.BIEmail; custBranches.BlContactNo = customerBranches.BIContact; custBranches.BlContactPerson = customerBranches.BIConName; custBranches.HideBillingAddress = customerBranches.HideBillingAddress; custBranches.Needs_Delivery_Term = customerBranches.NeedDelivery; custBranches.Needs_Fee_Warning = customerBranches.NeedWarning; custBranches.Fee_Warning = customerBranches.FeeWarning; custBranches.IsActive = true; // delete this line <-- custBranches.Type = customerBranches.Type; if (!string.IsNullOrEmpty(UserID)) { custBranches.UserID = Convert.ToInt64(UserID); } AddCustomerBranches(custBranches); //ObjDynamic.Add(custBranches.COSId); ObjDynamic.Add(custBranches); return(ObjDynamic); }