private void btnUpdate_Click(object sender, EventArgs e) { if (tbxNarration.Text.Equals(string.Empty)) { MessageBox.Show("Std.Narration can not be blank!"); return; } StdNarrationMasterModel objModel = new StdNarrationMasterModel(); objModel.Narration = tbxNarration.Text.Trim(); objModel.Vouchertype = cbxVouchertype.SelectedItem.ToString(); objModel.Narration2 = tbxNarration2.Text.Trim() == string.Empty ? string.Empty : tbxNarration2.Text.Trim(); objModel.SN_Id = StdId; bool isSuccess = objstdNrr.UpdateStdNarration(objModel); if (isSuccess) { MessageBox.Show("Update Successfully!"); ClearControls(); StdId = 0; Administration.List.StdnarrationList frmList = new Administration.List.StdnarrationList(); frmList.StartPosition = FormStartPosition.CenterScreen; frmList.ShowDialog(); cbxVouchertype.Focus(); FillStdNarrationInfo(); } }
private void ListStdnarration_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e) { Administration.List.StdnarrationList frmList = new Administration.List.StdnarrationList(); frmList.StartPosition = FormStartPosition.CenterScreen; frmList.ShowDialog(); }
private void btnDelete_Click(object sender, EventArgs e) { bool isDelete = objstdNrr.DeletStdNarration(StdId); if (isDelete) { MessageBox.Show("Delete Successfully!"); ClearControls(); StdId = 0; Administration.List.StdnarrationList frmList = new Administration.List.StdnarrationList(); frmList.StartPosition = FormStartPosition.CenterScreen; frmList.ShowDialog(); FillStdNarrationInfo(); cbxVouchertype.Focus(); } }