Exemple #1
0
        protected override int Save( )
        {
            gridView1.CloseEditor( );
            gridView1.UpdateCurrentRow( );

            if (check( ) == false)
            {
                return(0);
            }

            result = _bll.Save(tableView, idxList);
            if (result)
            {
                XtraMessageBox.Show("成功保存");
                idxList.Clear( );
                Query( );
                saveTool( );
                toolPrint.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
            }
            else
            {
                XtraMessageBox.Show("保存失败");
            }

            return(base.Save( ));
        }
Exemple #2
0
        protected override int Save( )
        {
            if (checkTable( ) == false)
            {
                return(0);
            }

            if (state.Equals("add"))
            {
                result = _bll.Save(tableView, txtRAA001.Text, txtDEL013.Text);
            }
            else if (state.Equals("edit"))
            {
                result = _bll.Update(tableView, txtRAA001.Text, idxList, txtDEL013.Text);
            }

            if (result)
            {
                XtraMessageBox.Show("成功保存");
                saveTool( );
                controlUnEnable( );
                idxList.Clear( );
                toolPrint.Visibility  = DevExpress.XtraBars.BarItemVisibility.Always;
                toolExport.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
            }
            else
            {
                XtraMessageBox.Show("保存失败");
            }

            return(base.Save( ));
        }
Exemple #3
0
        protected override int Save( )
        {
            if (checkTable( ) == false)
            {
                return(0);
            }

            model.DEL017 = txtRAA001.Text;


            if (state.Equals("add"))
            {
                result = _bll.Save(tableView, txtDEL013.Text, txtRAA001.Text, txtDEA002.Text, txtRAA015.Text, txtDEL018.Text);
            }
            else if (state.Equals("edit"))
            {
                result = _bll.Update(tableView, txtDEL015.Text, idxList, txtDEL013.Text, txtRAA001.Text, txtDEA002.Text, txtRAA015.Text, txtDEL018.Text);
            }

            if (result)
            {
                XtraMessageBox.Show("成功保存");
                saveTool( );
                controlUnEnable( );
                idxList.Clear( );
                toolPrint.Visibility  = DevExpress.XtraBars.BarItemVisibility.Always;
                toolExport.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
                btn.Text    = "审核";
                btn.Enabled = true;

                strWhere  = "1=1";
                strWhere += " AND DEL015='" + txtDEL015.Tag + "'";
                tableView = _bll.getTableView(strWhere);
                gridControl1.DataSource = tableView;

                DataTable tableOdd = _bll.getOddTable( );
                txtDEL015.Properties.DataSource    = tableOdd;
                txtDEL015.Properties.DisplayMember = "DEL015";
                txtDEL015.Properties.ValueMember   = "DEL015";
                txtDEL015.Text = txtDEL015.Tag == null ? string.Empty : txtDEL015.Tag.ToString( );

                strW       = "1=1";
                strW       = " AND IBB015='N' AND IBB023='T' ";//AND IBB965=''
                tableQuery = _bll.getTableQuery(strW);
                txtRAA001.Properties.DataSource    = tableQuery;
                txtRAA001.Properties.DisplayMember = "IBB001";
                txtRAA001.Properties.ValueMember   = "IBB001";

                txtRAA001.EditValue = model.DEL017;

                //Query ( );
            }
            else
            {
                XtraMessageBox.Show("保存失败");
            }

            return(base.Save( ));
        }