示例#1
0
 public static linhLayout getFromReader(IDataReader rd)
 {
     linhLayout Item = new linhLayout();
     Item.ID = (Int32)(rd["LAY_ID"]);
     Item.MEM_ID = (Int32)(rd["LAY_MEM_ID"]);
     Item.Ten = (String)(rd["LAY_Ten"]);
     Item.Width = (String)(rd["LAY_Width"]);
     Item.Show = (Boolean)(rd["LAY_Show"]);
     Item.ThuTu = (Int32)(rd["LAY_ThuTu"]);
     return Item;
 }
示例#2
0
 public static linhLayout SelectById(Int32 LAY_ID)
 {
     linhLayout Item = new linhLayout();
     SqlParameter[] obj = new SqlParameter[1];
     obj[0] = new SqlParameter("LAY_ID", LAY_ID);
     using (IDataReader rd = SqlHelper.ExecuteReader(DAL.con(), CommandType.StoredProcedure, "sp_tbllinhLayout_Select_SelectById_linhnx", obj))
     {
         while (rd.Read())
         {
             Item = getFromReader(rd);
         }
     }
     return Item;
 }
示例#3
0
        public static linhLayout Insert(linhLayout Inserted)
        {
            linhLayout Item = new linhLayout();
            SqlParameter[] obj = new SqlParameter[5];
            obj[0] = new SqlParameter("LAY_MEM_ID", Inserted.MEM_ID);
            obj[1] = new SqlParameter("LAY_Ten", Inserted.Ten);
            obj[2] = new SqlParameter("LAY_Width", Inserted.Width);
            obj[3] = new SqlParameter("LAY_Show", Inserted.Show);
            obj[4] = new SqlParameter("LAY_ThuTu", Inserted.ThuTu);

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