private void btnSave_Click(object sender, EventArgs e) { try { if (ValidateForm()) { ExpenseHead.ExpenseHeadWebService objWebService = new ExpenseHead.ExpenseHeadWebService(); ExpenseHeadInfo objInfo = new ExpenseHeadInfo(); objInfo.ExpenseHead = txtExpenseTitle.Text; objInfo.AddedBy = GetLoginUser.UserName; objWebService.ExpenseHeadAdd(objInfo, TokenCleintEncrypt.Encrypt(ClientTokenBuilder.BuildTokens())); txtExpenseTitle.Text = string.Empty; MessageBox.Show("Expense Title Added Successfully"); this.DialogResult = DialogResult.OK; } } catch(Exception ex) { throw ex; } }
/// <remarks/> public void ExpenseHeadUpdateAsync(ExpenseHeadInfo objInfo, string token) { this.ExpenseHeadUpdateAsync(objInfo, token, null); }
/// <remarks/> public void ExpenseHeadUpdateAsync(ExpenseHeadInfo objInfo, string token, object userState) { if ((this.ExpenseHeadUpdateOperationCompleted == null)) { this.ExpenseHeadUpdateOperationCompleted = new System.Threading.SendOrPostCallback(this.OnExpenseHeadUpdateOperationCompleted); } this.InvokeAsync("ExpenseHeadUpdate", new object[] { objInfo, token}, this.ExpenseHeadUpdateOperationCompleted, userState); }
public bool ExpenseHeadUpdate(ExpenseHeadInfo objInfo, string token) { object[] results = this.Invoke("ExpenseHeadUpdate", new object[] { objInfo, token}); return ((bool)(results[0])); }