예제 #1
0
        /// <summary>
        /// 取得PTJob数据,可以是很多
        /// </summary>
        /// <param name="paras"></param>
        /// <returns>兼职表的集合</returns>
        public static List <PTJob> QueryListCondiction(SqlParameter[] paras)
        {
            PTJob         model = null;
            StringBuilder sbSql = new StringBuilder("select * from PTJobTable p,EmployeeTable e where p.pt_eId = e.e_Id and p.pt_StuId is null");

            if (paras != null)
            {
                for (int i = 0; i < paras.Length; i++)
                {
                    SqlParameter p = paras[i];
                    sbSql.Append(" and ");
                    sbSql.Append(p.ParameterName.Substring(1));
                    sbSql.Append(" =" + p.ParameterName);
                }
            }
            DataTable    dt   = (paras == null) ? SqlHelper.ExecuteDataTable(sbSql.ToString()) : SqlHelper.ExecuteDataTable(sbSql.ToString(), paras);
            List <PTJob> list = null;

            if (dt.Rows.Count > 0)
            {
                list = new List <PTJob>();
                foreach (DataRow dr in dt.Rows)
                {
                    model = new PTJob();
                    SetDr2Model(dr, model);
                    list.Add(model);
                }
            }
            return(list);
        }
예제 #2
0
        public List <ProductionClassModel> GetAllType()
        {
            DataTable data = SqlHelper.ExecuteDataTable("SELECT * FROM SJProductionType ", null);

            return(SqlHelper.DataTableToModelList <ProductionClassModel>(data));
        }
예제 #3
0
        public static int GetOKPTJobNum(int e_id)
        {
            DataTable dt = SqlHelper.ExecuteDataTable("select * from PTJobTable where pt_eId =@e_id and pt_StuId is not null", new SqlParameter("e_id", e_id));

            return(dt.Rows.Count);
        }
예제 #4
0
        public List <BucketModel> GetAllBucket()
        {
            DataTable data = SqlHelper.ExecuteDataTable(" SELECT * FROM  SJPackageBucketInfo ORDER  BY FBucketID DESC ", null);

            return(SqlHelper.DataTableToModelList <BucketModel>(data));
        }