void AddUpateBank() { try { ep1.Clear(); if (string.IsNullOrEmpty(cmbEmployee.Text.Trim())) { ep1.SetError(cmbEmployee, "Name is Required.."); cmbEmployee.Focus(); return; } if (string.IsNullOrEmpty(txtAmount.Text.Trim())) { ep1.SetError(txtAmount, "Amount is Required.."); txtAmount.Focus(); return; } int T14_WORKERID = 0, TM04_BANKID = 0; decimal dT14_AMOUNT = 0; int.TryParse(cmbEmployee.SelectedValue.ToString(), out T14_WORKERID); decimal.TryParse(txtAmount.Text.Trim(), out dT14_AMOUNT); MyDa = new MyDabaseDataContext(Properties.Settings.Default.Style_King_Dev); int?Iout = 0; MyDa.USP_VP_ADDUPDATE_LOAN(Datalayer.iT15_LOANID, T14_WORKERID, dtpDate.Value, dT14_AMOUNT, txtDetails.Text.Trim(), Datalayer.iT001_COMPANYID, ref Iout); if (Iout > 0) { if (Datalayer.iT15_LOANID == 0) { Datalayer.InsertMessageBox(sPageName); } else { Datalayer.UpdateMessageBox(sPageName); } } else { if (Datalayer.iT15_LOANID == 0) { Datalayer.DosenotInsertMessageBox(sPageName); } else { Datalayer.DosenotUpdateMessageBox(sPageName); } } ResetData(); } catch (Exception ex) { Datalayer.WorningMessageBox(ex.Message.ToString(), "Error"); } }