protected void SaveButton_Click(object sender, EventArgs e) { if (EmriTextBox.Text.Length == 0) { lblError.Visible = true; EmriTextBox.Focus(); return; } else if (LokacioniTextBox.Text.Length == 0) { lblError.Visible = true; LokacioniTextBox.Focus(); return; } else if (NrKontaktuesTextBox.Text.Length == 0) { lblError.Visible = true; NrKontaktuesTextBox.Focus(); return; } else if (BankAccountTextBox.Text.Length == 0) { lblError.Visible = true; BankAccountTextBox.Focus(); return; } else { BLL.Vendori obj = new BLL.Vendori(); obj.Emri = EmriTextBox.Text; obj.Lokacioni = LokacioniTextBox.Text; obj.NrKontaktues = int.Parse(NrKontaktuesTextBox.Text); obj.BankAccount = int.Parse(BankAccountTextBox.Text); VendoriMapper objm = new VendoriMapper(obj); objm.Insert(); Response.Redirect("Index.aspx"); } }