コード例 #1
0
ファイル: tb_type.cs プロジェクト: uwitec/Wms-7
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Model.tb_type model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update tb_type set ");
            if (model.t_paid != null)
            {
                strSql.Append("t_paid=" + model.t_paid + ",");
            }
            else
            {
                strSql.Append("t_paid= null ,");
            }
            if (model.t_no != null)
            {
                strSql.Append("t_no='" + model.t_no + "',");
            }
            else
            {
                strSql.Append("t_no= null ,");
            }
            if (model.t_name != null)
            {
                strSql.Append("t_name='" + model.t_name + "',");
            }
            if (model.t_desc != null)
            {
                strSql.Append("t_desc='" + model.t_desc + "',");
            }
            else
            {
                strSql.Append("t_desc= null ,");
            }
            int n = strSql.ToString().LastIndexOf(",");

            strSql.Remove(n, 1);
            strSql.Append(" where t_id=" + model.t_id + "");
            int rowsAffected = DbSQL.ExecuteSql(strSql.ToString());

            if (rowsAffected > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #2
0
ファイル: tb_order.cs プロジェクト: uwitec/Wms-7
        }               /// <summary>

        /// 批量删除数据
        /// </summary>
        public bool DeleteList(string o_idlist)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("delete from tb_order ");
            strSql.Append(" where o_id in (" + o_idlist + ")  ");
            int rows = DbSQL.ExecuteSql(strSql.ToString());

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #3
0
ファイル: tb_order.cs プロジェクト: uwitec/Wms-7
        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int o_id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("delete from tb_order ");
            strSql.Append(" where o_id=" + o_id + "");
            int rowsAffected = DbSQL.ExecuteSql(strSql.ToString());

            if (rowsAffected > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }               /// <summary>
