Example #1
0
 private void Btn_InsertPhone_Click(object sender, EventArgs e)
 {
     if (Btn_InsertPhone.Text.Equals("new"))
     {
         materialSkinManager.ColorScheme = new ColorScheme(Primary.Red800, Primary.Red900, Primary.Red500, Accent.LightBlue200, TextShade.WHITE);
         Btn_InsertPhone.Text            = "submit";
         Btn_ResetNew.Visible            = true;
         Btn_DeletePhone.Visible         = false;
         Btn_UpdatePhone.Visible         = false;
         txt_desc.Text     = "";
         txt_name.Text     = "";
         txt_price.Value   = 0;
         cb_hidden.Checked = false;
     }
     else
     {
         ConnectionThread ct = new ConnectionThread(this);
         if (cb_hidden.Checked)
         {
             hidden = 1;
         }
         else
         {
             hidden = 0;
         }
         ComboBox_ItemRow the_item = (ComboBox_ItemRow)cbox_brand.SelectedItem;
         ct.Execute("2", txt_name.Text, txt_desc.Text, txt_price.Value.ToString(), hidden.ToString(), the_item.getId());
         materialSkinManager.ColorScheme = new ColorScheme(Primary.Blue800, Primary.Blue900, Primary.Blue500, Accent.Red200, TextShade.WHITE);
         Btn_InsertPhone.Text            = "new";
         Btn_ResetNew.Visible            = false;
         Btn_DeletePhone.Visible         = true;
         Btn_UpdatePhone.Visible         = true;
     }
 }
Example #2
0
        private void Btn_UpdatePhone_Click(object sender, EventArgs e)
        {
            ConnectionThread ct       = new ConnectionThread(this);
            ComboBox_ItemRow the_item = (ComboBox_ItemRow)cbox_brand.SelectedItem;

            ct.Execute("5", dgv.SelectedRows[0].Cells[0].Value.ToString(), txt_name.Text, txt_desc.Text, txt_price.Value.ToString(), hidden.ToString(), the_item.getId());
        }
Example #3
0
        private void materialFlatButton2_Click(object sender, EventArgs e)
        {
            ConnectionThread ct       = new ConnectionThread(this);
            ComboBox_ItemRow the_item = (ComboBox_ItemRow)cbox_brand.SelectedItem;

            ct.Execute("7", the_item.getId());
            Refreshbrands();
            Refreshphones();
        }