コード例 #1
0
 private void getFruitType_callback(Hashtable result, Object[] args, String output, PHPRPC_Error error, Boolean failure)
 {
     foreach (DictionaryEntry aa in result)
     {
         Hashtable line = PHPConvert.ToHashtable(aa.Value);
         dataGridView1.Rows.Insert(0, new object[] { Encoding.UTF8.GetString((byte[])line["id"]),
                                                     Encoding.UTF8.GetString((byte[])line["name"]) });
     }
 }
コード例 #2
0
 private void getOrder_callback(Hashtable result, Object[] args, String output, PHPRPC_Error error, Boolean failure)
 {
     if (result == null)
     {
         return;
     }
     foreach (DictionaryEntry order in result)
     {
         Hashtable    line = PHPConvert.ToHashtable(order.Value);
         OrderControl oc   = new OrderControl(line);
         oc.Dock = DockStyle.Top;
         list.Controls.Add(oc);
     }
 }
コード例 #3
0
 private void getOrderItem_callback(Hashtable result, Object[] args, String output, PHPRPC_Error error, Boolean failure)
 {
     if (result == null)
     {
         return;
     }
     foreach (DictionaryEntry aa in result)
     {
         Hashtable line = PHPConvert.ToHashtable(aa.Value);
         dataGridView6.Rows.Insert(0, new object[] { Encoding.UTF8.GetString((byte[])line["id"]),
                                                     Encoding.UTF8.GetString((byte[])line["product"]),
                                                     Encoding.UTF8.GetString((byte[])line["quantity"]),
                                                     Encoding.UTF8.GetString((byte[])line["money"]),
                                                     Encoding.UTF8.GetString((byte[])line["comment"]) });
     }
 }
コード例 #4
0
 private void getOrder_callback(Hashtable result, Object[] args, String output, PHPRPC_Error error, Boolean failure)
 {
     if (result == null)
     {
         return;
     }
     foreach (DictionaryEntry aa in result)
     {
         Hashtable line = PHPConvert.ToHashtable(aa.Value);
         dataGridView5.Rows.Insert(0, new object[] { Encoding.UTF8.GetString((byte[])line["id"]),
                                                     Encoding.UTF8.GetString((byte[])line["customer"]),
                                                     Encoding.UTF8.GetString((byte[])line["earliest"]),
                                                     Encoding.UTF8.GetString((byte[])line["latest"]),
                                                     Encoding.UTF8.GetString((byte[])line["status"]),
                                                     Encoding.UTF8.GetString((byte[])line["comment"]), });
     }
 }
コード例 #5
0
 private void getPrizeOfUser_callback(Hashtable result, Object[] args, String output, PHPRPC_Error error, Boolean failure)
 {
     if (result.Count == 0)
     {
         if (pageForPrize > 1)
         {
             pageForPrize--;
         }
         return;
     }
     dataGridView4.Rows.Clear();
     foreach (DictionaryEntry aa in result)
     {
         Hashtable line = PHPConvert.ToHashtable(aa.Value);
         dataGridView4.Rows.Insert(0, new object[] { Encoding.UTF8.GetString((byte[])line["id"]),
                                                     line["phone"] == null ? "": Encoding.UTF8.GetString((byte[])line["phone"]),
                                                     Encoding.UTF8.GetString((byte[])line["content"]),
                                                     Encoding.UTF8.GetString((byte[])line["prizeName"]),
                                                     Encoding.UTF8.GetString((byte[])line["received"]),
                                                     String.Format("{0}", Util.UTCToDateTime(Convert.ToInt32(Encoding.UTF8.GetString((byte[])line["ctime"])))) });
     }
 }
コード例 #6
0
        public OrderControl(Hashtable order)
        {
            InitializeComponent();
            label1.Text += Encoding.UTF8.GetString((byte[])order["customer"]);
            label2.Text += Encoding.UTF8.GetString((byte[])order["earliest"]);
            label3.Text += Encoding.UTF8.GetString((byte[])order["latest"]);
            label4.Text += Encoding.UTF8.GetString((byte[])order["comment"]);
            label5.Text += Encoding.UTF8.GetString((byte[])order["status"]);
            Hashtable items = PHPConvert.ToHashtable(order["orderItems"]);

            if (items != null)
            {
                foreach (DictionaryEntry aa in items)
                {
                    Hashtable line = PHPConvert.ToHashtable(aa.Value);
                    dataGridView6.Rows.Insert(0, new object[] { Encoding.UTF8.GetString((byte[])line["id"]),
                                                                Encoding.UTF8.GetString((byte[])line["product"]),
                                                                Encoding.UTF8.GetString((byte[])line["quantity"]),
                                                                Encoding.UTF8.GetString((byte[])line["money"]),
                                                                Encoding.UTF8.GetString((byte[])line["comment"]) });
                }
            }
        }