/// <summary> /// 得到一个对象实体 /// </summary> public BWJS.Model.CompanyNetLoan GetModel(int CompanyId) { StringBuilder strSql = new StringBuilder(); strSql.Append("select CompanyId, IsDeleted, CreateId, CreateDate, EditId, EditDate, HighestLoan, IsHaveGuarantee, IsMortgage, MaxMonthlyInterest, LoanPrescription, DescriptionHtml, Remark "); strSql.Append(" from dbo.[CompanyNetLoan] "); strSql.Append(" where CompanyId=@CompanyId "); SqlParameter[] parameters = { new SqlParameter("@CompanyId", SqlDbType.Int, 4) }; parameters[0].Value = CompanyId; BWJS.Model.CompanyNetLoan model = new BWJS.Model.CompanyNetLoan(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public BWJS.Model.MachineSupplier GetModel(int MachineSupplierId) { StringBuilder strSql = new StringBuilder(); strSql.Append("select MachineSupplierId, API, QRCode, MainBrand, MainBusiness, Wechat, PublicWechat, Remark, Status, IsDeleted, CreateId, SupplierName, CreateDate, EditId, EditDate, Manager, Phone, Mobile, Address, QQ, SiteUrl, Logo "); strSql.Append(" from dbo.[MachineSupplier] "); strSql.Append(" where MachineSupplierId=@MachineSupplierId"); SqlParameter[] parameters = { new SqlParameter("@MachineSupplierId", SqlDbType.Int, 4) }; parameters[0].Value = MachineSupplierId; BWJS.Model.MachineSupplier model = new BWJS.Model.MachineSupplier(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public BWJS.Model.NL_ProfessionInfo GetModel(int ConsultId) { StringBuilder strSql = new StringBuilder(); strSql.Append("select ConsultId, FullName, Age, MonthlyIncome, Company, UnitNature, WorkingHour, Payroll, JobPosition, SocialSecurit, Fund, Degree, GraduationYear "); strSql.Append(" from dbo.[NL_ProfessionInfo] "); strSql.Append(" where ConsultId=@ConsultId "); SqlParameter[] parameters = { new SqlParameter("@ConsultId", SqlDbType.Int, 4) }; parameters[0].Value = ConsultId; BWJS.Model.NL_ProfessionInfo model = new BWJS.Model.NL_ProfessionInfo(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public BWJS.Model.CompanyRebate GetModel(int CompanyRebateId) { StringBuilder strSql = new StringBuilder(); strSql.Append("select CompanyRebateId, SettlementMethod, SalesPercentage, ProfitDescription, Remark, IsDeleted, CreateId, CreateDate, EditId, EditDate, CompanyId, ProductId, CaseCode, RebateName, CompanyRebatePer, MerchantRebate, AgentRebate, HQRebate "); strSql.Append(" from dbo.[CompanyRebate] "); strSql.Append(" where CompanyRebateId=@CompanyRebateId"); SqlParameter[] parameters = { new SqlParameter("@CompanyRebateId", SqlDbType.Int, 4) }; parameters[0].Value = CompanyRebateId; BWJS.Model.CompanyRebate model = new BWJS.Model.CompanyRebate(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public BWJS.Model.Region GetModel(int RegionId) { StringBuilder strSql = new StringBuilder(); strSql.Append("select RegionId, EditDate, IsDeleted, Remark, ReginName, ReginCode, ParentId, RegionDir, RegionStatus, CreateId, CreateDate, EditId "); strSql.Append(" from Region "); strSql.Append(" where RegionId=@RegionId"); SqlParameter[] parameters = { new SqlParameter("@RegionId", SqlDbType.Int, 4) }; parameters[0].Value = RegionId; BWJS.Model.Region model = new BWJS.Model.Region(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public BWJS.Model.OrderRebateSettlementDetails GetModel(int OrderRebateSettlementDetailsId) { StringBuilder strSql = new StringBuilder(); strSql.Append("select OrderRebateSettlementDetailsId, OrderRebateSettlementApplyId, OrderRebateId, CreateDate, CreateId "); strSql.Append(" from dbo.[OrderRebateSettlementDetails] "); strSql.Append(" where OrderRebateSettlementDetailsId=@OrderRebateSettlementDetailsId"); SqlParameter[] parameters = { new SqlParameter("@OrderRebateSettlementDetailsId", SqlDbType.Int, 4) }; parameters[0].Value = OrderRebateSettlementDetailsId; BWJS.Model.OrderRebateSettlementDetails model = new BWJS.Model.OrderRebateSettlementDetails(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public XBWN.Model.xbwn_Task GetModel(int AutoId) { StringBuilder strSql = new StringBuilder(); strSql.Append("select AutoId, IsDeleted, CreateId, CreateDate, EditId, EditDate, NetLoanApplyId, TelNo, ServicePwd, TaskId, State, TaskStatus, ImgStr, Mark "); strSql.Append(" from dbo.[xbwn_Task] "); strSql.Append(" where AutoId=@AutoId"); SqlParameter[] parameters = { new SqlParameter("@AutoId", SqlDbType.Int, 4) }; parameters[0].Value = AutoId; XBWN.Model.xbwn_Task model = new XBWN.Model.xbwn_Task(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
public DataSet GetCityAreaName(int ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("SELECT Name FROM [CityArea] WHERE ID=" + ID + " "); return(BWJSHelperSQL.Query(strSql.ToString())); }
/// <summary> /// 得到一个对象实体 /// </summary> public XBWN.Model.xbwn_UserBank GetModel(int UserBankId) { StringBuilder strSql = new StringBuilder(); strSql.Append("select UserBankId, Flag, IsDeleted, CreateId, CreateDate, EditId, EditDate, NetLoanApplyId, No, RealName, IdNo, BankCardNo, TelNo, Cash, SmsCode "); strSql.Append(" from dbo.[xbwn_UserBank] "); strSql.Append(" where UserBankId=@UserBankId"); SqlParameter[] parameters = { new SqlParameter("@UserBankId", SqlDbType.Int, 4) }; parameters[0].Value = UserBankId; XBWN.Model.xbwn_UserBank model = new XBWN.Model.xbwn_UserBank(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public BWJS.Model.SysConfig GetModel(int Id) { StringBuilder strSql = new StringBuilder(); strSql.Append("select Id, RecordCreateTime, KeyType, KeyName, KeyVal, Description, CreatUserID, RecordUpdateUserID, RecordIsDelete, RecordUpdateTime "); strSql.Append(" from dbo.[SysConfig] "); strSql.Append(" where Id=@Id"); SqlParameter[] parameters = { new SqlParameter("@Id", SqlDbType.Int, 4) }; parameters[0].Value = Id; BWJS.Model.SysConfig model = new BWJS.Model.SysConfig(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 更新一条数据 /// </summary> //public bool Update(BWJS.Model.NetLoanApply model) //{ // StringBuilder strSql = new StringBuilder(); // strSql.Append("update dbo.[NetLoanApply] set "); // strSql.Append(" Sex = @Sex , "); // strSql.Append(" Mobile = @Mobile , "); // strSql.Append(" RecommendationCode = @RecommendationCode , "); // strSql.Append(" Remark = @Remark , "); // strSql.Append(" Status = @Status , "); // strSql.Append(" IsDeleted = @IsDeleted , "); // strSql.Append(" ApplicationAmount = @ApplicationAmount , "); // strSql.Append(" LoanAmount = @LoanAmount , "); // strSql.Append(" ContractAmount = @ContractAmount , "); // strSql.Append(" LoanTerm = @LoanTerm , "); // strSql.Append(" CompanyId = @CompanyId , "); // strSql.Append(" CreateDate = @CreateDate , "); // strSql.Append(" LoanDate = @LoanDate , "); // strSql.Append(" ProductId = @ProductId , "); // strSql.Append(" ProductName = @ProductName , "); // strSql.Append(" IsSettled = @IsSettled , "); // strSql.Append(" MerchantRebate = @MerchantRebate , "); // strSql.Append(" MerchantMoney = @MerchantMoney , "); // strSql.Append(" AgentRebate = @AgentRebate , "); // strSql.Append(" AgentMoney = @AgentMoney , "); // strSql.Append(" HQRebate = @HQRebate , "); // strSql.Append(" UserId = @UserId , "); // strSql.Append(" HQMoney = @HQMoney , "); // strSql.Append(" NetProfit = @NetProfit , "); // strSql.Append(" SettlementDate = @SettlementDate , "); // strSql.Append(" DepartmentId = @DepartmentId , "); // strSql.Append(" SN = @SN , "); // strSql.Append(" IdCardLibraryId = @IdCardLibraryId , "); // strSql.Append(" FullName = @FullName , "); // strSql.Append(" IdCardType = @IdCardType , "); // strSql.Append(" IdCard = @IdCard "); // strSql.Append(" where NetLoanApplyId=@NetLoanApplyId "); // SqlParameter[] parameters = { // new SqlParameter("@NetLoanApplyId",model.NetLoanApplyId) , // new SqlParameter("@Sex",model.Sex) , // new SqlParameter("@Mobile",model.Mobile) , // new SqlParameter("@RecommendationCode",model.RecommendationCode) , // new SqlParameter("@Remark",model.Remark) , // new SqlParameter("@Status",model.Status) , // new SqlParameter("@IsDeleted",model.IsDeleted) , // new SqlParameter("@ApplicationAmount",model.ApplicationAmount) , // new SqlParameter("@LoanAmount",model.LoanAmount) , // new SqlParameter("@ContractAmount",model.ContractAmount) , // new SqlParameter("@LoanTerm",model.LoanTerm) , // new SqlParameter("@CompanyId",model.CompanyId) , // new SqlParameter("@CreateDate",model.CreateDate) , // new SqlParameter("@LoanDate",model.LoanDate) , // new SqlParameter("@ProductId",model.ProductId) , // new SqlParameter("@ProductName",model.ProductName) , // new SqlParameter("@IsSettled",model.IsSettled) , // new SqlParameter("@MerchantRebate",model.MerchantRebate) , // new SqlParameter("@MerchantMoney",model.MerchantMoney) , // new SqlParameter("@AgentRebate",model.AgentRebate) , // new SqlParameter("@AgentMoney",model.AgentMoney) , // new SqlParameter("@HQRebate",model.HQRebate) , // new SqlParameter("@UserId",model.UserId) , // new SqlParameter("@HQMoney",model.HQMoney) , // new SqlParameter("@NetProfit",model.NetProfit) , // new SqlParameter("@SettlementDate",model.SettlementDate) , // new SqlParameter("@DepartmentId",model.DepartmentId) , // new SqlParameter("@SN",model.SN) , // new SqlParameter("@IdCardLibraryId",model.IdCardLibraryId) , // new SqlParameter("@FullName",model.FullName) , // new SqlParameter("@IdCardType",model.IdCardType) , // new SqlParameter("@IdCard",model.IdCard) // }; // int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters); // if (rows > 0) // { // return true; // } // else // { // return false; // } //} /// <summary> /// 删除一条数据 /// </summary> //public bool Delete(int NetLoanApplyId) //{ // StringBuilder strSql = new StringBuilder(); // strSql.Append("update dbo.[NetLoanApply] set IsDeleted=1"); // strSql.Append(" where NetLoanApplyId=@NetLoanApplyId"); // SqlParameter[] parameters = { // new SqlParameter("@NetLoanApplyId", SqlDbType.Int,4) // }; // parameters[0].Value = NetLoanApplyId; // int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters); // if (rows > 0) // { // return true; // } // else // { // return false; // } //} /// <summary> /// 批量删除一批数据 /// </summary> //public bool DeleteList(string NetLoanApplyIdlist) //{ // StringBuilder strSql = new StringBuilder(); // strSql.Append("update dbo.[NetLoanApply] set IsDeleted=1"); // strSql.Append(" where ID in (" + NetLoanApplyIdlist + ") "); // int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString()); // if (rows > 0) // { // return true; // } // else // { // return false; // } //} /// <summary> /// 得到一个对象实体 /// </summary> public BWJS.Model.NetLoanApply GetModel(int NetLoanApplyId) { StringBuilder strSql = new StringBuilder(); strSql.Append("select NetLoanApplyId, Sex, Mobile, RecommendationCode, Remark, Status, IsDeleted, ApplicationAmount, LoanAmount, ContractAmount, LoanTerm, CompanyId, CreateDate, LoanDate, ProductId, ProductName, IsSettled, MerchantRebate, MerchantMoney, AgentRebate, AgentMoney, HQRebate, UserId, HQMoney, NetProfit, SettlementDate, DepartmentId, SN, IdCardLibraryId, FullName, IdCardType, IdCard ,SourceCompany "); strSql.Append(" from dbo.[NetLoanApply] "); strSql.Append(" where NetLoanApplyId=@NetLoanApplyId"); SqlParameter[] parameters = { new SqlParameter("@NetLoanApplyId", SqlDbType.Int, 4) }; parameters[0].Value = NetLoanApplyId; BWJS.Model.NetLoanApply model = new BWJS.Model.NetLoanApply(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public BWJS.Model.CompanyRelation GetModel(int CompanyId, int UserId) { StringBuilder strSql = new StringBuilder(); strSql.Append("select CompanyRelationId, CreateDate, EditId, EditDate, CompanyId, UserId, DepartmentId, RecommendationCode, QRCode, Remark, IsDeleted, CreateId ,API "); strSql.Append(" from dbo.[CompanyRelation] "); strSql.Append(" where CompanyId=@CompanyId and UserId=@UserId "); SqlParameter[] parameters = { new SqlParameter("@CompanyId", SqlDbType.Int, 4), new SqlParameter("@UserId", SqlDbType.Int, 4) }; parameters[0].Value = CompanyId; parameters[1].Value = UserId; BWJS.Model.CompanyRelation model = new BWJS.Model.CompanyRelation(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public BWJS.Model.NL_ConsultStatusChangeLog GetModel(int Id) { StringBuilder strSql = new StringBuilder(); strSql.Append("select Id, ConsultId, BusinessType, Status, PrevStatus, CreateDate "); strSql.Append(" from dbo.[NL_ConsultStatusChangeLog] "); strSql.Append(" where Id=@Id"); SqlParameter[] parameters = { new SqlParameter("@Id", SqlDbType.Int, 4) }; parameters[0].Value = Id; BWJS.Model.NL_ConsultStatusChangeLog model = new BWJS.Model.NL_ConsultStatusChangeLog(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public BWJS.Model.NL_Loan GetModel(int LoanId) { StringBuilder strSql = new StringBuilder(); strSql.Append("select LoanId, ReturnAmount, LoanDate, LoanDays, DueDate, InterestName, InterestValue, BankCardId, MemberId, CustomerId, RealName, ConsultId, IdNo, BankCode, BankName, TelNo, IsCorrect, TradePasswordExist, TradePassword, TradePasswordSecond, Flag, Mark, BorrowNo, IsDeleted, CreateId, CreateDate, EditId, EditDate, BankId, LoanInfo, LoanAmount, AmountReceived, LoanServiceCharge, LoanRate "); strSql.Append(" from dbo.[NL_Loan] "); strSql.Append(" where LoanId=@LoanId"); SqlParameter[] parameters = { new SqlParameter("@LoanId", SqlDbType.Int, 4) }; parameters[0].Value = LoanId; BWJS.Model.NL_Loan model = new BWJS.Model.NL_Loan(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public BWJS.Model.AdRelease GetModel(int AdReleaseID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select AdReleaseID, Remark, BeginTime, EndTime, ResourceID, CreatUserID, RecordUpdateUserID, RecordIsDelete, RecordUpdateTime, RecordCreateTime,AdReleaseName "); strSql.Append(" from AdRelease "); strSql.Append(" where AdReleaseID=@AdReleaseID"); SqlParameter[] parameters = { new SqlParameter("@AdReleaseID", SqlDbType.Int, 4) }; parameters[0].Value = AdReleaseID; BWJS.Model.AdRelease model = new BWJS.Model.AdRelease(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
public XBWN.Model.xbwn_UserBank GetModel(string realName, string idNo, string telNo, int flag) { StringBuilder strSql = new StringBuilder(); strSql.Append("select * from dbo.[xbwn_UserBank] "); strSql.Append(" where RealName=@RealName and IdNo=@IdNo and TelNo=@TelNo and Flag=@Flag"); SqlParameter[] parameters = { new SqlParameter("@RealName", realName), new SqlParameter("@IdNo", idNo), new SqlParameter("@TelNo", telNo), new SqlParameter("@Flag", flag) }; DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public BWJS.Model.SysSettings GetModel(int SysSettingsId) { StringBuilder strSql = new StringBuilder(); strSql.Append("select SysSettingsId, TimerSeconds, Remark, Status, IsDeleted, CreateId, CreateDate, EditId, EditDate, CompnayName, IP, DomainName, Logo, Icon, RecordNumber, TimerHours, TimerMinutes "); strSql.Append(" from dbo.[SysSettings] "); strSql.Append(" where SysSettingsId=@SysSettingsId"); SqlParameter[] parameters = { new SqlParameter("@SysSettingsId", SqlDbType.Int, 4) }; parameters[0].Value = SysSettingsId; BWJS.Model.SysSettings model = new BWJS.Model.SysSettings(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public BWJS.Model.Channel GetModel(int ChannelId) { StringBuilder strSql = new StringBuilder(); strSql.Append("select ChannelId, EditId, EditDate, ChannelName, IsDeleted, CreateId, CreateDate "); strSql.Append(" from Channel "); strSql.Append(" where ChannelId=@ChannelId"); SqlParameter[] parameters = { new SqlParameter("@ChannelId", SqlDbType.Int, 4) }; parameters[0].Value = ChannelId; BWJS.Model.Channel model = new BWJS.Model.Channel(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public XBWN.Model.xbwn_Loan GetModel(int LoanId) { StringBuilder strSql = new StringBuilder(); strSql.Append("select * from dbo.[xbwn_Loan] "); strSql.Append(" where LoanId=@LoanId"); SqlParameter[] parameters = { new SqlParameter("@LoanId", SqlDbType.Int, 4) }; parameters[0].Value = LoanId; XBWN.Model.xbwn_Loan model = new XBWN.Model.xbwn_Loan(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public BWJS.Model.OrderRebateCheck GetModel(int OrderRebateId) { StringBuilder strSql = new StringBuilder(); strSql.Append("select OrderRebateId, AgentMoney, AgentRebate, HQRebate, HQMoney, NetProfit, PayStatus, IsSettled, IsCancel, SettlementDate, CreateDate, TransNo, Remark, IsDeleted, Exp_CreateId, Exp_CreateDate, Exp_EditId, Exp_EditDate, Exp_BatchNo, Exp_NewId, Exp_CompanyCategoryId, Exp_CompanyId, CompanyId, Exp_SettlementMethod, Exp_SalesPercentage, Exp_UserId, Exp_FullName, Exp_IdCardType, Exp_IdCard, Exp_Sex, Exp_Mobile, Exp_RecommendationCode, Exp_ApplicationAmount, UserId, Exp_LoanAmount, Exp_ContractAmount, Exp_LoanTerm, Exp_LoanDate, Exp_ProductId, Exp_ProductName, Exp_MerchantRebate, Exp_MerchantMoney, Exp_AgentRebate, Exp_AgentMoney, OrderApplyId, Exp_HQRebate, Exp_HQMoney, Exp_NetProfit, CompanyRebateId, OrderMoney, MerchantRebate, MerchantMoney "); strSql.Append(" from dbo.[OrderRebateCheck] "); strSql.Append(" where OrderRebateId=@OrderRebateId"); SqlParameter[] parameters = { new SqlParameter("@OrderRebateId", SqlDbType.Int, 4) }; parameters[0].Value = OrderRebateId; BWJS.Model.OrderRebateCheck model = new BWJS.Model.OrderRebateCheck(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public BWJS.Model.NL_AssetInfo GetModel(int ConsultId) { StringBuilder strSql = new StringBuilder(); strSql.Append("select ConsultId, Cars, Houses, OtherLoans, SesameSeed, TaobaoAccount, ParticleLoan, BusinessPolicy, CreditCard, CreditSituation, CreditCardServiceLife "); strSql.Append(" from dbo.[NL_AssetInfo] "); strSql.Append(" where ConsultId=@ConsultId "); SqlParameter[] parameters = { new SqlParameter("@ConsultId", SqlDbType.Int, 4) }; parameters[0].Value = ConsultId; BWJS.Model.NL_AssetInfo model = new BWJS.Model.NL_AssetInfo(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public BWJS.Model.Role GetModel(int RoleId) { StringBuilder strSql = new StringBuilder(); strSql.Append("select RoleId, IsDeleted, RoleName, RoleType, RoleStatus, Remark, CreateId, CreateDate, EditId, EditDate,IsManager "); strSql.Append(" from Role "); strSql.Append(" where RoleId=@RoleId"); SqlParameter[] parameters = { new SqlParameter("@RoleId", SqlDbType.Int, 4) }; parameters[0].Value = RoleId; BWJS.Model.Role model = new BWJS.Model.Role(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public BWJS.Model.Function GetModel(int FunctionId) { StringBuilder strSql = new StringBuilder(); strSql.Append("select FunctionId, Status, OrderId, CreateId, CreateDate, EditId, EditDate, IsDeleted, Remark, FunctionName, FunctionCode, FunctionIcon, FunctionClass, ClassId, ParentId, ExternalLinkAddress, FunctionDir "); strSql.Append(" from [Function] "); strSql.Append(" where FunctionId=@FunctionId"); SqlParameter[] parameters = { new SqlParameter("@FunctionId", SqlDbType.Int, 4) }; parameters[0].Value = FunctionId; BWJS.Model.Function model = new BWJS.Model.Function(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public BWJS.Model.ProductRelation GetModel(int ProductRelationId) { StringBuilder strSql = new StringBuilder(); strSql.Append("select ProductRelationId, ClassId, ProductId "); strSql.Append(" from ProductRelation "); strSql.Append(" where ProductRelationId=@ProductRelationId"); SqlParameter[] parameters = { new SqlParameter("@ProductRelationId", SqlDbType.Int, 4) }; parameters[0].Value = ProductRelationId; BWJS.Model.ProductRelation model = new BWJS.Model.ProductRelation(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public BWJS.Model.Users GetModel(int UserID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select * from Users "); strSql.Append(" where UserID=@UserID"); SqlParameter[] parameters = { new SqlParameter("@UserID", SqlDbType.Int, 4) }; parameters[0].Value = UserID; BWJS.Model.Users model = new BWJS.Model.Users(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public BWJS.Model.NL_IdentityInfo GetModel(int ConsultId) { StringBuilder strSql = new StringBuilder(); strSql.Append("select ConsultId, FullName, IDNo, MonthlyIncome, CreditHistory, HousingStatus, DrivingLicense, Face, IdentityCardScanner, DebitCard, CreditCard, ParticleLoan, BusinessPolicy, CreditCardAgeLimit, OtherLoan, SesameSeed, TaobaoAccount, Company, UnitNature, WorkingHour, Payroll, JobPosition, SocialSecurit, Fund, Degree, GraduationYear "); strSql.Append(" from dbo.[NL_IdentityInfo] "); strSql.Append(" where ConsultId=@ConsultId "); SqlParameter[] parameters = { new SqlParameter("@ConsultId", SqlDbType.Int, 4) }; parameters[0].Value = ConsultId; BWJS.Model.NL_IdentityInfo model = new BWJS.Model.NL_IdentityInfo(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public BWJS.Model.NL_Contacts GetModel(int ContactId) { StringBuilder strSql = new StringBuilder(); strSql.Append("select ContactId, EditId, EditDate, ConsultId, FullName, Mobile, RelationId, Depth, IsDeleted, CreateId, CreateDate "); strSql.Append(" from dbo.[NL_Contacts] "); strSql.Append(" where ContactId=@ContactId"); SqlParameter[] parameters = { new SqlParameter("@ContactId", SqlDbType.Int, 4) }; parameters[0].Value = ContactId; BWJS.Model.NL_Contacts model = new BWJS.Model.NL_Contacts(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public XBWN.Model.xbwn_Picture GetModel(int PictiureId) { StringBuilder strSql = new StringBuilder(); strSql.Append("select PictiureId, NetLoanApplyId, Base64Code, ImgId, IsDeleted, CreateId, CreateDate, EditId, EditDate "); strSql.Append(" from dbo.[xbwn_Picture] "); strSql.Append(" where PictiureId=@PictiureId"); SqlParameter[] parameters = { new SqlParameter("@PictiureId", SqlDbType.Int, 4) }; parameters[0].Value = PictiureId; XBWN.Model.xbwn_Picture model = new XBWN.Model.xbwn_Picture(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 得到一个对象实体 /// </summary> public BWJS.Model.NL_Consult GetModel(int ConsultId) { StringBuilder strSql = new StringBuilder(); strSql.Append("select ConsultId, Status, StatusRemark, ProvinceId, CityId, DistrictId, Area, Address, Email, CreateDate, Sign, CompanyId, OrderNo, QueryCode, IdentitySuccess, MobileOperatorSuccess, AlipaySuccess, TaobaoSuccess, JdSuccess, PbocSuccess, RbjSuccess, GjjSuccess, FullName, ChsiSuccess, EmailSuccess, OtherSuccess, IMEI, MemberId, CustomerId, Token, Mark, UserPassword, InviteCode, Mobile, RegisterIP, SmsCode, FontId, BankId, FaceNo, IDNo, LoanAmount, LoanTerm, LoanUse, LoanRate "); strSql.Append(" from dbo.[NL_Consult] "); strSql.Append(" where ConsultId=@ConsultId"); SqlParameter[] parameters = { new SqlParameter("@ConsultId", SqlDbType.Int, 4) }; parameters[0].Value = ConsultId; BWJS.Model.NL_Consult model = new BWJS.Model.NL_Consult(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
/// <summary> /// 根据姓名电话证件号码银行卡号四要素得到一个对象实体 /// </summary> /// <param name="realName">姓名</param> /// <param name="telNo">电话</param> /// <param name="idCardNo">证件号码</param> /// <param name="bankCardNo">银行卡号</param> /// <returns>对象实体</returns> public BWJS.Model.NL_Bank GetModel(string realName, string telNo, string idCardNo, string bankCardNo) { StringBuilder strSql = new StringBuilder(); strSql.Append("select * from dbo.[NL_Bank] "); strSql.Append(" where RealName=@RealName and TelNo=@TelNo and IdNo=@IdNo and BankCardNo=@BankCardNo"); SqlParameter[] parameters = { new SqlParameter("@RealName", realName), new SqlParameter("@TelNo", telNo), new SqlParameter("@IdNo", idCardNo), new SqlParameter("@BankCardNo", bankCardNo) }; BWJS.Model.NL_Bank model = new BWJS.Model.NL_Bank(); DataSet ds = BWJSHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }