예제 #1
0
파일: tb_order.cs 프로젝트: uwitec/Wms-7
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Model.tb_order GetModel(int o_id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1  ");
            strSql.Append(" o_id,o_no,o_type,o_time,o_busy,o_sum,o_user,o_desc,o_num,o_pid ");
            strSql.Append(" from tb_order ");
            strSql.Append(" where o_id=" + o_id + "");
            Model.tb_order model = new Model.tb_order();
            DataSet        ds    = DbSQL.Query(strSql.ToString());

            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["o_id"] != null && ds.Tables[0].Rows[0]["o_id"].ToString() != "")
                {
                    model.o_id = int.Parse(ds.Tables[0].Rows[0]["o_id"].ToString());
                }
                if (ds.Tables[0].Rows[0]["o_no"] != null && ds.Tables[0].Rows[0]["o_no"].ToString() != "")
                {
                    model.o_no = ds.Tables[0].Rows[0]["o_no"].ToString();
                }
                if (ds.Tables[0].Rows[0]["o_type"] != null && ds.Tables[0].Rows[0]["o_type"].ToString() != "")
                {
                    model.o_type = int.Parse(ds.Tables[0].Rows[0]["o_type"].ToString());
                }
                if (ds.Tables[0].Rows[0]["o_time"] != null && ds.Tables[0].Rows[0]["o_time"].ToString() != "")
                {
                    model.o_time = ds.Tables[0].Rows[0]["o_time"].ToString();
                }
                if (ds.Tables[0].Rows[0]["o_busy"] != null && ds.Tables[0].Rows[0]["o_busy"].ToString() != "")
                {
                    model.o_busy = int.Parse(ds.Tables[0].Rows[0]["o_busy"].ToString());
                }
                if (ds.Tables[0].Rows[0]["o_sum"] != null && ds.Tables[0].Rows[0]["o_sum"].ToString() != "")
                {
                    model.o_sum = ds.Tables[0].Rows[0]["o_sum"].ToString();
                }
                if (ds.Tables[0].Rows[0]["o_user"] != null && ds.Tables[0].Rows[0]["o_user"].ToString() != "")
                {
                    model.o_user = ds.Tables[0].Rows[0]["o_user"].ToString();
                }
                if (ds.Tables[0].Rows[0]["o_desc"] != null && ds.Tables[0].Rows[0]["o_desc"].ToString() != "")
                {
                    model.o_desc = ds.Tables[0].Rows[0]["o_desc"].ToString();
                }
                if (ds.Tables[0].Rows[0]["o_num"] != null && ds.Tables[0].Rows[0]["o_num"].ToString() != "")
                {
                    model.o_num = int.Parse(ds.Tables[0].Rows[0]["o_num"].ToString());
                }
                if (ds.Tables[0].Rows[0]["o_pid"] != null && ds.Tables[0].Rows[0]["o_pid"].ToString() != "")
                {
                    model.o_pid = int.Parse(ds.Tables[0].Rows[0]["o_pid"].ToString());
                }
                return(model);
            }
            else
            {
                return(null);
            }
        }
예제 #2
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Model.tb_churu GetModel(int cr_id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1  ");
            strSql.Append(" cr_id,cr_oid,cr_pid,cr_time,cr_type,cr_num,cr_yan,cr_price,cr_remark ");
            strSql.Append(" from tb_churu ");
            strSql.Append(" where cr_id=" + cr_id + "");
            Model.tb_churu model = new Model.tb_churu();
            DataSet        ds    = DbSQL.Query(strSql.ToString());

            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["cr_id"] != null && ds.Tables[0].Rows[0]["cr_id"].ToString() != "")
                {
                    model.cr_id = int.Parse(ds.Tables[0].Rows[0]["cr_id"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cr_oid"] != null && ds.Tables[0].Rows[0]["cr_oid"].ToString() != "")
                {
                    model.cr_oid = int.Parse(ds.Tables[0].Rows[0]["cr_oid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cr_pid"] != null && ds.Tables[0].Rows[0]["cr_pid"].ToString() != "")
                {
                    model.cr_pid = int.Parse(ds.Tables[0].Rows[0]["cr_pid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cr_time"] != null && ds.Tables[0].Rows[0]["cr_time"].ToString() != "")
                {
                    model.cr_time = ds.Tables[0].Rows[0]["cr_time"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cr_type"] != null && ds.Tables[0].Rows[0]["cr_type"].ToString() != "")
                {
                    model.cr_type = int.Parse(ds.Tables[0].Rows[0]["cr_type"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cr_num"] != null && ds.Tables[0].Rows[0]["cr_num"].ToString() != "")
                {
                    model.cr_num = int.Parse(ds.Tables[0].Rows[0]["cr_num"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cr_yan"] != null && ds.Tables[0].Rows[0]["cr_yan"].ToString() != "")
                {
                    model.cr_yan = int.Parse(ds.Tables[0].Rows[0]["cr_yan"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cr_price"] != null && ds.Tables[0].Rows[0]["cr_price"].ToString() != "")
                {
                    model.cr_price = decimal.Parse(ds.Tables[0].Rows[0]["cr_price"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cr_remark"] != null && ds.Tables[0].Rows[0]["cr_remark"].ToString() != "")
                {
                    model.cr_remark = ds.Tables[0].Rows[0]["cr_remark"].ToString();
                }
                return(model);
            }
            else
            {
                return(null);
            }
        }
예제 #3
0
파일: tb_type.cs 프로젝트: uwitec/Wms-7
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select t_id,t_paid,t_no,t_name,t_desc ");
            strSql.Append(" FROM tb_type ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            return(DbSQL.Query(strSql.ToString()));
        }
예제 #4
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select r_id,r_no,r_name,r_uname,r_utel,r_address,r_desc ");
            strSql.Append(" FROM tb_ruzhu ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            return(DbSQL.Query(strSql.ToString()));
        }
예제 #5
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select cr_id,o_no,p_no,p_name,cr_num,cr_time,cr_price,r_name,te.k_name,tf.k_name,cr_remark,cr_type,cr_yan,cr_oid,cr_pid ");
            strSql.Append(" FROM tb_churu ta inner join tb_order tb on ta.cr_oid=tb.o_id inner join tb_proc tc on ta.cr_pid=tc.p_id inner join tb_ruzhu td on tb.o_busy=td.r_id inner join tb_ku te on tc.p_ckid=te.k_id inner join tb_ku tf on tc.p_kqid=tf.k_id ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            return(DbSQL.Query(strSql.ToString()));
        }
예제 #6
0
파일: tb_ku.cs 프로젝트: uwitec/Wms-7
        public DataSet GetListT(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select ta.k_id,tb.k_name,ta.k_no,ta.k_name,ta.k_desc,ta.k_paid ");
            strSql.Append(" FROM tb_ku ta inner join tb_ku tb on ta.k_paid=tb.k_id ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            return(DbSQL.Query(strSql.ToString()));
        }
예제 #7
0
        public DataSet GetListC(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select cr_id,o_no,p_no,p_name,cr_num,cr_time,cr_price,h_name,h_tel,h_address,cr_remark,cr_type,cr_yan,cr_oid,cr_pid ");
            strSql.Append(" FROM tb_churu ta inner join tb_order tb on ta.cr_oid=tb.o_id inner join tb_proc tc on ta.cr_pid=tc.p_id inner join tb_kehu td on tb.o_busy=td.h_id ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            return(DbSQL.Query(strSql.ToString()));
        }
예제 #8
0
파일: tb_user.cs 프로젝트: uwitec/Wms-7
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select u_id,u_pwd,u_name,u_tel,u_log,u_email,u_adddate,u_type,u_sex,u_address,u_no ");
            strSql.Append(" FROM tb_user ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            return(DbSQL.Query(strSql.ToString()));
        }
예제 #9
0
파일: tb_order.cs 프로젝트: uwitec/Wms-7
        public DataSet GetListR(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select o_id,o_no,o_time,tp.p_no,tp.p_name,o_num,o_sum,r_name,r_utel,r_address,r_uname,o_user,o_desc,o_busy,o_type ");
            strSql.Append(" FROM tb_order ta inner join tb_ruzhu tb on ta.o_busy=tb.r_id  inner join tb_proc tp on ta.o_pid=tp.p_id ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            return(DbSQL.Query(strSql.ToString()));
        }
예제 #10
0
        public DataSet GetListB(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select cr_id,p_no,p_name,cr_num,cr_time,cr_remark");
            strSql.Append(" FROM tb_churu ta  inner join tb_proc tc on ta.cr_pid=tc.p_id ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            return(DbSQL.Query(strSql.ToString()));
        }
예제 #11
0
        public DataSet GetListT3(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select p_id,p_no,p_name,p_tyid,p_pinpai,p_model,p_shang,p_price,p_unit,p_sx,p_xx,p_desc,p_addtime,p_ckid,p_kqid,p_num,p_rzfid,tr.r_name ");
            strSql.Append(" FROM tb_proc tp inner join tb_ruzhu tr on tp.p_rzfid = tr.r_id ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            return(DbSQL.Query(strSql.ToString()));
        }
예제 #12
0
        public DataSet GetListT2(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select p_id,p_no,p_name,p_num,tb.t_name,p_pinpai,p_model,tc.k_name,td.k_name,p_shang,r_name ");
            strSql.Append(" FROM tb_proc ta inner join tb_type tb on ta.p_tyid=tb.t_id inner join tb_ku tc on ta.p_ckid=tc.k_id inner join tb_ku td on ta.p_kqid=td.k_id inner join tb_ruzhu te on ta.p_rzfid=te.r_id ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            return(DbSQL.Query(strSql.ToString()));
        }
예제 #13
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select h_id,h_no,h_name,h_uname,h_tel,h_address,h_zipcode,h_remark ");
            strSql.Append(" FROM tb_kehu ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            return(DbSQL.Query(strSql.ToString()));
        }
예제 #14
0
파일: tb_pan.cs 프로젝트: uwitec/Wms-7
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select ta.p_id,tb.p_no,tb.p_name,ta.p_time,ta.p_numold,ta.p_numnow,ta.p_user,ta.p_remark,ta.p_pid ");
            strSql.Append(" FROM tb_pan ta inner join tb_proc tb on ta.p_pid=tb.p_id ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            return(DbSQL.Query(strSql.ToString()));
        }
예제 #15
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Model.tb_kehu GetModel(int h_id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1  ");
            strSql.Append(" h_id,h_no,h_name,h_tel,h_address,h_zipcode,h_uname,h_remark ");
            strSql.Append(" from tb_kehu ");
            strSql.Append(" where h_id=" + h_id + "");
            Model.tb_kehu model = new Model.tb_kehu();
            DataSet       ds    = DbSQL.Query(strSql.ToString());

            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["h_id"] != null && ds.Tables[0].Rows[0]["h_id"].ToString() != "")
                {
                    model.h_id = int.Parse(ds.Tables[0].Rows[0]["h_id"].ToString());
                }
                if (ds.Tables[0].Rows[0]["h_no"] != null && ds.Tables[0].Rows[0]["h_no"].ToString() != "")
                {
                    model.h_no = ds.Tables[0].Rows[0]["h_no"].ToString();
                }
                if (ds.Tables[0].Rows[0]["h_name"] != null && ds.Tables[0].Rows[0]["h_name"].ToString() != "")
                {
                    model.h_name = ds.Tables[0].Rows[0]["h_name"].ToString();
                }
                if (ds.Tables[0].Rows[0]["h_tel"] != null && ds.Tables[0].Rows[0]["h_tel"].ToString() != "")
                {
                    model.h_tel = ds.Tables[0].Rows[0]["h_tel"].ToString();
                }
                if (ds.Tables[0].Rows[0]["h_address"] != null && ds.Tables[0].Rows[0]["h_address"].ToString() != "")
                {
                    model.h_address = ds.Tables[0].Rows[0]["h_address"].ToString();
                }
                if (ds.Tables[0].Rows[0]["h_zipcode"] != null && ds.Tables[0].Rows[0]["h_zipcode"].ToString() != "")
                {
                    model.h_zipcode = ds.Tables[0].Rows[0]["h_zipcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["h_uname"] != null && ds.Tables[0].Rows[0]["h_uname"].ToString() != "")
                {
                    model.h_uname = ds.Tables[0].Rows[0]["h_uname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["h_remark"] != null && ds.Tables[0].Rows[0]["h_remark"].ToString() != "")
                {
                    model.h_remark = ds.Tables[0].Rows[0]["h_remark"].ToString();
                }
                return(model);
            }
            else
            {
                return(null);
            }
        }
예제 #16
0
파일: tb_pan.cs 프로젝트: uwitec/Wms-7
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Model.tb_pan GetModel(int p_id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1  ");
            strSql.Append(" p_id,p_pid,p_time,p_user,p_numold,p_numnow,p_remark ");
            strSql.Append(" from tb_pan ");
            strSql.Append(" where p_id=" + p_id + "");
            Model.tb_pan model = new Model.tb_pan();
            DataSet      ds    = DbSQL.Query(strSql.ToString());

            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["p_id"] != null && ds.Tables[0].Rows[0]["p_id"].ToString() != "")
                {
                    model.p_id = int.Parse(ds.Tables[0].Rows[0]["p_id"].ToString());
                }
                if (ds.Tables[0].Rows[0]["p_pid"] != null && ds.Tables[0].Rows[0]["p_pid"].ToString() != "")
                {
                    model.p_pid = int.Parse(ds.Tables[0].Rows[0]["p_pid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["p_time"] != null && ds.Tables[0].Rows[0]["p_time"].ToString() != "")
                {
                    model.p_time = ds.Tables[0].Rows[0]["p_time"].ToString();
                }
                if (ds.Tables[0].Rows[0]["p_user"] != null && ds.Tables[0].Rows[0]["p_user"].ToString() != "")
                {
                    model.p_user = ds.Tables[0].Rows[0]["p_user"].ToString();
                }
                if (ds.Tables[0].Rows[0]["p_numold"] != null && ds.Tables[0].Rows[0]["p_numold"].ToString() != "")
                {
                    model.p_numold = decimal.Parse(ds.Tables[0].Rows[0]["p_numold"].ToString());
                }
                if (ds.Tables[0].Rows[0]["p_numnow"] != null && ds.Tables[0].Rows[0]["p_numnow"].ToString() != "")
                {
                    model.p_numnow = int.Parse(ds.Tables[0].Rows[0]["p_numnow"].ToString());
                }
                if (ds.Tables[0].Rows[0]["p_remark"] != null && ds.Tables[0].Rows[0]["p_remark"].ToString() != "")
                {
                    model.p_remark = ds.Tables[0].Rows[0]["p_remark"].ToString();
                }
                return(model);
            }
            else
            {
                return(null);
            }
        }
예제 #17
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Model.tb_ruzhu GetModel(int r_id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1  ");
            strSql.Append(" r_id,r_no,r_name,r_uname,r_utel,r_address,r_desc ");
            strSql.Append(" from tb_ruzhu ");
            strSql.Append(" where r_id=" + r_id + "");
            Model.tb_ruzhu model = new Model.tb_ruzhu();
            DataSet        ds    = DbSQL.Query(strSql.ToString());

            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["r_id"] != null && ds.Tables[0].Rows[0]["r_id"].ToString() != "")
                {
                    model.r_id = int.Parse(ds.Tables[0].Rows[0]["r_id"].ToString());
                }
                if (ds.Tables[0].Rows[0]["r_no"] != null && ds.Tables[0].Rows[0]["r_no"].ToString() != "")
                {
                    model.r_no = ds.Tables[0].Rows[0]["r_no"].ToString();
                }
                if (ds.Tables[0].Rows[0]["r_name"] != null && ds.Tables[0].Rows[0]["r_name"].ToString() != "")
                {
                    model.r_name = ds.Tables[0].Rows[0]["r_name"].ToString();
                }
                if (ds.Tables[0].Rows[0]["r_uname"] != null && ds.Tables[0].Rows[0]["r_uname"].ToString() != "")
                {
                    model.r_uname = ds.Tables[0].Rows[0]["r_uname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["r_utel"] != null && ds.Tables[0].Rows[0]["r_utel"].ToString() != "")
                {
                    model.r_utel = ds.Tables[0].Rows[0]["r_utel"].ToString();
                }
                if (ds.Tables[0].Rows[0]["r_address"] != null && ds.Tables[0].Rows[0]["r_address"].ToString() != "")
                {
                    model.r_address = ds.Tables[0].Rows[0]["r_address"].ToString();
                }
                if (ds.Tables[0].Rows[0]["r_desc"] != null && ds.Tables[0].Rows[0]["r_desc"].ToString() != "")
                {
                    model.r_desc = ds.Tables[0].Rows[0]["r_desc"].ToString();
                }
                return(model);
            }
            else
            {
                return(null);
            }
        }
예제 #18
0
        /// <summary>
        /// 获得前几行数据
        /// </summary>
        public DataSet GetList(int Top, string strWhere, string filedOrder)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select ");
            if (Top > 0)
            {
                strSql.Append(" top " + Top.ToString());
            }
            strSql.Append(" h_id,h_no,h_name,h_tel,h_address,h_zipcode,h_uname,h_remark ");
            strSql.Append(" FROM tb_kehu ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            strSql.Append(" order by " + filedOrder);
            return(DbSQL.Query(strSql.ToString()));
        }
예제 #19
0
파일: tb_order.cs 프로젝트: uwitec/Wms-7
        /// <summary>
        /// 获得前几行数据
        /// </summary>
        public DataSet GetList(int Top, string strWhere, string filedOrder)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select ");
            if (Top > 0)
            {
                strSql.Append(" top " + Top.ToString());
            }
            strSql.Append(" o_id,o_no,o_type,o_time,o_busy,o_sum,o_user,o_desc,o_num,o_pid ");
            strSql.Append(" FROM tb_order ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            strSql.Append(" order by " + filedOrder);
            return(DbSQL.Query(strSql.ToString()));
        }
예제 #20
0
        /// <summary>
        /// 获得前几行数据
        /// </summary>
        public DataSet GetList(int Top, string strWhere, string filedOrder)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select ");
            if (Top > 0)
            {
                strSql.Append(" top " + Top.ToString());
            }
            strSql.Append(" r_id,r_no,r_name,r_uname,r_utel,r_address,r_desc ");
            strSql.Append(" FROM tb_ruzhu ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            strSql.Append(" order by " + filedOrder);
            return(DbSQL.Query(strSql.ToString()));
        }
예제 #21
0
        /// <summary>
        /// 获得前几行数据
        /// </summary>
        public DataSet GetList(int Top, string strWhere, string filedOrder)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select ");
            if (Top > 0)
            {
                strSql.Append(" top " + Top.ToString());
            }
            strSql.Append(" cr_id,cr_oid,cr_pid,cr_time,cr_type,cr_num,cr_yan,cr_price,cr_remark ");
            strSql.Append(" FROM tb_churu ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            strSql.Append(" order by " + filedOrder);
            return(DbSQL.Query(strSql.ToString()));
        }
예제 #22
0
        /// <summary>
        /// 获得前几行数据
        /// </summary>
        public DataSet GetList(int Top, string strWhere, string filedOrder)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select ");
            if (Top > 0)
            {
                strSql.Append(" top " + Top.ToString());
            }
            strSql.Append(" p_id,p_no,p_name,p_tyid,p_pinpai,p_model,p_shang,p_price,p_unit,p_sx,p_xx,p_desc,p_addtime,p_ckid,p_kqid,p_num,p_rzfid ");
            strSql.Append(" FROM tb_proc ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            strSql.Append(" order by " + filedOrder);
            return(DbSQL.Query(strSql.ToString()));
        }
예제 #23
0
파일: tb_user.cs 프로젝트: uwitec/Wms-7
        /// <summary>
        /// 获得前几行数据
        /// </summary>
        public DataSet GetList(int Top, string strWhere, string filedOrder)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select ");
            if (Top > 0)
            {
                strSql.Append(" top " + Top.ToString());
            }
            strSql.Append(" u_id,u_log,u_pwd,u_no,u_name,u_tel,u_email,u_type,u_sex,u_address,u_adddate ");
            strSql.Append(" FROM tb_user ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            strSql.Append(" order by " + filedOrder);
            return(DbSQL.Query(strSql.ToString()));
        }
예제 #24
0
파일: tb_pan.cs 프로젝트: uwitec/Wms-7
        /// <summary>
        /// 获得前几行数据
        /// </summary>
        public DataSet GetList(int Top, string strWhere, string filedOrder)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select ");
            if (Top > 0)
            {
                strSql.Append(" top " + Top.ToString());
            }
            strSql.Append(" p_id,p_pid,p_time,p_user,p_numold,p_numnow,p_remark ");
            strSql.Append(" FROM tb_pan ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            strSql.Append(" order by " + filedOrder);
            return(DbSQL.Query(strSql.ToString()));
        }
예제 #25
0
파일: tb_type.cs 프로젝트: uwitec/Wms-7
        /// <summary>
        /// 获得前几行数据
        /// </summary>
        public DataSet GetList(int Top, string strWhere, string filedOrder)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select ");
            if (Top > 0)
            {
                strSql.Append(" top " + Top.ToString());
            }
            strSql.Append(" t_id,t_paid,t_no,t_name,t_desc ");
            strSql.Append(" FROM tb_type ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            strSql.Append(" order by " + filedOrder);
            return(DbSQL.Query(strSql.ToString()));
        }
예제 #26
0
파일: tb_type.cs 프로젝트: uwitec/Wms-7
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Model.tb_type GetModel(int t_id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1  ");
            strSql.Append(" t_id,t_paid,t_no,t_name,t_desc ");
            strSql.Append(" from tb_type ");
            strSql.Append(" where t_id=" + t_id + "");
            Model.tb_type model = new Model.tb_type();
            DataSet       ds    = DbSQL.Query(strSql.ToString());

            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["t_id"] != null && ds.Tables[0].Rows[0]["t_id"].ToString() != "")
                {
                    model.t_id = int.Parse(ds.Tables[0].Rows[0]["t_id"].ToString());
                }
                if (ds.Tables[0].Rows[0]["t_paid"] != null && ds.Tables[0].Rows[0]["t_paid"].ToString() != "")
                {
                    model.t_paid = int.Parse(ds.Tables[0].Rows[0]["t_paid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["t_no"] != null && ds.Tables[0].Rows[0]["t_no"].ToString() != "")
                {
                    model.t_no = ds.Tables[0].Rows[0]["t_no"].ToString();
                }
                if (ds.Tables[0].Rows[0]["t_name"] != null && ds.Tables[0].Rows[0]["t_name"].ToString() != "")
                {
                    model.t_name = ds.Tables[0].Rows[0]["t_name"].ToString();
                }
                if (ds.Tables[0].Rows[0]["t_desc"] != null && ds.Tables[0].Rows[0]["t_desc"].ToString() != "")
                {
                    model.t_desc = ds.Tables[0].Rows[0]["t_desc"].ToString();
                }
                return(model);
            }
            else
            {
                return(null);
            }
        }
예제 #27
0
파일: tb_order.cs 프로젝트: uwitec/Wms-7
        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("SELECT * FROM ( ");
            strSql.Append(" SELECT ROW_NUMBER() OVER (");
            if (!string.IsNullOrEmpty(orderby.Trim()))
            {
                strSql.Append("order by T." + orderby);
            }
            else
            {
                strSql.Append("order by T.o_id desc");
            }
            strSql.Append(")AS Row, T.*  from tb_order T ");
            if (!string.IsNullOrEmpty(strWhere.Trim()))
            {
                strSql.Append(" WHERE " + strWhere);
            }
            strSql.Append(" ) TT");
            strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
            return(DbSQL.Query(strSql.ToString()));
        }
예제 #28
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Model.tb_proc GetModel(int p_id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1  ");
            strSql.Append(" p_id,p_no,p_name,p_tyid,p_pinpai,p_model,p_shang,p_price,p_unit,p_sx,p_xx,p_desc,p_addtime,p_ckid,p_kqid,p_num,p_rzfid ");
            strSql.Append(" from tb_proc ");
            strSql.Append(" where p_id=" + p_id + "");
            Model.tb_proc model = new Model.tb_proc();
            DataSet       ds    = DbSQL.Query(strSql.ToString());

            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["p_id"] != null && ds.Tables[0].Rows[0]["p_id"].ToString() != "")
                {
                    model.p_id = int.Parse(ds.Tables[0].Rows[0]["p_id"].ToString());
                }
                if (ds.Tables[0].Rows[0]["p_no"] != null && ds.Tables[0].Rows[0]["p_no"].ToString() != "")
                {
                    model.p_no = ds.Tables[0].Rows[0]["p_no"].ToString();
                }
                if (ds.Tables[0].Rows[0]["p_name"] != null && ds.Tables[0].Rows[0]["p_name"].ToString() != "")
                {
                    model.p_name = ds.Tables[0].Rows[0]["p_name"].ToString();
                }
                if (ds.Tables[0].Rows[0]["p_tyid"] != null && ds.Tables[0].Rows[0]["p_tyid"].ToString() != "")
                {
                    model.p_tyid = int.Parse(ds.Tables[0].Rows[0]["p_tyid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["p_pinpai"] != null && ds.Tables[0].Rows[0]["p_pinpai"].ToString() != "")
                {
                    model.p_pinpai = ds.Tables[0].Rows[0]["p_pinpai"].ToString();
                }
                if (ds.Tables[0].Rows[0]["p_model"] != null && ds.Tables[0].Rows[0]["p_model"].ToString() != "")
                {
                    model.p_model = ds.Tables[0].Rows[0]["p_model"].ToString();
                }
                if (ds.Tables[0].Rows[0]["p_shang"] != null && ds.Tables[0].Rows[0]["p_shang"].ToString() != "")
                {
                    model.p_shang = ds.Tables[0].Rows[0]["p_shang"].ToString();
                }
                if (ds.Tables[0].Rows[0]["p_price"] != null && ds.Tables[0].Rows[0]["p_price"].ToString() != "")
                {
                    model.p_price = ds.Tables[0].Rows[0]["p_price"].ToString();
                }
                if (ds.Tables[0].Rows[0]["p_unit"] != null && ds.Tables[0].Rows[0]["p_unit"].ToString() != "")
                {
                    model.p_unit = ds.Tables[0].Rows[0]["p_unit"].ToString();
                }
                if (ds.Tables[0].Rows[0]["p_sx"] != null && ds.Tables[0].Rows[0]["p_sx"].ToString() != "")
                {
                    model.p_sx = ds.Tables[0].Rows[0]["p_sx"].ToString();
                }
                if (ds.Tables[0].Rows[0]["p_xx"] != null && ds.Tables[0].Rows[0]["p_xx"].ToString() != "")
                {
                    model.p_xx = ds.Tables[0].Rows[0]["p_xx"].ToString();
                }
                if (ds.Tables[0].Rows[0]["p_desc"] != null && ds.Tables[0].Rows[0]["p_desc"].ToString() != "")
                {
                    model.p_desc = ds.Tables[0].Rows[0]["p_desc"].ToString();
                }
                if (ds.Tables[0].Rows[0]["p_addtime"] != null && ds.Tables[0].Rows[0]["p_addtime"].ToString() != "")
                {
                    model.p_addtime = ds.Tables[0].Rows[0]["p_addtime"].ToString();
                }
                if (ds.Tables[0].Rows[0]["p_ckid"] != null && ds.Tables[0].Rows[0]["p_ckid"].ToString() != "")
                {
                    model.p_ckid = int.Parse(ds.Tables[0].Rows[0]["p_ckid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["p_kqid"] != null && ds.Tables[0].Rows[0]["p_kqid"].ToString() != "")
                {
                    model.p_kqid = int.Parse(ds.Tables[0].Rows[0]["p_kqid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["p_num"] != null && ds.Tables[0].Rows[0]["p_num"].ToString() != "")
                {
                    model.p_num = int.Parse(ds.Tables[0].Rows[0]["p_num"].ToString());
                }
                if (ds.Tables[0].Rows[0]["p_rzfid"] != null && ds.Tables[0].Rows[0]["p_rzfid"].ToString() != "")
                {
                    model.p_rzfid = int.Parse(ds.Tables[0].Rows[0]["p_rzfid"].ToString());
                }
                return(model);
            }
            else
            {
                return(null);
            }
        }
예제 #29
0
파일: tb_user.cs 프로젝트: uwitec/Wms-7
        public Model.tb_user GetModel(string log, string pwd)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1  ");
            strSql.Append(" u_id,u_log,u_pwd,u_no,u_name,u_tel,u_email,u_type,u_sex,u_address,u_adddate ");
            strSql.Append(" from tb_user ");
            strSql.Append(" where u_log='" + log + "' and u_pwd='" + pwd + "' ");
            Model.tb_user model = new Model.tb_user();
            DataSet       ds    = DbSQL.Query(strSql.ToString());

            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["u_id"] != null && ds.Tables[0].Rows[0]["u_id"].ToString() != "")
                {
                    model.u_id = int.Parse(ds.Tables[0].Rows[0]["u_id"].ToString());
                }
                if (ds.Tables[0].Rows[0]["u_log"] != null && ds.Tables[0].Rows[0]["u_log"].ToString() != "")
                {
                    model.u_log = ds.Tables[0].Rows[0]["u_log"].ToString();
                }
                if (ds.Tables[0].Rows[0]["u_pwd"] != null && ds.Tables[0].Rows[0]["u_pwd"].ToString() != "")
                {
                    model.u_pwd = ds.Tables[0].Rows[0]["u_pwd"].ToString();
                }
                if (ds.Tables[0].Rows[0]["u_no"] != null && ds.Tables[0].Rows[0]["u_no"].ToString() != "")
                {
                    model.u_no = ds.Tables[0].Rows[0]["u_no"].ToString();
                }
                if (ds.Tables[0].Rows[0]["u_name"] != null && ds.Tables[0].Rows[0]["u_name"].ToString() != "")
                {
                    model.u_name = ds.Tables[0].Rows[0]["u_name"].ToString();
                }
                if (ds.Tables[0].Rows[0]["u_tel"] != null && ds.Tables[0].Rows[0]["u_tel"].ToString() != "")
                {
                    model.u_tel = ds.Tables[0].Rows[0]["u_tel"].ToString();
                }
                if (ds.Tables[0].Rows[0]["u_email"] != null && ds.Tables[0].Rows[0]["u_email"].ToString() != "")
                {
                    model.u_email = ds.Tables[0].Rows[0]["u_email"].ToString();
                }
                if (ds.Tables[0].Rows[0]["u_type"] != null && ds.Tables[0].Rows[0]["u_type"].ToString() != "")
                {
                    model.u_type = int.Parse(ds.Tables[0].Rows[0]["u_type"].ToString());
                }
                if (ds.Tables[0].Rows[0]["u_sex"] != null && ds.Tables[0].Rows[0]["u_sex"].ToString() != "")
                {
                    model.u_sex = ds.Tables[0].Rows[0]["u_sex"].ToString();
                }
                if (ds.Tables[0].Rows[0]["u_address"] != null && ds.Tables[0].Rows[0]["u_address"].ToString() != "")
                {
                    model.u_address = ds.Tables[0].Rows[0]["u_address"].ToString();
                }
                if (ds.Tables[0].Rows[0]["u_adddate"] != null && ds.Tables[0].Rows[0]["u_adddate"].ToString() != "")
                {
                    model.u_adddate = ds.Tables[0].Rows[0]["u_adddate"].ToString();
                }
                return(model);
            }
            else
            {
                return(null);
            }
        }