public Issuekitchenitems()
 {
     InitializeComponent();
     db = Model.DatabaseConfigure.getConfigure();
     foreach (var purchaseitem in db.purchaseitems.ToList())
     {
         comboBox_itemlist.Items.Add(purchaseitem);
     }
 }
Exemplo n.º 2
0
 private void materialButton1_update_Click(object sender, EventArgs e)
 {
     if (betterTextBox1_name.Text.Trim() == "")
     {
         CustomControls.Alert.show(" Name", "Enter Party Name ", 1500);
     }
     if (betterTextBox1_address.Text.Trim() == "")
     {
         CustomControls.Alert.show("Address", "Enter Party Address", 1500);
     }
     if (betterTextBox2_phone.Text.Trim() == "")
     {
         CustomControls.Alert.show("Phone", "Enter Party Phone", 1500);
     }
     if (betterTextBox11_panNumber.Text.Trim() == "")
     {
         CustomControls.Alert.show("Pan Number", "Enter Pan Number", 1500);
     }
     if (betterTextBox10_postalcode.Text.Trim() == "")
     {
         CustomControls.Alert.show("Postal Code", "Enter Postal Code", 1500);
     }
     if (betterTextBox12_deu.Text.Trim() == "")
     {
         CustomControls.Alert.show("Deu", "Enter Deu ", 1500);
     }
     if (betterTextBox13_advance.Text.Trim() == "")
     {
         CustomControls.Alert.show("Advance", "Enter Advance", 1500);
     }
     if (betterTextBox3_email.Text.Trim() == "")
     {
         CustomControls.Alert.show("Email", "Enter Email", 1500);
     }
     using (var db = new ResturantManagementEntities())
     {
         party ptr = db.parties.Where(o => o.id == id).First();
         ptr.name            = betterTextBox1_name.Text;
         ptr.address         = betterTextBox1_address.Text;
         ptr.phone           = betterTextBox2_phone.Text;
         ptr.pannumber       = betterTextBox11_panNumber.Text;
         ptr.postalcode      = betterTextBox10_postalcode.Text;
         ptr.email           = betterTextBox3_email.Text;
         ptr.due             = Convert.ToDecimal(betterTextBox12_deu.Text);
         ptr.advance         = Convert.ToDecimal(betterTextBox13_advance.Text);
         db.Entry(ptr).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
     }
 }