public static CoQuanFunction getFromReader(IDataReader rd)
        {
            CoQuanFunction Item = new CoQuanFunction();

            Item.ID          = (Int32)(rd["CF_ID"]);
            Item.FN_ID       = (Int32)(rd["CF_FN_ID"]);
            Item.CQ_ID       = (Int32)(rd["CF_CQ_ID"]);
            Item.NgayTao     = (DateTime)(rd["CF_NgayTao"]);
            Item.NgayCapNhat = (DateTime)(rd["CF_NgayCapNhat"]);
            Item.NguoiTao    = (String)(rd["CF_NguoiTao"]);
            return(Item);
        }
        public static CoQuanFunction SelectById(Int32 CF_ID)
        {
            CoQuanFunction Item = new CoQuanFunction();

            SqlParameter[] obj = new SqlParameter[1];
            obj[0] = new SqlParameter("CF_ID", CF_ID);
            using (IDataReader rd = SqlHelper.ExecuteReader(DAL.con(), CommandType.StoredProcedure, "sp_tblCoQuanFunction_Select_SelectById_linhnx", obj))
            {
                while (rd.Read())
                {
                    Item = getFromReader(rd);
                }
            }
            return(Item);
        }
        public static CoQuanFunction Insert(CoQuanFunction Inserted)
        {
            CoQuanFunction Item = new CoQuanFunction();

            SqlParameter[] obj = new SqlParameter[5];
            obj[0] = new SqlParameter("CF_FN_ID", Inserted.FN_ID);
            obj[1] = new SqlParameter("CF_CQ_ID", Inserted.CQ_ID);
            obj[2] = new SqlParameter("CF_NgayTao", Inserted.NgayTao);
            obj[3] = new SqlParameter("CF_NgayCapNhat", Inserted.NgayCapNhat);
            obj[4] = new SqlParameter("CF_NguoiTao", Inserted.NguoiTao);

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