示例#1
0
        private void btnOk_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (BsfGlobal.FindPermission("Incentive Details-Add") == false)
            {
                MessageBox.Show("You don't have Rights to Incentive Details-Add");
                return;
            }
            grdIGView.FocusedRowHandle = grdIGView.FocusedRowHandle + 1;
            if (DEDate.EditValue == null)
            {
                return;
            }
            if (DETo.EditValue == null)
            {
                return;
            }

            IncGenBO.DE_Date       = Convert.ToDateTime(DEDate.EditValue.ToString());
            IncGenBO.DE_From       = Convert.ToDateTime(DEFrom.EditValue.ToString());
            IncGenBO.DE_To         = Convert.ToDateTime(DETo.EditValue.ToString());
            IncGenBO.s_RefNo       = txtRefNo.Text;
            IncGenBO.s_Narration   = txtNarration.Text;
            IncGenBO.d_TotalAmount = Convert.ToDecimal(CommFun.IsNullCheck(grdIGView.Columns["Amount"].SummaryText.ToString(), CommFun.datatypes.vartypenumeric));

            if (s_mName == "A")
            {
                IncentiveDL.InsertIncGen("A", IncGenBO);
                InsertIncentiveTrans();
                Close();
            }
            else
            {
                IncentiveDL.InsertIncGen("E", IncGenBO);
                InsertIncentiveTrans();

                bar1.Visible = false;
                bar3.Visible = false;
                panelControl1.Controls.Clear();
                frmIncentiveDetails frmID = new frmIncentiveDetails()
                {
                    TopLevel = false, FormBorderStyle = FormBorderStyle.None, Dock = DockStyle.Fill
                };
                panelControl1.Controls.Add(frmID);
                frmID.Show();
            }
        }
示例#2
0
 public static int InsertIncGen(string argMode, IncentiveBO IncGenBO)
 {
     return(IncentiveDL.InsertIncGen(argMode, IncGenBO));
 }