Exemple #1
0
 public ReadUserInfo(DataPackage data)
 {
     AccountInfoConvet convert = new AccountInfoConvet();
     accountInfo = convert.ConvertToClass(data.Data);
     SQLService sql = new SQLService();
     accountInfo = sql.AccountInfoReader(accountInfo.User_id);
     dataSend.Client = data.Client;
     dataSend.Data = convert.ConvertToBytes(accountInfo);
 }
        public bool Response()
        {
            try
            {
                SQLService sql = new SQLService();
                System.Collections.ArrayList arr = sql.SearchAccount(selAcc);

                foreach (object obj in arr)
                {
                    Sender sender = new Sender(client);
                    DataPackage dpk = new DataPackage();
                    AccountInfoConvet converter = new AccountInfoConvet();
                    dpk.Data = converter.ConvertToBytes((AccountInfo)obj);
                    dpk.Client = client;
                    sender.SendMessage(dpk);
                }

                return true;
            }
            catch
            {
                return false;
            }
        }
 public EditAccountInfo(DataPackage data)
 {
     AccountInfoConvet convert = new AccountInfoConvet();
     accountInfo = convert.ConvertToClass(data.Data);
     dataSend.Client = data.Client;
 }