/// <summary> /// Create a model based merchant..... /// </summary> /// <param name="entity"></param> /// <returns></returns> public bool Create(MerchantsModel entity) { return new DataAccess.DataAccess().ExecuteNonQuery("avz_mrc_spInsertMerchant", new { companyId = entity.companyId, legalName = entity.legalName, businessName = entity.businessName, workflowId = 1, salesRepId = entity.salesRepId, businessStartDate = entity.businessStartDate, industryTypeId = entity.industryTypeId, businessTypeId = entity.businessTypeId, insertUserId = 1, insertDate = DateTime.Now, ownerId = 1, cNetProcessorId = entity.CNetProcessorId, vNetProcessoId = entity.VNetProcessoId, businessWebSite = entity.businessWebSite, rentFlag = entity.rentFlag, adressTypeId = 1, address1 = entity.address.addressLine1, address2 = entity.address.addressLine2, country = "", city = entity.address.city, State = entity.address.state, phone1 = entity.address.phone1, phone2 = entity.address.phone2, phone3 = string.Empty, email1 = entity.address.email, email2 = "", email3 = "" } ); }
public bool Create(MerchantsModel merchant) { return merchantsRepository.Create(merchant); }
public bool Update(MerchantsModel merchant) { return merchantsRepository.Update(merchant); }
public bool Update(MerchantsModel entity) { return true; }
public MerchantsModel RetrieveMerchantInfo(Int64 merchantId, Int64 tasktypeId, Int64 contractId) { MerchantsModel merchantsmodel = null; DataSet merchantsinfo = (new DataAccess.DataAccess()).ExecuteDataSet("avz_mrc_spRetrievemerchantInfo", new { merchantId = merchantId, tasktypeId = tasktypeId, contractId = contractId }); if (merchantsinfo.Tables[0].Rows.Count > 0) { merchantsmodel = new MerchantsModel(); merchantsmodel.merchantName = Convert.ToString(merchantsinfo.Tables[0].Rows[0]["legalName"]); merchantsmodel.legalName = Convert.ToString(merchantsinfo.Tables[0].Rows[0]["legalName"]); merchantsmodel.businessName = Convert.ToString(merchantsinfo.Tables[0].Rows[0]["businessName"]); merchantsmodel.businessTypeId = Convert.ToInt32(merchantsinfo.Tables[0].Rows[0]["BusinessTypeId"]); merchantsmodel.businessWebSite = Convert.ToString(merchantsinfo.Tables[0].Rows[0]["businessWebSite"]); merchantsmodel.rnc = Convert.ToString(merchantsinfo.Tables[0].Rows[0]["rnc"]); merchantsmodel.industryTypeId = Convert.ToInt32(merchantsinfo.Tables[0].Rows[0]["industryTypeId"]); merchantsmodel.assignedSalesRep = Convert.ToString(merchantsinfo.Tables[0].Rows[0]["assignedSalesRep"]); merchantsmodel.salesRepId = Convert.ToInt32(merchantsinfo.Tables[0].Rows[0]["salesRepId"]); merchantsmodel.ownerName = Convert.ToString(merchantsinfo.Tables[0].Rows[0]["ownerName"]); merchantsmodel.businessStartDate = Convert.ToDateTime(merchantsinfo.Tables[0].Rows[0]["businessStartDate"]); merchantsmodel.SSN = Convert.ToString(merchantsinfo.Tables[0].Rows[0]["SSN"]); merchantsmodel.phoneNumber = Convert.ToString(merchantsinfo.Tables[0].Rows[0]["phoneNumber"]); merchantsmodel.TypeofBusinessentity = Convert.ToString(merchantsinfo.Tables[0].Rows[0]["TypeofBusinessentity"]); merchantsmodel.OwnerAddress = Convert.ToString(merchantsinfo.Tables[0].Rows[0]["address"]); merchantsmodel.merchantId = Convert.ToInt32(merchantsinfo.Tables[0].Rows[0]["merchantId"]); merchantsmodel.ContractId = Convert.ToInt64(string.IsNullOrEmpty(merchantsinfo.Tables[0].Rows[0]["contractid"].ToString()) == false ? merchantsinfo.Tables[0].Rows[0]["contractid"].ToString() : "0"); merchantsmodel.taskTypeId = Convert.ToInt64(string.IsNullOrEmpty(merchantsinfo.Tables[0].Rows[0]["taskTypeId"].ToString()) == false ? merchantsinfo.Tables[0].Rows[0]["taskTypeId"].ToString() : "0"); merchantsmodel.taskStatusId = Convert.ToInt64(string.IsNullOrEmpty(merchantsinfo.Tables[0].Rows[0]["taskStatusId"].ToString()) == false ? merchantsinfo.Tables[0].Rows[0]["taskStatusId"].ToString() : "0"); merchantsmodel.merchantStatusId = Convert.ToInt64(string.IsNullOrEmpty(merchantsinfo.Tables[0].Rows[0]["merchantStatusId"].ToString()) == false ? merchantsinfo.Tables[0].Rows[0]["merchantStatusId"].ToString() : "0"); merchantsmodel.contractStatusId = Convert.ToInt64(string.IsNullOrEmpty(merchantsinfo.Tables[0].Rows[0]["contractStatusId"].ToString()) == false ? merchantsinfo.Tables[0].Rows[0]["contractStatusId"].ToString() : "0"); merchantsmodel.merchantStatus = Convert.ToString(merchantsinfo.Tables[0].Rows[0]["merchantStatus"]); merchantsmodel.contractStatus = Convert.ToString(merchantsinfo.Tables[0].Rows[0]["contractStatus"]); merchantsmodel.ownedamount = Convert.ToDouble(merchantsinfo.Tables[0].Rows[0]["owedAmount"]); merchantsmodel.paidamount = Convert.ToDouble(merchantsinfo.Tables[0].Rows[0]["paidAmount"]); merchantsmodel.balanceamount = Convert.ToDouble(merchantsinfo.Tables[0].Rows[0]["balanceAmount"]); merchantsmodel.assignedUser = Convert.ToString(merchantsinfo.Tables[0].Rows[0]["UserName"]); merchantsmodel.industrytype = Convert.ToString(merchantsinfo.Tables[0].Rows[0]["IndustryType"]); merchantsmodel.merchantpropertytype = Convert.ToString(merchantsinfo.Tables[0].Rows[0]["propertytype"]); } return merchantsmodel; }