示例#1
0
        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();
            }
        }
示例#2
0
        private void ListStdnarration_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Administration.List.StdnarrationList frmList = new Administration.List.StdnarrationList();
            frmList.StartPosition = FormStartPosition.CenterScreen;

            frmList.ShowDialog();
        }
示例#3
0
        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();
            }
        }