Ejemplo n.º 1
0
        public static LoaiLog getFromReader(IDataReader rd)
        {
            LoaiLog Item = new LoaiLog();

            Item.ID  = (Int16)(rd["LLOG_ID"]);
            Item.Ten = (String)(rd["LLOG_Ten"]);
            return(Item);
        }
Ejemplo n.º 2
0
        public static LoaiLog SelectById(Int16 LLOG_ID)
        {
            LoaiLog Item = new LoaiLog();

            SqlParameter[] obj = new SqlParameter[1];
            obj[0] = new SqlParameter("LLOG_ID", LLOG_ID);
            using (IDataReader rd = SqlHelper.ExecuteReader(DAL.con(), CommandType.StoredProcedure, "sp_tblLoaiLog_Select_SelectById_linhnx", obj))
            {
                while (rd.Read())
                {
                    Item = getFromReader(rd);
                }
            }
            return(Item);
        }
Ejemplo n.º 3
0
        public static LoaiLog Insert(LoaiLog Inserted)
        {
            LoaiLog Item = new LoaiLog();

            SqlParameter[] obj = new SqlParameter[1];
            obj[0] = new SqlParameter("LLOG_Ten", Inserted.Ten);

            using (IDataReader rd = SqlHelper.ExecuteReader(DAL.con(), CommandType.StoredProcedure, "sp_tblLoaiLog_Insert_InsertNormal_linhnx", obj))
            {
                while (rd.Read())
                {
                    Item = getFromReader(rd);
                }
            }
            return(Item);
        }