private void UbahTSB_Click(object sender, EventArgs e) { mcustvend K = new mcustvend(); K.CUSTVENDCODE = txtCustVendCode.Text; K.NAME = txtName.Text; K.TYPE = txtType.Text; K.ACTIVE = Convert.ToInt32(txtActive.Text); //K.DATE= K.CONTACTPERSON = txtContactPerson.Text; K.CONTACTTITLE = txtContactTitle.Text; K.ADDRESS = txtAddress.Text; K.CITY = txtCity.Text; K.ZIPCODE = txtZipCode.Text; K.COUNTRY = txtCountry.Text; K.HP = txtHP.Text; K.PHONE = txtPhone.Text; K.FAX = txtFax.Text; if (new mcustvendCRUD().updateData(K)) { MessageBox.Show("Update Sukses"); Binding(); } else { MessageBox.Show("Update tidak berhasil"); } }
private void SimpanTSB_Click(object sender, EventArgs e) { mcustvend K = new mcustvend(); K.CUSTVENDCODE = txtCustVendCode.Text; K.NAME = txtName.Text; K.TYPE = txtType.Text; K.ACTIVE = Convert.ToInt32(txtActive.Text); //K.DATE= K.CONTACTPERSON = txtContactPerson.Text; K.CONTACTTITLE = txtContactTitle.Text; K.ADDRESS = txtAddress.Text; K.CITY = txtCity.Text; K.ZIPCODE = txtZipCode.Text; K.COUNTRY = txtCountry.Text; K.HP = txtHP.Text; K.PHONE = txtPhone.Text; K.FAX = txtFax.Text; //K.REMARKS=txtre //K.TAX= //K.CURRENCYID= //K.NPWP= //K.NPKP= if (new mcustvendCRUD().insertData(K)) { MessageBox.Show("Data berhasil di tambahkan"); Binding(); } else { MessageBox.Show("Data gagal ditambahkan"); } }