// UTILITIES M_Utilities SetUtilityObj(string [] values) { M_Utilities NewUtility = new M_Utilities(); NewUtility.supplier = values[0]; NewUtility.type = values[1]; NewUtility.units = Int32.Parse(values[2]); NewUtility.price = Int32.Parse(values[3]); return(NewUtility); }
private void button3_Click(object sender, EventArgs e) { if (textBox3.Text != "") { int id; id = Int32.Parse(textBox3.Text); M_Utilities ut = new M_Utilities(); ut.Delete("Utilities", id, "UtilityID"); } else { MessageBox.Show("Enter ID"); } }
void EditUtility(string[] ss) { M_Utilities NewUtil = SetUtilityObj(ss); NewUtil.updateuser2("Utilities", id, this.atts, ss, "UtilityID"); }
void AddUtility(string[] ss) { M_Utilities NewUtil = SetUtilityObj(ss); NewUtil.ADD("Utilities", this.atts, ss); }