Esempio n. 1
0
        object IApplicationResourseService.Get(int type, int arid, int riid)
        {
            ApplicationResourseInfo item = null;

            SqlParameter[] parms = new SqlParameter[]
            {
                new SqlParameter("@ARType", type),
                new SqlParameter("@RIID", riid),
                new SqlParameter("@ARID", arid)
            };
            using (SqlDataReader reader = DBHelper.ExecuteReaderProc(GET_APPLICATIONRESOURCE, parms))
            {
                if (reader.Read())
                {
                    if (type == 1)
                    {
                        item = new ApplicationResourseInfo((BorrowApplication)bas.Get(reader.GetInt32(0)), reader.GetInt32(1), (ResourceInfo)rs.Get(reader.GetInt32(2)), reader.GetInt32(3));
                    }
                    else if (type == 2)
                    {
                        item = new ApplicationResourseInfo((StockApplication)sas.Get(reader.GetInt32(0)), reader.GetInt32(1), (ResourceInfo)rs.Get(reader.GetInt32(2)), reader.GetInt32(3));
                    }
                    else
                    {
                        item = null;
                    }
                }
            }
            return(item);
        }
Esempio n. 2
0
 public static StockApplication Get(int id)
 {
     return((StockApplication)sas.Get(id));
 }