コード例 #4
0
ファイル: tb_order.cs プロジェクト: uwitec/Wms-7
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Model.tb_order model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update tb_order set ");
            if (model.o_no != null)
            {
                strSql.Append("o_no='" + model.o_no + "',");
            }
            else
            {
                strSql.Append("o_no= null ,");
            }
            if (model.o_type != null)
            {
                strSql.Append("o_type=" + model.o_type + ",");
            }
            else
            {
                strSql.Append("o_type= null ,");
            }
            if (model.o_time != null)
            {
                strSql.Append("o_time='" + model.o_time + "',");
            }
            else
            {
                strSql.Append("o_time= null ,");
            }
            if (model.o_busy != null)
            {
                strSql.Append("o_busy=" + model.o_busy + ",");
            }
            else
            {
                strSql.Append("o_busy= null ,");
            }
            if (model.o_sum != null)
            {
                strSql.Append("o_sum='" + model.o_sum + "',");
            }
            else
            {
                strSql.Append("o_sum= null ,");
            }
            if (model.o_user != null)
            {
                strSql.Append("o_user='******',");
            }
            else
            {
                strSql.Append("o_user= null ,");
            }
            if (model.o_desc != null)
            {
                strSql.Append("o_desc='" + model.o_desc + "',");
            }
            else
            {
                strSql.Append("o_desc= null ,");
            }

            if (model.o_num != null)
            {
                strSql.Append("o_num=" + model.o_num + ",");
            }
            else
            {
                strSql.Append("o_num= null ,");
            }
            if (model.o_pid != null)
            {
                strSql.Append("o_pid=" + model.o_pid + ",");
            }
            else
            {
                strSql.Append("o_pid= null ,");
            }
            int n = strSql.ToString().LastIndexOf(",");

            strSql.Remove(n, 1);
            strSql.Append(" where o_id=" + model.o_id + "");
            int rowsAffected = DbSQL.ExecuteSql(strSql.ToString());

            if (rowsAffected > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #5
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Model.tb_kehu model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update tb_kehu set ");
            if (model.h_no != null)
            {
                strSql.Append("h_no='" + model.h_no + "',");
            }
            else
            {
                strSql.Append("h_no= null ,");
            }
            if (model.h_name != null)
            {
                strSql.Append("h_name='" + model.h_name + "',");
            }
            else
            {
                strSql.Append("h_name= null ,");
            }
            if (model.h_tel != null)
            {
                strSql.Append("h_tel='" + model.h_tel + "',");
            }
            else
            {
                strSql.Append("h_tel= null ,");
            }
            if (model.h_address != null)
            {
                strSql.Append("h_address='" + model.h_address + "',");
            }
            else
            {
                strSql.Append("h_address= null ,");
            }
            if (model.h_zipcode != null)
            {
                strSql.Append("h_zipcode='" + model.h_zipcode + "',");
            }
            else
            {
                strSql.Append("h_zipcode= null ,");
            }
            if (model.h_uname != null)
            {
                strSql.Append("h_uname='" + model.h_uname + "',");
            }
            else
            {
                strSql.Append("h_uname= null ,");
            }
            if (model.h_remark != null)
            {
                strSql.Append("h_remark='" + model.h_remark + "',");
            }
            else
            {
                strSql.Append("h_remark= null ,");
            }
            int n = strSql.ToString().LastIndexOf(",");

            strSql.Remove(n, 1);
            strSql.Append(" where h_id=" + model.h_id + "");
            int rowsAffected = DbSQL.ExecuteSql(strSql.ToString());

            if (rowsAffected > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #6
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Model.tb_churu model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update tb_churu set ");
            if (model.cr_oid != null)
            {
                strSql.Append("cr_oid=" + model.cr_oid + ",");
            }
            else
            {
                strSql.Append("cr_oid= null ,");
            }
            if (model.cr_pid != null)
            {
                strSql.Append("cr_pid=" + model.cr_pid + ",");
            }
            else
            {
                strSql.Append("cr_pid= null ,");
            }
            if (model.cr_time != null)
            {
                strSql.Append("cr_time='" + model.cr_time + "',");
            }
            else
            {
                strSql.Append("cr_time= null ,");
            }
            if (model.cr_type != null)
            {
                strSql.Append("cr_type=" + model.cr_type + ",");
            }
            else
            {
                strSql.Append("cr_type= null ,");
            }
            if (model.cr_num != null)
            {
                strSql.Append("cr_num=" + model.cr_num + ",");
            }
            else
            {
                strSql.Append("cr_num= null ,");
            }
            if (model.cr_yan != null)
            {
                strSql.Append("cr_yan=" + model.cr_yan + ",");
            }
            else
            {
                strSql.Append("cr_yan= null ,");
            }
            if (model.cr_price != null)
            {
                strSql.Append("cr_price=" + model.cr_price + ",");
            }
            else
            {
                strSql.Append("cr_price= null ,");
            }
            if (model.cr_remark != null)
            {
                strSql.Append("cr_remark='" + model.cr_remark + "',");
            }
            else
            {
                strSql.Append("cr_remark= null ,");
            }
            int n = strSql.ToString().LastIndexOf(",");

            strSql.Remove(n, 1);
            strSql.Append(" where cr_id=" + model.cr_id + "");
            int rowsAffected = DbSQL.ExecuteSql(strSql.ToString());

            if (rowsAffected > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #7
0
ファイル: tb_pan.cs プロジェクト: uwitec/Wms-7
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Model.tb_pan model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update tb_pan set ");
            if (model.p_pid != null)
            {
                strSql.Append("p_pid=" + model.p_pid + ",");
            }
            else
            {
                strSql.Append("p_pid= null ,");
            }
            if (model.p_time != null)
            {
                strSql.Append("p_time='" + model.p_time + "',");
            }
            else
            {
                strSql.Append("p_time= null ,");
            }
            if (model.p_user != null)
            {
                strSql.Append("p_user='******',");
            }
            else
            {
                strSql.Append("p_user= null ,");
            }
            if (model.p_numold != null)
            {
                strSql.Append("p_numold=" + model.p_numold + ",");
            }
            else
            {
                strSql.Append("p_numold= null ,");
            }
            if (model.p_numnow != null)
            {
                strSql.Append("p_numnow=" + model.p_numnow + ",");
            }
            else
            {
                strSql.Append("p_numnow= null ,");
            }
            if (model.p_remark != null)
            {
                strSql.Append("p_remark='" + model.p_remark + "',");
            }
            else
            {
                strSql.Append("p_remark= null ,");
            }
            int n = strSql.ToString().LastIndexOf(",");

            strSql.Remove(n, 1);
            strSql.Append(" where p_id=" + model.p_id + "");
            int rowsAffected = DbSQL.ExecuteSql(strSql.ToString());

            if (rowsAffected > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #8
0
ファイル: tb_user.cs プロジェクト: uwitec/Wms-7
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Model.tb_user model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update tb_user set ");
            if (model.u_log != null)
            {
                strSql.Append("u_log='" + model.u_log + "',");
            }
            else
            {
                strSql.Append("u_log= null ,");
            }
            if (model.u_pwd != null)
            {
                strSql.Append("u_pwd='" + model.u_pwd + "',");
            }
            else
            {
                strSql.Append("u_pwd= null ,");
            }
            if (model.u_no != null)
            {
                strSql.Append("u_no='" + model.u_no + "',");
            }
            else
            {
                strSql.Append("u_no= null ,");
            }
            if (model.u_name != null)
            {
                strSql.Append("u_name='" + model.u_name + "',");
            }
            else
            {
                strSql.Append("u_name= null ,");
            }
            if (model.u_tel != null)
            {
                strSql.Append("u_tel='" + model.u_tel + "',");
            }
            else
            {
                strSql.Append("u_tel= null ,");
            }
            if (model.u_email != null)
            {
                strSql.Append("u_email='" + model.u_email + "',");
            }
            else
            {
                strSql.Append("u_email= null ,");
            }
            if (model.u_type != null)
            {
                strSql.Append("u_type=" + model.u_type + ",");
            }
            else
            {
                strSql.Append("u_type= null ,");
            }
            if (model.u_sex != null)
            {
                strSql.Append("u_sex='" + model.u_sex + "',");
            }
            else
            {
                strSql.Append("u_sex= null ,");
            }
            if (model.u_address != null)
            {
                strSql.Append("u_address='" + model.u_address + "',");
            }
            else
            {
                strSql.Append("u_address= null ,");
            }
            if (model.u_adddate != null)
            {
                strSql.Append("u_adddate='" + model.u_adddate + "',");
            }
            else
            {
                strSql.Append("u_adddate= null ,");
            }
            int n = strSql.ToString().LastIndexOf(",");

            strSql.Remove(n, 1);
            strSql.Append(" where u_id=" + model.u_id + "");
            int rowsAffected = DbSQL.ExecuteSql(strSql.ToString());

            if (rowsAffected > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #9
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Model.tb_proc model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update tb_proc set ");
            if (model.p_no != null)
            {
                strSql.Append("p_no='" + model.p_no + "',");
            }
            else
            {
                strSql.Append("p_no= null ,");
            }
            if (model.p_name != null)
            {
                strSql.Append("p_name='" + model.p_name + "',");
            }
            else
            {
                strSql.Append("p_name= null ,");
            }
            if (model.p_tyid != null)
            {
                strSql.Append("p_tyid=" + model.p_tyid + ",");
            }
            else
            {
                strSql.Append("p_tyid= null ,");
            }
            if (model.p_pinpai != null)
            {
                strSql.Append("p_pinpai='" + model.p_pinpai + "',");
            }
            else
            {
                strSql.Append("p_pinpai= null ,");
            }
            if (model.p_model != null)
            {
                strSql.Append("p_model='" + model.p_model + "',");
            }
            else
            {
                strSql.Append("p_model= null ,");
            }
            if (model.p_shang != null)
            {
                strSql.Append("p_shang='" + model.p_shang + "',");
            }
            else
            {
                strSql.Append("p_shang= null ,");
            }
            if (model.p_price != null)
            {
                strSql.Append("p_price='" + model.p_price + "',");
            }
            else
            {
                strSql.Append("p_price= null ,");
            }
            if (model.p_unit != null)
            {
                strSql.Append("p_unit='" + model.p_unit + "',");
            }
            else
            {
                strSql.Append("p_unit= null ,");
            }
            if (model.p_sx != null)
            {
                strSql.Append("p_sx='" + model.p_sx + "',");
            }
            else
            {
                strSql.Append("p_sx= null ,");
            }
            if (model.p_xx != null)
            {
                strSql.Append("p_xx='" + model.p_xx + "',");
            }
            else
            {
                strSql.Append("p_xx= null ,");
            }
            if (model.p_desc != null)
            {
                strSql.Append("p_desc='" + model.p_desc + "',");
            }
            else
            {
                strSql.Append("p_desc= null ,");
            }
            if (model.p_addtime != null)
            {
                strSql.Append("p_addtime='" + model.p_addtime + "',");
            }
            else
            {
                strSql.Append("p_addtime= null ,");
            }
            if (model.p_ckid != null)
            {
                strSql.Append("p_ckid=" + model.p_ckid + ",");
            }
            else
            {
                strSql.Append("p_ckid= null ,");
            }
            if (model.p_kqid != null)
            {
                strSql.Append("p_kqid=" + model.p_kqid + ",");
            }
            else
            {
                strSql.Append("p_kqid= null ,");
            }
            if (model.p_num != null)
            {
                strSql.Append("p_num=" + model.p_num + ",");
            }
            else
            {
                strSql.Append("p_num= null ,");
            }
            if (model.p_rzfid != null)
            {
                strSql.Append("p_rzfid=" + model.p_rzfid + ",");
            }
            else
            {
                strSql.Append("p_rzfid= null ,");
            }
            int n = strSql.ToString().LastIndexOf(",");

            strSql.Remove(n, 1);
            strSql.Append(" where p_id=" + model.p_id + "");
            int rowsAffected = DbSQL.ExecuteSql(strSql.ToString());

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