Ejemplo n.º 1
0
        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int CompanyRebateId, int EditId)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update dbo.[CompanyRebate] set IsDeleted=1,EditDate=GETDATE(),EditId=@EditId");
            strSql.Append(" where CompanyRebateId=@CompanyRebateId");
            SqlParameter[] parameters =
            {
                new SqlParameter("@CompanyRebateId", SqlDbType.Int, 4),
                new SqlParameter("@EditId",          SqlDbType.Int, 4)
            };
            parameters[0].Value = CompanyRebateId;
            parameters[1].Value = EditId;


            int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool UpdateResourceID(AdRelease model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update AdRelease set ");
            strSql.Append(" ResourceID = @ResourceID , ");

            strSql.Append(" RecordUpdateUserID = @RecordUpdateUserID , ");

            strSql.Append(" RecordUpdateTime = GetDate(), ");
            strSql.Append(" where AdReleaseID=@AdReleaseID");

            SqlParameter[] parameters =
            {
                new SqlParameter("@AdReleaseID",        model.AdReleaseID),
                new SqlParameter("@ResourceID",         model.ResourceID),
                new SqlParameter("@RecordUpdateUserID", model.RecordUpdateUserID)
            };
            int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(BWJS.Model.ProductRelation model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update ProductRelation set ");

            strSql.Append(" ClassId = @ClassId , ");
            strSql.Append(" ProductId = @ProductId  ");
            strSql.Append(" where ProductRelationId=@ProductRelationId ");

            SqlParameter[] parameters =
            {
                new SqlParameter("@ProductRelationId", model.ProductRelationId),
                new SqlParameter("@ClassId",           model.ClassId),
                new SqlParameter("@ProductId",         model.ProductId)
            };

            int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool UpdateRoleFun(int RoleId, string FunctionArray)
        {
            StringBuilder strSql = new StringBuilder();

            string[] FunctionIDList = FunctionArray.Split(',');
            strSql.Append(" update [RoleFunction] set IsDeleted=1 where RoleId=" + RoleId + ";");
            for (int i = 0; i < (FunctionIDList.Count() - 1); i++)
            {
                if (FunctionIDList[i] != "" && FunctionIDList[i] != null)
                {
                    strSql.Append(@"insert into[RoleFunction]([RoleId] ,[FunctionId],[CreateId],[CreateDate],[EditId],[EditDate],[IsDeleted]) 
                                values(" + RoleId + ", " + FunctionIDList[i].ToInt() + ", 1 , getdate() , 1 , getdate(), 0);");
                }
            }

            SqlParameter[] parameters = { };

            int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int DepartmentID, int EditId)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update DepartmentInfo set RecordIsDelete=1,EditDate=GETDATE(),EditId=@EditId");
            strSql.Append(" where DepartmentID=@DepartmentID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@DepartmentID", SqlDbType.Int, 4),
                new SqlParameter("@EditId",       SqlDbType.Int, 4)
            };
            parameters[0].Value = DepartmentID;
            parameters[1].Value = EditId;

            int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int OrderRebateId, int userId)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update dbo.[OrderRebateCheck] set IsDeleted=1,Exp_EditId=@Exp_EditId,Exp_EditDate=@Exp_EditDate");
            strSql.Append(" where OrderRebateId=@OrderRebateId");
            SqlParameter[] parameters =
            {
                new SqlParameter("@OrderRebateId", OrderRebateId),
                new SqlParameter("@Exp_EditId",    userId),
                new SqlParameter("@Exp_EditDate",  DateTime.Now)
            };


            int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool UpdateDepartmentID(BWJS.Model.Users model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update Users set ");
            strSql.Append(" DepartmentID = @DepartmentID , ");
            strSql.Append(" RecordUpdateUserID = @RecordUpdateUserID , ");
            strSql.Append(" RecordIsDelete = @RecordIsDelete , ");
            strSql.Append(" RecordUpdateTime = @RecordUpdateTime  ");
            strSql.Append(" where UserID=@UserID;");
            strSql.Append(@" UPDATE MofangDB.dbo.OrderApply SET DepartmentID = @DepartmentID  WHERE ((DepartmentID = NULL) or (DepartmentID=0)) AND UserID = @UserID  AND RecordIsDelete = 0 ;  ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@UserID",             model.UserID),
                new SqlParameter("@DepartmentID",       model.DepartmentID),
                new SqlParameter("@RecordUpdateUserID", model.RecordUpdateUserID),
                new SqlParameter("@RecordIsDelete",     model.RecordIsDelete),
                new SqlParameter("@RecordUpdateTime",   model.RecordUpdateTime)
            };

            int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(string tradePassword, string tradePasswordSecond, int flag, string borrowNo)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update dbo.[xbwn_Loan] set ");
            strSql.Append(" Flag = @Flag , ");
            strSql.Append(" EditDate = @EditDate ");
            strSql.Append(" where BorrowNo=@BorrowNo ");

            SqlParameter[] parameters =
            {
                new SqlParameter("@Flag",     flag),
                new SqlParameter("@EditDate", DateTime.Now),
                new SqlParameter("@BorrowNo", borrowNo)
            };

            int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 9
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public void Add(BWJS.Model.CompanyRelation model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into dbo.[CompanyRelation](");
            strSql.Append("CreateDate,EditId,EditDate,CompanyId,UserId,DepartmentId,RecommendationCode,QRCode,Remark,IsDeleted,CreateId,API");
            strSql.Append(") values (");
            strSql.Append("@CreateDate,@EditId,@EditDate,@CompanyId,@UserId,@DepartmentId,@RecommendationCode,@QRCode,@Remark,@IsDeleted,@CreateId,@API");
            strSql.Append(") ");

            SqlParameter[] parameters =
            {
                new SqlParameter("@CreateDate",         model.CreateDate),
                new SqlParameter("@EditId",             model.EditId),
                new SqlParameter("@EditDate",           model.EditDate),
                new SqlParameter("@CompanyId",          model.CompanyId),
                new SqlParameter("@UserId",             model.UserId),
                new SqlParameter("@DepartmentId",       model.DepartmentId),
                new SqlParameter("@RecommendationCode", model.RecommendationCode),
                new SqlParameter("@QRCode",             model.QRCode),
                new SqlParameter("@Remark",             model.Remark),
                new SqlParameter("@IsDeleted",          model.IsDeleted),
                new SqlParameter("@CreateId",           model.CreateId),
                new SqlParameter("@API",                model.API)
            };
            BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters);
        }
Ejemplo n.º 10
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(string smsCode, int flag, string no)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update dbo.[xbwn_UserBank] set ");
            strSql.Append(" Flag = @Flag , ");
            strSql.Append(" EditDate = @EditDate , ");
            strSql.Append(" SmsCode = @SmsCode  ");
            strSql.Append(" where No=@No ");

            SqlParameter[] parameters =
            {
                new SqlParameter("@Flag",     flag),
                new SqlParameter("@EditDate", DateTime.Now),
                new SqlParameter("@SmsCode",  smsCode),
                new SqlParameter("@No",       no)
            };

            int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 11
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(BWJS.Model.NL_ConsultStatusChangeLog model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update dbo.[NL_ConsultStatusChangeLog] set ");

            strSql.Append(" ConsultId = @ConsultId , ");
            strSql.Append(" BusinessType = @BusinessType , ");
            strSql.Append(" Status = @Status , ");
            strSql.Append(" PrevStatus = @PrevStatus , ");
            strSql.Append(" CreateDate = @CreateDate  ");
            strSql.Append(" where Id=@Id ");

            SqlParameter[] parameters =
            {
                new SqlParameter("@Id",           model.Id),
                new SqlParameter("@ConsultId",    model.ConsultId),
                new SqlParameter("@BusinessType", model.BusinessType),
                new SqlParameter("@Status",       model.Status),
                new SqlParameter("@PrevStatus",   model.PrevStatus),
                new SqlParameter("@CreateDate",   model.CreateDate)
            };

            int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 12
0
        /// <summary>
        /// 结算申请详情信息入库和修改订单返利结算申请表的结算状态为已申请
        /// </summary>
        /// <param name="orderRebateSettlementApplyId">结算申请主键</param>
        /// <param name="userId">当前登录人编号</param>
        /// <param name="where">申请时查询条件</param>
        /// <param name="res01">结算申请详情信息入库的结果</param>
        /// <param name="res02">修改订单返利结算申请表的结算状态为已申请的结果</param>
        public void ApplySettlement(int orderRebateSettlementApplyId, int userId, string where, ref int res01, ref int res02)
        {
            //结算申请详情信息入库
            StringBuilder strSql = new StringBuilder();
            strSql.AppendFormat(@"insert into [dbo].[OrderRebateSettlementDetails](OrderRebateSettlementApplyId,OrderRebateId,CreateDate,CreateId)
            select {0} OrderRebateSettlementApplyId,a.OrderRebateId,'{1}',{2}
            from [dbo].[OrderRebate] a
            left join [dbo].[CompanyRebate] b on b.CompanyId=a.CompanyId
            left join [dbo].[Company] c on c.CompanyId=a.CompanyId
            left join [dbo].[Users] d on d.UserId=a.UserId", orderRebateSettlementApplyId, DateTime.Now, userId);
            if (where.Trim() != "")
            {
                strSql.Append(" where " + where);
            }
            res01 = BWJSHelperSQL.ExecuteSql(strSql.ToString());

            //修改订单返利结算申请表的结算状态为已申请
            strSql = new StringBuilder();
            strSql.AppendFormat(@"update [dbo].[OrderRebate]
            set IsSettled=1
            from [dbo].[OrderRebate] a
            left join [dbo].[CompanyRebate] b on b.CompanyId=a.CompanyId
            left join [dbo].[Company] c on c.CompanyId=a.CompanyId
            left join [dbo].[Users] d on d.UserId=a.UserId");
            if (where.Trim() != "")
            {
                strSql.Append(" where " + where);
            }

            res02 = BWJSHelperSQL.ExecuteSql(strSql.ToString());
        }
Ejemplo n.º 13
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public void Add(BWJS.Model.CompanyNetLoan model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into dbo.[CompanyNetLoan](");
            strSql.Append("CompanyId,IsDeleted,CreateId,CreateDate,EditId,EditDate,HighestLoan,IsHaveGuarantee,IsMortgage,MaxMonthlyInterest,LoanPrescription,DescriptionHtml,Remark");
            strSql.Append(") values (");
            strSql.Append("@CompanyId,@IsDeleted,@CreateId,@CreateDate,@EditId,@EditDate,@HighestLoan,@IsHaveGuarantee,@IsMortgage,@MaxMonthlyInterest,@LoanPrescription,@DescriptionHtml,@Remark");
            strSql.Append(") ");

            SqlParameter[] parameters =
            {
                new SqlParameter("@CompanyId",          model.CompanyId),
                new SqlParameter("@IsDeleted",          model.IsDeleted),
                new SqlParameter("@CreateId",           model.CreateId),
                new SqlParameter("@CreateDate",         model.CreateDate),
                new SqlParameter("@EditId",             model.EditId),
                new SqlParameter("@EditDate",           model.EditDate),
                new SqlParameter("@HighestLoan",        model.HighestLoan),
                new SqlParameter("@IsHaveGuarantee",    model.IsHaveGuarantee),
                new SqlParameter("@IsMortgage",         model.IsMortgage),
                new SqlParameter("@MaxMonthlyInterest", model.MaxMonthlyInterest),
                new SqlParameter("@LoanPrescription",   model.LoanPrescription),
                new SqlParameter("@DescriptionHtml",    model.DescriptionHtml),
                new SqlParameter("@Remark",             model.Remark)
            };

            BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters);
        }
Ejemplo n.º 14
0
        /// <summary>
        /// 更新银行卡认证状态
        /// </summary>
        public bool Update(string smsCode, int flag, int consultId, string bankCardId)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update dbo.[NL_Bank] set ");
            strSql.Append(" Flag = @Flag , ");
            strSql.Append(" EditDate = @EditDate , ");
            strSql.Append(" SmsCode = @SmsCode  ");
            strSql.Append(" where ConsultId=@ConsultId and No=@No");

            SqlParameter[] parameters =
            {
                new SqlParameter("@Flag",      flag),
                new SqlParameter("@EditDate",  DateTime.Now),
                new SqlParameter("@SmsCode",   smsCode),
                new SqlParameter("@ConsultId", consultId),
                new SqlParameter("@No",        bankCardId)
            };

            int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 15
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(BWJS.Model.OrderRebateSettlementDetails model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update dbo.[OrderRebateSettlementDetails] set ");

            strSql.Append(" OrderRebateSettlementApplyId = @OrderRebateSettlementApplyId , ");
            strSql.Append(" OrderRebateId = @OrderRebateId , ");
            strSql.Append(" CreateDate = @CreateDate , ");
            strSql.Append(" CreateId = @CreateId  ");
            strSql.Append(" where OrderRebateSettlementDetailsId=@OrderRebateSettlementDetailsId ");

            SqlParameter[] parameters =
            {
                new SqlParameter("@OrderRebateSettlementDetailsId", model.OrderRebateSettlementDetailsId),
                new SqlParameter("@OrderRebateSettlementApplyId",   model.OrderRebateSettlementApplyId),
                new SqlParameter("@OrderRebateId",                  model.OrderRebateId),
                new SqlParameter("@CreateDate",                     model.CreateDate),
                new SqlParameter("@CreateId",                       model.CreateId)
            };

            int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 16
0
        /// <summary>
        /// 确认结算,更新结算申请表结算状态为已结算和更新订单表结算状态为已结算
        /// </summary>
        /// <param name="orderRebateSettlementApplyId">结算申请主键</param>
        /// <param name="userId">当前登录人编号</param>
        /// <param name="res01">更新结算申请表结算状态为已结算的结果</param>
        /// <param name="res02">更新订单表结算状态为已结算的结果</param>
        public void ConfirmSettlement(string orderRebateSettlementApplyId, int userId, ref int res01, ref int res02)
        {
            //更新结算申请表结算状态为已结算
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update dbo.[OrderRebateSettlementApply] set ");
            strSql.Append(" EditId = @EditId , ");
            strSql.Append(" EditDate = @EditDate , ");
            strSql.Append(" ApplyStatus = 1 ");
            strSql.Append(" where OrderRebateSettlementApplyId in(@OrderRebateSettlementApplyId)");

            SqlParameter[] parameters01 =
            {
                new SqlParameter("@EditId",                       userId),
                new SqlParameter("@EditDate",                     DateTime.Now),
                new SqlParameter("@OrderRebateSettlementApplyId", orderRebateSettlementApplyId)
            };
            res01 = BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters01);

            //更新订单表结算状态为已结算
            strSql = new StringBuilder();
            strSql.Append("update dbo.[OrderRebate] set ");
            //strSql.Append(" EditId = @EditId , ");
            strSql.Append(" SettlementDate = @SettlementDate , ");
            strSql.Append(" IsSettled = 2 ");
            strSql.Append(" where OrderRebateId in(select OrderRebateId from [dbo].[OrderRebateSettlementDetails] where OrderRebateSettlementApplyId in(@OrderRebateSettlementApplyId))");

            SqlParameter[] parameters02 =
            {
                //new SqlParameter("@EditId",userId) ,
                new SqlParameter("@SettlementDate",               DateTime.Now),
                new SqlParameter("@OrderRebateSettlementApplyId", orderRebateSettlementApplyId)
            };
            res02 = BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters02);
        }
Ejemplo n.º 17
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(BWJS.Model.CompanyRebate model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update dbo.[CompanyRebate] set ");

            strSql.Append(" SettlementMethod = @SettlementMethod , ");
            strSql.Append(" SalesPercentage = @SalesPercentage , ");
            strSql.Append(" ProfitDescription = @ProfitDescription , ");
            strSql.Append(" Remark = @Remark , ");
            strSql.Append(" IsDeleted = @IsDeleted , ");
            //strSql.Append(" CreateId = @CreateId , ");
            //strSql.Append(" CreateDate = @CreateDate , ");
            strSql.Append(" EditId = @EditId , ");
            strSql.Append(" EditDate = @EditDate , ");
            strSql.Append(" CompanyId = @CompanyId , ");
            strSql.Append(" ProductId = @ProductId , ");
            strSql.Append(" CaseCode = @CaseCode , ");
            strSql.Append(" RebateName = @RebateName , ");
            strSql.Append(" CompanyRebatePer = @CompanyRebatePer , ");
            strSql.Append(" MerchantRebate = @MerchantRebate , ");
            strSql.Append(" AgentRebate = @AgentRebate , ");
            strSql.Append(" HQRebate = @HQRebate  ");
            strSql.Append(" where CompanyRebateId=@CompanyRebateId ");

            SqlParameter[] parameters =
            {
                new SqlParameter("@CompanyRebateId",   model.CompanyRebateId),
                new SqlParameter("@SettlementMethod",  model.SettlementMethod),
                new SqlParameter("@SalesPercentage",   model.SalesPercentage),
                new SqlParameter("@ProfitDescription", model.ProfitDescription),
                new SqlParameter("@Remark",            model.Remark),
                new SqlParameter("@IsDeleted",         model.IsDeleted),
                //new SqlParameter("@CreateId",model.CreateId) ,
                //new SqlParameter("@CreateDate",model.CreateDate) ,
                new SqlParameter("@EditId",            model.EditId),
                new SqlParameter("@EditDate",          model.EditDate),
                new SqlParameter("@CompanyId",         model.CompanyId),
                new SqlParameter("@ProductId",         model.ProductId),
                new SqlParameter("@CaseCode",          model.CaseCode),
                new SqlParameter("@RebateName",        model.RebateName),
                new SqlParameter("@CompanyRebatePer",  model.CompanyRebatePer),
                new SqlParameter("@MerchantRebate",    model.MerchantRebate),
                new SqlParameter("@AgentRebate",       model.AgentRebate),
                new SqlParameter("@HQRebate",          model.HQRebate)
            };

            int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 18
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(BWJS.Model.SysSettings model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update dbo.[SysSettings] set ");

            strSql.Append(" TimerSeconds = @TimerSeconds , ");
            strSql.Append(" Remark = @Remark , ");
            strSql.Append(" Status = @Status , ");
            strSql.Append(" IsDeleted = @IsDeleted , ");
            strSql.Append(" CreateId = @CreateId , ");
            strSql.Append(" CreateDate = @CreateDate , ");
            strSql.Append(" EditId = @EditId , ");
            strSql.Append(" EditDate = @EditDate , ");
            strSql.Append(" CompnayName = @CompnayName , ");
            strSql.Append(" IP = @IP , ");
            strSql.Append(" DomainName = @DomainName , ");
            strSql.Append(" Logo = @Logo , ");
            strSql.Append(" Icon = @Icon , ");
            strSql.Append(" RecordNumber = @RecordNumber , ");
            strSql.Append(" TimerHours = @TimerHours , ");
            strSql.Append(" TimerMinutes = @TimerMinutes  ");
            strSql.Append(" where SysSettingsId=@SysSettingsId ");

            SqlParameter[] parameters =
            {
                new SqlParameter("@SysSettingsId", model.SysSettingsId),
                new SqlParameter("@TimerSeconds",  model.TimerSeconds),
                new SqlParameter("@Remark",        model.Remark),
                new SqlParameter("@Status",        model.Status),
                new SqlParameter("@IsDeleted",     model.IsDeleted),
                new SqlParameter("@CreateId",      model.CreateId),
                new SqlParameter("@CreateDate",    model.CreateDate),
                new SqlParameter("@EditId",        model.EditId),
                new SqlParameter("@EditDate",      model.EditDate),
                new SqlParameter("@CompnayName",   model.CompnayName),
                new SqlParameter("@IP",            model.IP),
                new SqlParameter("@DomainName",    model.DomainName),
                new SqlParameter("@Logo",          model.Logo),
                new SqlParameter("@Icon",          model.Icon),
                new SqlParameter("@RecordNumber",  model.RecordNumber),
                new SqlParameter("@TimerHours",    model.TimerHours),
                new SqlParameter("@TimerMinutes",  model.TimerMinutes)
            };

            int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 19
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(XBWN.Model.xbwn_UserBank model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update dbo.[xbwn_UserBank] set ");

            strSql.Append(" Flag = @Flag , ");
            strSql.Append(" IsDeleted = @IsDeleted , ");
            strSql.Append(" CreateId = @CreateId , ");
            strSql.Append(" CreateDate = @CreateDate , ");
            strSql.Append(" EditId = @EditId , ");
            strSql.Append(" EditDate = @EditDate , ");
            strSql.Append(" NetLoanApplyId = @NetLoanApplyId , ");
            strSql.Append(" No = @No , ");
            strSql.Append(" RealName = @RealName , ");
            strSql.Append(" IdNo = @IdNo , ");
            strSql.Append(" BankCardNo = @BankCardNo , ");
            strSql.Append(" TelNo = @TelNo , ");
            strSql.Append(" Cash = @Cash , ");
            strSql.Append(" SmsCode = @SmsCode  ");
            strSql.Append(" where UserBankId=@UserBankId ");

            SqlParameter[] parameters =
            {
                new SqlParameter("@UserBankId",     model.UserBankId),
                new SqlParameter("@Flag",           model.Flag),
                new SqlParameter("@IsDeleted",      model.IsDeleted),
                new SqlParameter("@CreateId",       model.CreateId),
                new SqlParameter("@CreateDate",     model.CreateDate),
                new SqlParameter("@EditId",         model.EditId),
                new SqlParameter("@EditDate",       model.EditDate),
                new SqlParameter("@NetLoanApplyId", model.NetLoanApplyId),
                new SqlParameter("@No",             model.No),
                new SqlParameter("@RealName",       model.RealName),
                new SqlParameter("@IdNo",           model.IdNo),
                new SqlParameter("@BankCardNo",     model.BankCardNo),
                new SqlParameter("@TelNo",          model.TelNo),
                new SqlParameter("@Cash",           model.Cash),
                new SqlParameter("@SmsCode",        model.SmsCode)
            };

            int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 20
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(BWJS.Model.UserBank model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update dbo.[UserBank] set ");

            strSql.Append(" Remark = @Remark , ");
            strSql.Append(" CreateId = @CreateId , ");
            strSql.Append(" CreateDate = @CreateDate , ");
            strSql.Append(" EditId = @EditId , ");
            strSql.Append(" EditDate = @EditDate , ");
            strSql.Append(" IsDeleted = @IsDeleted , ");
            strSql.Append(" UserId = @UserId , ");
            strSql.Append(" BankCode = @BankCode , ");
            strSql.Append(" OpeningBank = @OpeningBank , ");
            strSql.Append(" CardHolder = @CardHolder , ");
            strSql.Append(" CardNumber = @CardNumber , ");
            strSql.Append(" BankAddress = @BankAddress , ");
            strSql.Append(" AlipayAccount = @AlipayAccount , ");
            strSql.Append(" IsDefault = @IsDefault  ");
            strSql.Append(" where UserBankId=@UserBankId ");

            SqlParameter[] parameters =
            {
                new SqlParameter("@UserBankId",    model.UserBankId),
                new SqlParameter("@Remark",        model.Remark),
                new SqlParameter("@CreateId",      model.CreateId),
                new SqlParameter("@CreateDate",    model.CreateDate),
                new SqlParameter("@EditId",        model.EditId),
                new SqlParameter("@EditDate",      model.EditDate),
                new SqlParameter("@IsDeleted",     model.IsDeleted),
                new SqlParameter("@UserId",        model.UserId),
                new SqlParameter("@BankCode",      model.BankCode),
                new SqlParameter("@OpeningBank",   model.OpeningBank),
                new SqlParameter("@CardHolder",    model.CardHolder),
                new SqlParameter("@CardNumber",    model.CardNumber),
                new SqlParameter("@BankAddress",   model.BankAddress),
                new SqlParameter("@AlipayAccount", model.AlipayAccount),
                new SqlParameter("@IsDefault",     model.IsDefault)
            };

            int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 21
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(BWJS.Model.OrderPayApply model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update OrderPayApply set ");

            strSql.Append(" PayJson = @PayJson , ");
            strSql.Append(" CreateDate = @CreateDate , ");
            strSql.Append(" PayDate = @PayDate , ");
            strSql.Append(" Remark = @Remark , ");
            strSql.Append(" IsDeleted = @IsDeleted , ");
            strSql.Append(" OrderRebateId = @OrderRebateId , ");
            strSql.Append(" OrderMoney = @OrderMoney , ");
            strSql.Append(" PayOrderNumber = @PayOrderNumber , ");
            strSql.Append(" PayStatus = @PayStatus , ");
            strSql.Append(" PayPlatform = @PayPlatform , ");
            strSql.Append(" PayMethod = @PayMethod , ");
            strSql.Append(" PayCode = @PayCode , ");
            strSql.Append(" PayText = @PayText  ");
            strSql.Append(" where OrderPayApplyId=@OrderPayApplyId ");

            SqlParameter[] parameters =
            {
                new SqlParameter("@OrderPayApplyId", model.OrderPayApplyId),
                new SqlParameter("@PayJson",         model.PayJson),
                new SqlParameter("@CreateDate",      model.CreateDate),
                new SqlParameter("@PayDate",         model.PayDate),
                new SqlParameter("@Remark",          model.Remark),
                new SqlParameter("@IsDeleted",       model.IsDeleted),
                new SqlParameter("@OrderRebateId",   model.OrderRebateId),
                new SqlParameter("@OrderMoney",      model.OrderMoney),
                new SqlParameter("@PayOrderNumber",  model.PayOrderNumber),
                new SqlParameter("@PayStatus",       model.PayStatus),
                new SqlParameter("@PayPlatform",     model.PayPlatform),
                new SqlParameter("@PayMethod",       model.PayMethod),
                new SqlParameter("@PayCode",         model.PayCode),
                new SqlParameter("@PayText",         model.PayText)
            };

            int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 22
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(XBWN.Model.xbwn_Task model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update dbo.[xbwn_Task] set ");

            strSql.Append(" IsDeleted = @IsDeleted , ");
            strSql.Append(" CreateId = @CreateId , ");
            strSql.Append(" CreateDate = @CreateDate , ");
            strSql.Append(" EditId = @EditId , ");
            strSql.Append(" EditDate = @EditDate , ");
            strSql.Append(" NetLoanApplyId = @NetLoanApplyId , ");
            strSql.Append(" TelNo = @TelNo , ");
            strSql.Append(" ServicePwd = @ServicePwd , ");
            strSql.Append(" TaskId = @TaskId , ");
            strSql.Append(" State = @State , ");
            strSql.Append(" TaskStatus = @TaskStatus , ");
            strSql.Append(" ImgStr = @ImgStr , ");
            strSql.Append(" Mark = @Mark  ");
            strSql.Append(" where AutoId=@AutoId ");

            SqlParameter[] parameters =
            {
                new SqlParameter("@AutoId",         model.AutoId),
                new SqlParameter("@IsDeleted",      model.IsDeleted),
                new SqlParameter("@CreateId",       model.CreateId),
                new SqlParameter("@CreateDate",     model.CreateDate),
                new SqlParameter("@EditId",         model.EditId),
                new SqlParameter("@EditDate",       model.EditDate),
                new SqlParameter("@NetLoanApplyId", model.NetLoanApplyId),
                new SqlParameter("@TelNo",          model.TelNo),
                new SqlParameter("@ServicePwd",     model.ServicePwd),
                new SqlParameter("@TaskId",         model.TaskId),
                new SqlParameter("@State",          model.State),
                new SqlParameter("@TaskStatus",     model.TaskStatus),
                new SqlParameter("@ImgStr",         model.ImgStr),
                new SqlParameter("@Mark",           model.Mark)
            };

            int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 23
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(BWJS.Model.CompanyNetLoan model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update dbo.[CompanyNetLoan] set ");

            strSql.Append(" CompanyId = @CompanyId , ");
            strSql.Append(" IsDeleted = @IsDeleted , ");
            strSql.Append(" CreateId = @CreateId , ");
            strSql.Append(" CreateDate = @CreateDate , ");
            strSql.Append(" EditId = @EditId , ");
            strSql.Append(" EditDate = @EditDate , ");
            strSql.Append(" HighestLoan = @HighestLoan , ");
            strSql.Append(" IsHaveGuarantee = @IsHaveGuarantee , ");
            strSql.Append(" IsMortgage = @IsMortgage , ");
            strSql.Append(" MaxMonthlyInterest = @MaxMonthlyInterest , ");
            strSql.Append(" LoanPrescription = @LoanPrescription , ");
            strSql.Append(" DescriptionHtml = @DescriptionHtml , ");
            strSql.Append(" Remark = @Remark  ");
            strSql.Append(" where CompanyId=@CompanyId  ");

            SqlParameter[] parameters =
            {
                new SqlParameter("@CompanyId",          model.CompanyId),
                new SqlParameter("@IsDeleted",          model.IsDeleted),
                new SqlParameter("@CreateId",           model.CreateId),
                new SqlParameter("@CreateDate",         model.CreateDate),
                new SqlParameter("@EditId",             model.EditId),
                new SqlParameter("@EditDate",           model.EditDate),
                new SqlParameter("@HighestLoan",        model.HighestLoan),
                new SqlParameter("@IsHaveGuarantee",    model.IsHaveGuarantee),
                new SqlParameter("@IsMortgage",         model.IsMortgage),
                new SqlParameter("@MaxMonthlyInterest", model.MaxMonthlyInterest),
                new SqlParameter("@LoanPrescription",   model.LoanPrescription),
                new SqlParameter("@DescriptionHtml",    model.DescriptionHtml),
                new SqlParameter("@Remark",             model.Remark)
            };

            int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 24
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(BWJS.Model.NL_ProfessionInfo model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update dbo.[NL_ProfessionInfo] set ");

            strSql.Append(" ConsultId=@ConsultId , ");
            strSql.Append(" FullName=@FullName , ");
            strSql.Append(" Age=@Age , ");
            strSql.Append(" MonthlyIncome=@MonthlyIncome , ");
            strSql.Append(" Company=@Company , ");
            strSql.Append(" UnitNature=@UnitNature , ");
            strSql.Append(" WorkingHour=@WorkingHour , ");
            strSql.Append(" Payroll=@Payroll , ");
            strSql.Append(" JobPosition=@JobPosition , ");
            strSql.Append(" SocialSecurit=@SocialSecurit , ");
            strSql.Append(" Fund=@Fund , ");
            strSql.Append(" Degree=@Degree , ");
            strSql.Append(" GraduationYear=@GraduationYear  ");
            strSql.Append(" where ConsultId=@ConsultId  ");

            SqlParameter[] parameters =
            {
                new SqlParameter("@ConsultId",      model.ConsultId),
                new SqlParameter("@FullName",       model.FullName),
                new SqlParameter("@Age",            model.Age),
                new SqlParameter("@MonthlyIncome",  model.MonthlyIncome),
                new SqlParameter("@Company",        model.Company),
                new SqlParameter("@UnitNature",     model.UnitNature),
                new SqlParameter("@WorkingHour",    model.WorkingHour),
                new SqlParameter("@Payroll",        model.Payroll),
                new SqlParameter("@JobPosition",    model.JobPosition),
                new SqlParameter("@SocialSecurit",  model.SocialSecurit),
                new SqlParameter("@Fund",           model.Fund),
                new SqlParameter("@Degree",         model.Degree),
                new SqlParameter("@GraduationYear", model.GraduationYear)
            };

            int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 25
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(BWJS.Model.Function model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update [Function] set ");
            strSql.Append(" Status = @Status , ");
            strSql.Append(" OrderId = @OrderId , ");
            strSql.Append(" EditId = @EditId , ");
            strSql.Append(" EditDate = @EditDate , ");
            strSql.Append(" IsDeleted = @IsDeleted , ");
            strSql.Append(" Remark = @Remark , ");
            strSql.Append(" FunctionName = @FunctionName , ");
            strSql.Append(" FunctionCode = @FunctionCode , ");
            strSql.Append(" FunctionIcon = @FunctionIcon , ");
            strSql.Append(" FunctionClass = @FunctionClass , ");
            strSql.Append(" ClassId = @ClassId , ");
            strSql.Append(" ParentId = @ParentId , ");
            strSql.Append(" ExternalLinkAddress = @ExternalLinkAddress , ");
            strSql.Append(" FunctionDir = @FunctionDir  ");
            strSql.Append(" where FunctionId=@FunctionId ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@FunctionId",          model.FunctionId),
                new SqlParameter("@Status",              model.Status),
                new SqlParameter("@OrderId",             model.OrderId),
                new SqlParameter("@EditId",              model.EditId),
                new SqlParameter("@EditDate",            model.EditDate),
                new SqlParameter("@IsDeleted",           model.IsDeleted),
                new SqlParameter("@Remark",              model.Remark),
                new SqlParameter("@FunctionName",        model.FunctionName),
                new SqlParameter("@FunctionCode",        model.FunctionCode),
                new SqlParameter("@FunctionIcon",        model.FunctionIcon),
                new SqlParameter("@FunctionClass",       model.FunctionClass),
                new SqlParameter("@ClassId",             model.ClassId),
                new SqlParameter("@ParentId",            model.ParentId),
                new SqlParameter("@ExternalLinkAddress", model.ExternalLinkAddress),
                new SqlParameter("@FunctionDir",         model.FunctionDir)
            };
            int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 26
0
        /// <summary>
        /// 批量删除一批数据
        /// </summary>
        public bool DeleteList(string ConsultIdlist, int userId)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.AppendFormat("update dbo.[NL_Consult] set IsDeleted=1,EditId={0},EditDate='{1}'", userId, DateTime.Now);
            strSql.Append(" where ConsultId in (" + ConsultIdlist + ")  ");
            int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString());

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 27
0
        /// <summary>
        /// 批量删除一批数据
        /// </summary>
        public bool DeleteList(string consultIds)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.AppendFormat("update dbo.[NL_Contacts] set IsDeleted=1,EditDate='{0}'", DateTime.Now);
            strSql.Append(" where ConsultId in (" + consultIds + ")  ");
            int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString());

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 28
0
        /// <summary>
        /// 批量删除一批数据
        /// </summary>
        public bool DeleteList(string UserIDlist)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update Users set RecordIsDelete=1");
            strSql.Append(" where ID in (" + UserIDlist + ")  ");
            int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString());

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 29
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(BWJS.Model.Region model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update Region set ");

            strSql.Append(" EditDate = @EditDate , ");
            strSql.Append(" IsDeleted = @IsDeleted , ");
            strSql.Append(" Remark = @Remark , ");
            strSql.Append(" ReginName = @ReginName , ");
            strSql.Append(" ReginCode = @ReginCode , ");
            strSql.Append(" ParentId = @ParentId , ");
            strSql.Append(" RegionDir = @RegionDir , ");
            strSql.Append(" RegionStatus = @RegionStatus , ");
            strSql.Append(" CreateId = @CreateId , ");
            strSql.Append(" CreateDate = @CreateDate , ");
            strSql.Append(" EditId = @EditId  ");
            strSql.Append(" where RegionId=@RegionId ");

            SqlParameter[] parameters =
            {
                new SqlParameter("@RegionId",     model.RegionId),
                new SqlParameter("@EditDate",     model.EditDate),
                new SqlParameter("@IsDeleted",    model.IsDeleted),
                new SqlParameter("@Remark",       model.Remark),
                new SqlParameter("@ReginName",    model.ReginName),
                new SqlParameter("@ReginCode",    model.ReginCode),
                new SqlParameter("@ParentId",     model.ParentId),
                new SqlParameter("@RegionDir",    model.RegionDir),
                new SqlParameter("@RegionStatus", model.RegionStatus),
                new SqlParameter("@CreateId",     model.CreateId),
                new SqlParameter("@CreateDate",   model.CreateDate),
                new SqlParameter("@EditId",       model.EditId)
            };

            int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 30
0
        /// <summary>
        /// 批量删除一批数据
        /// </summary>
        public bool DeleteList(string RegionIdlist)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update Region set IsDeleted=1");
            strSql.Append(" where ID in (" + RegionIdlist + ")  ");
            int rows = BWJSHelperSQL.ExecuteSql(strSql.ToString());

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }