private void btnSave_Click(object sender, EventArgs e) { DAL.clsPaymentMethod pm = new DAL.clsPaymentMethod(); int er = 0; er += TxtName.txtValidate(); if (er == 0) { pm.Name = TxtName.txtTextValue; pm.Company = txtCompany.txtTextValue; if (pm.Insert()) { MessageBox.Show("New Payment Methode is Inserted !!"); TxtName.txtTextValue = ""; txtCompany.txtTextValue = ""; } else { MessageBox.Show(pm.Error); } } }