public static UserFunction Update(UserFunction Updated)
        {
            UserFunction Item = new UserFunction();

            SqlParameter[] obj = new SqlParameter[10];
            obj[0] = new SqlParameter("UF_ID", Updated.ID);
            obj[1] = new SqlParameter("UF_Username", Updated.Username);
            obj[2] = new SqlParameter("UF_LAY_ID", Updated.LAY_ID);
            obj[3] = new SqlParameter("UF_FN_ID", Updated.FN_ID);
            obj[4] = new SqlParameter("UF_FN_Url", Updated.FN_Url);
            obj[5] = new SqlParameter("UF_Doc", Updated.Doc);
            obj[6] = new SqlParameter("UF_ThuTu", Updated.ThuTu);
            obj[7] = new SqlParameter("UF_RowId", Updated.RowId);
            obj[8] = new SqlParameter("UF_NgayTao", Updated.NgayTao);
            obj[9] = new SqlParameter("UF_NguoiTao", Updated.NguoiTao);

            using (IDataReader rd = SqlHelper.ExecuteReader(DAL.con(), CommandType.StoredProcedure, "sp_tblUserFunction_Update_UpdateNormal_linhnx", obj))
            {
                while (rd.Read())
                {
                    Item = getFromReader(rd);
                }
            }
            return(Item);
        }
        public static UserFunction SelectById(Int32 UF_ID)
        {
            UserFunction Item = new UserFunction();

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

            Item.ID       = (Int32)(rd["UF_ID"]);
            Item.Username = (String)(rd["UF_Username"]);
            Item.LAY_ID   = (Int32)(rd["UF_LAY_ID"]);
            Item.FN_ID    = (Int32)(rd["UF_FN_ID"]);
            Item.FN_Url   = (String)(rd["UF_FN_Url"]);
            Item.Doc      = (String)(rd["UF_Doc"]);
            Item.ThuTu    = (Int32)(rd["UF_ThuTu"]);
            Item.RowId    = (Guid)(rd["UF_RowId"]);
            Item.NgayTao  = (DateTime)(rd["UF_NgayTao"]);
            Item.NguoiTao = (String)(rd["UF_NguoiTao"]);
            return(Item);
        }