Пример #1
0
        public ASPMUser_DO SelectById(int Id)
        {
            ASPMUser_DO     MUser     = new ASPMUser_DO();
            string          condition = " WHERE IdMUser = "******"SELECT " + FIELDNAME + " FROM " + TABLENAME + condition;
            MySqlDataReader data      = null;

            if (aspQuery.Select(query, ref data))
            {
                CopyToObject(ref MUser, data);
            }

            return(MUser);
        }
Пример #2
0
        public bool SelectById(int Id, ref ASPMGroup_DO MGroup)
        {
            bool            Result    = false;
            string          condition = " WHERE IdMGroup = " + ASPCast.SQLIntToStr(Id);
            string          query     = "SELECT " + FIELDNAME + " FROM " + TABLENAME + condition;
            MySqlDataReader data      = null;

            if (aspQuery.Select(query, ref data))
            {
                if (data.HasRows)
                {
                    CopyToObject(ref MGroup, data);
                    Result = true;
                }
            }
            aspQuery.MySqlConnect.CloseConnection();
            return(Result);
        }
Пример #3
0
        public BindingSource GetTable(string query)
        {
            BindingSource bindingSource = new BindingSource();
            string        Query         = "SELECT * FROM (\n" +
                                          query +
                                          ") TblLuar WHERE `Hapus` = 0 LIMIT 0,50";

            if (!aspQuery.Select(Query, ref bindingSource))
            {
                ASPMsgCmp.ErrorMessage("Fail to read get data from Browse Form!");
            }
            return(bindingSource);
        }
Пример #4
0
        public bool SelectById(int Id, ref ASPSysInfo_DO SysInfo)
        {
            bool            Result    = true;
            string          condition = " WHERE IdSysInfo = " + ASPCast.SQLIntToStr(Id);
            string          query     = "SELECT " + FIELDNAME + " FROM " + TABLENAME + condition;
            MySqlDataReader data      = null;

            if (aspQuery.Select(query, ref data))
            {
                CopyToObject(ref SysInfo, data);
            }
            else
            {
                Result = false;
            }

            return(Result);
        }