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

            Item.ID          = (Int32)(rd["NS_ID"]);
            Item.NODE_ID     = (Int32)(rd["NS_NODE_ID"]);
            Item.CID         = (Guid)(rd["NS_CID"]);
            Item.NguoiTao    = (String)(rd["NS_NguoiTao"]);
            Item.NgayTao     = (DateTime)(rd["NS_NgayTao"]);
            Item.NgayCapNhat = (DateTime)(rd["NS_NgayCapNhat"]);
            Item.RowId       = (Guid)(rd["NS_RowId"]);
            return(Item);
        }
        public static NodeSetting SelectById(Int32 NS_ID)
        {
            NodeSetting Item = new NodeSetting();

            SqlParameter[] obj = new SqlParameter[1];
            obj[0] = new SqlParameter("NS_ID", NS_ID);
            using (IDataReader rd = SqlHelper.ExecuteReader(DAL.con(), CommandType.StoredProcedure, "sp_tblNodeSetting_Select_SelectById_linhnx", obj))
            {
                while (rd.Read())
                {
                    Item = getFromReader(rd);
                }
            }
            return(Item);
        }
        public static NodeSetting UpdateLoaiNhom(string UpdateList, string NODE_ID, string Username)
        {
            NodeSetting Item = new NodeSetting();

            SqlParameter[] obj = new SqlParameter[3];
            obj[0] = new SqlParameter("UpdateList", UpdateList);
            obj[1] = new SqlParameter("NODE_ID", NODE_ID);
            obj[2] = new SqlParameter("Username", Username);
            using (IDataReader rd = SqlHelper.ExecuteReader(DAL.con(), CommandType.StoredProcedure, "sp_tblNodeSetting_Update_UpdateLoaiNhom_linhnx", obj))
            {
                while (rd.Read())
                {
                    Item = getFromReader(rd);
                }
            }
            return(Item);
        }
        public static NodeSetting Insert(NodeSetting Inserted)
        {
            NodeSetting Item = new NodeSetting();

            SqlParameter[] obj = new SqlParameter[6];
            obj[0] = new SqlParameter("NS_NODE_ID", Inserted.NODE_ID);
            obj[1] = new SqlParameter("NS_CID", Inserted.CID);
            obj[2] = new SqlParameter("NS_NguoiTao", Inserted.NguoiTao);
            obj[3] = new SqlParameter("NS_NgayTao", Inserted.NgayTao);
            obj[4] = new SqlParameter("NS_NgayCapNhat", Inserted.NgayCapNhat);
            obj[5] = new SqlParameter("NS_RowId", Inserted.RowId);

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