Esempio n. 1
0
        public List <TC_OA_SmallGoodsModel> GetTC_OA_SmallGoodsList(string SortColumns, int StartRecord, int MaxRecords, int CodeEqual, string UserCodeEqual, string UnitCodeEqual, DateTime ApplayDateEqual, string NameEqual, string UseWayEqual, string TypeEqual, string GoodsCodeEqual, int AuditingEqual)
        {
            List <TC_OA_SmallGoodsModel> models        = new List <TC_OA_SmallGoodsModel>();
            TC_OA_SmallGoodsQueryModel   objQueryModel = new TC_OA_SmallGoodsQueryModel();

            objQueryModel.StartRecord     = StartRecord;
            objQueryModel.MaxRecords      = MaxRecords;
            objQueryModel.SortColumns     = SortColumns;
            objQueryModel.CodeEqual       = CodeEqual;
            objQueryModel.UserCodeEqual   = UserCodeEqual;
            objQueryModel.UnitCodeEqual   = UnitCodeEqual;
            objQueryModel.ApplayDateEqual = ApplayDateEqual;
            objQueryModel.NameEqual       = NameEqual;
            objQueryModel.UseWayEqual     = UseWayEqual;
            objQueryModel.TypeEqual       = TypeEqual;
            objQueryModel.GoodsCodeEqual  = GoodsCodeEqual;
            objQueryModel.AuditingEqual   = AuditingEqual;
            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                try
                {
                    models = new TC_OA_SmallGoodsBLL().GetModels(objQueryModel, connection);
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(models);
        }
Esempio n. 2
0
        public List <TC_OA_SmallGoodsModel> GetTC_OA_SmallGoodsList(TC_OA_SmallGoodsQueryModel QueryModel)
        {
            List <TC_OA_SmallGoodsModel> models = new List <TC_OA_SmallGoodsModel>();

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                try
                {
                    if (QueryModel == null)
                    {
                        QueryModel = new TC_OA_SmallGoodsQueryModel();
                    }
                    models = new TC_OA_SmallGoodsBLL().GetModels(QueryModel, connection);
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(models);
        }
Esempio n. 3
0
        public List <TC_OA_SmallGoodsModel> GetModels(TC_OA_SmallGoodsQueryModel ObjQueryModel, SqlTransaction Transaction)
        {
            TC_OA_SmallGoodsDAL sdal = new TC_OA_SmallGoodsDAL(Transaction);

            return(sdal.Select(ObjQueryModel));
        }