private void okbtn_Click(object sender, RoutedEventArgs e) { if (f.CheckForInternetConnection()) { if (logolink.Text != "") { this.com.setCompnayLogo(logolink.Text); f.comit_company(this.com); MessageBox.Show("בוצע בהצלחה"); compnaymanage win = new compnaymanage(com, use); win.Show(); this.Close(); } else { MessageBox.Show("לא ניתן להשאיר שדה ריק"); } } else { MessageBox.Show("אין חיבור לאינטרנט"); } }
private void okbtn_Click(object sender, RoutedEventArgs e) { if (f.CheckForInternetConnection()) { if (companynametb.Text != "" && companylogotbt.Text != "") { disableallbtns(); f.define_project_base("https://ana10project.firebaseio.com"); int mone = f.num_of_mone("company", "mone"); int moneForNew = mone + 1; if (editorregisetr == 1) { com = new company(moneForNew, companynametb.Text, companylogotbt.Text); } else { com.setCompnayLogo(companylogotbt.Text); com.setCompnayName(companynametb.Text); } f.comit_company(this.com); if (editorregisetr == 1) { string value = "{\"mone\":" + moneForNew + "}"; f.commit("company/", value); } MessageBox.Show("בוצע בהצלחה!"); superuser win = new superuser(); win.Show(); this.Close(); } } else { MessageBox.Show("אין חיבור לאינטרנט"); } }