Beispiel #1
0
        public bool GetWarehouseList(ref List <WarehouseInfo> modelList, WarehouseInfo model, UserInfo user, ref string strError)
        {
            List <WarehouseInfo> lstModel = new List <WarehouseInfo>();

            try
            {
                using (SqlDataReader dr = Common_DB.QueryAll("V_Warehouse", GetFilterSql(model, user), "*", "Order By WarehouseNo,ID Desc"))
                {
                    while (dr.Read())
                    {
                        lstModel.Add(GetModelFromDataReader(dr));
                    }
                }

                modelList = lstModel;
                return(true);
            }
            catch (Exception ex)
            {
                strError = ex.Message;
                return(false);
            }
        }
Beispiel #2
0
        public bool GetSpecialReturnMaterialList(ref List <SpecialReturnMaterial> modelList, SpecialReturnMaterial model, UserInfo user, ref string strError)
        {
            List <SpecialReturnMaterial> lstModel = new List <SpecialReturnMaterial>();

            try
            {
                using (SqlDataReader dr = Common_DB.QueryAll("V_SpecialReturnMaterial", GetFilterSql(model, user), "*", "Order By InvtID,ID Desc"))
                {
                    while (dr.Read())
                    {
                        lstModel.Add(GetModelFromDataReader(dr));
                    }
                }

                modelList = lstModel;
                return(true);
            }
            catch (Exception ex)
            {
                strError = ex.Message;
                return(false);
            }
        }