Ejemplo n.º 1
0
        private static void RetrieveHHUserInfo()
        {
            Console.WriteLine("Input Key");
            string key = Console.ReadLine();

            BinService.Provider provider = new BinService.Provider();
            provider.RetrieveHHUserInfo(key);
        }
Ejemplo n.º 2
0
        private static void RetrieveHHUserInfo()
        {
            Console.WriteLine("Input Key");
            string key = Console.ReadLine();

            BinService.Provider provider = new BinService.Provider();
            provider.RetrieveHHUserInfo(key);
        }
Ejemplo n.º 3
0
 public Shell()
 {
     InitializeComponent();
     provider = new BinService.Provider();
 }
Ejemplo n.º 4
0
        public string GetHousehold(string key)
        {
            var values = key.Split('|');

            if (values.Length > 0)
            {
                BinService.Provider provider = new BinService.Provider();

                string method = values[0].ToLower();

                if (method == "authenticate")
                {
                    string data = values[1];
                    return(provider.RetrieveHHUserInfo(data).ToString());
                }
                else if (method == "ia")
                {
                    string   data      = values[1];
                    string   address   = values[2].Replace("s_pace", " ").Replace("c_omma", ",");
                    string[] seperator = new string[] { "___" };
                    return(provider.InsertAddress(data, address.Split(seperator, StringSplitOptions.RemoveEmptyEntries)[0].ToString(),
                                                  address.Split(seperator, StringSplitOptions.RemoveEmptyEntries)[1].ToString(),
                                                  address.Split(seperator, StringSplitOptions.RemoveEmptyEntries)[2].ToString(),
                                                  address.Split(seperator, StringSplitOptions.RemoveEmptyEntries)[3].ToString(),
                                                  address.Split(seperator, StringSplitOptions.RemoveEmptyEntries)[4].ToString(),
                                                  address.Split(seperator, StringSplitOptions.RemoveEmptyEntries)[5].ToString(),
                                                  Convert.ToBoolean(address.Split(seperator, StringSplitOptions.RemoveEmptyEntries)[6]),
                                                  Convert.ToInt32(address.Split(seperator, StringSplitOptions.RemoveEmptyEntries)[7])).ToString());
                }
                else if (method == "ib")
                {
                    string data   = values[1];
                    string status = values[2];
                    return(provider.InsertBin(data, status).ToString());
                }
                else if (method == "rgt")
                {
                    string data = values[1];
                    return(provider.RetrieveGarbageTag(data).ToString());
                }
                else if (method == "raddress")
                {
                    string data = values[1];
                    return(provider.RetrieveAddress(data).ToString());
                }
                else if (method == "ru")
                {
                    string userId = values[1];
                    return(provider.RetrieveUserAddress(userId).ToString());
                }
                else if (method == "io")
                {
                    string data     = values[1];
                    string wetOrder = values[2];
                    string dryOrder = values[3];
                    string points   = values[4];
                    return(provider.InsertOrder(data, Convert.ToInt32(wetOrder), Convert.ToInt32(dryOrder), Convert.ToInt32(points)).ToString());
                }
                else
                {
                    throw new HttpResponseException(HttpStatusCode.NotFound);
                }
            }

            return("Error, Not Found!");
        }
Ejemplo n.º 5
0
 public Shell()
 {
     InitializeComponent();
     provider = new BinService.Provider();
 }