示例#1
0
        private bool move()
        {
            temp = newRec;
            if (checkForms())
            {
                if (!temp)
                {
                    context.Refresh(System.Data.Entity.Core.Objects.RefreshMode.StoreWins, (LOOKUP)LookupBindingSource.Current);
                }

                newRec   = false;
                modified = false;
                return(true);
            }
            return(false);
        }
示例#2
0
 private bool move()
 {
     GridViewBusTable.CloseEditor();
     ImageComboBoxEditCode.Focus();
     // bindingNavigatorPositionItem.Focus();//trigger field leave event
     temp = newRec;
     if (checkForms())
     {
         if (!temp)
         {
             context.Refresh(System.Data.Entity.Core.Objects.RefreshMode.StoreWins, ( BUSTABLE)BusTableBindingSource.Current);
         }
         newRec   = false;
         modified = false;
         return(true);
     }
     return(false);
 }
示例#3
0
 private bool move()
 {
     ImageComboBoxEditCode.Focus();
     // bindingNavigatorPositionItem.Focus();//trigger field leave event
     temp = newRec;
     if (checkForms())
     {
         if (!temp)
         {
             context.Refresh(System.Data.Entity.Core.Objects.RefreshMode.StoreWins, ( CARRATES)CarRateBindingSource.Current);
         }
         sTART_DATEDateEdit.Properties.ReadOnly = true;
         setReadOnly(true);
         newRec   = false;
         modified = false;
         return(true);
     }
     return(false);
 }
示例#4
0
        private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
        {
            GridViewCompany.ClearColumnsFilter();
            if (CompanyBindingSource.Current == null)
            {
                //fake query in order to create a link between the database table and the binding source
                CompanyBindingSource.DataSource = from opt in context.COMPANY where opt.CODE == "KJM9" select opt;
                CompanyBindingSource.AddNew();
                if (GridViewCompany.FocusedRowHandle == GridControl.AutoFilterRowHandle)
                {
                    GridViewCompany.FocusedRowHandle = GridViewCompany.RowCount - 1;
                }
                setValues();
                cODETextEdit.Focus();
                cODETextEdit.Properties.ReadOnly = false;
                GridViewCompany.Columns.ColumnByName(colName).OptionsColumn.AllowEdit = true;
                newRec = true;
                return;
            }

            cODETextEdit.Focus();

            //  bindingNavigatorPositionItem.Focus();  //trigger field leave event
            GridViewCompany.CloseEditor();
            temp = newRec;
            if (checkForms())
            {
                if (!temp)
                {
                    context.Refresh(System.Data.Entity.Core.Objects.RefreshMode.StoreWins, ( COMPANY)CompanyBindingSource.Current);
                }
                CompanyBindingSource.AddNew();
                if (GridViewCompany.FocusedRowHandle == GridControl.AutoFilterRowHandle)
                {
                    GridViewCompany.FocusedRowHandle = GridViewCompany.RowCount - 1;
                }
                setValues();
                cODETextEdit.Focus();
                cODETextEdit.Properties.ReadOnly = false;
                GridViewCompany.Columns.ColumnByName(colName).OptionsColumn.AllowEdit = true;
                newRec = true;
            }
        }
示例#5
0
        private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
        {
            GridViewInsuran.ClearColumnsFilter();
            if (InsuranBindingSource.Current == null)
            {
                //fake query in order to create a link between the database table and the binding source
                InsuranBindingSource.DataSource = from opt in context.INSURAN where opt.AGENCY == "KJM9" select opt;

                InsuranBindingSource.AddNew();
                if (GridViewInsuran.FocusedRowHandle == GridControl.AutoFilterRowHandle)
                {
                    GridViewInsuran.FocusedRowHandle = GridViewInsuran.RowCount - 1;
                }
                setValues();
                setReadOnly(false);
                yEARComboBoxEdit.Focus();
                newRec = true;
                return;
            }
            yEARComboBoxEdit.Focus();
            //bindingNavigatorPositionItem.Focus();  //trigger field leave event
            GridViewInsuran.CloseEditor();
            temp = newRec;
            if (checkForms())
            {
                if (!temp)
                {
                    context.Refresh(System.Data.Entity.Core.Objects.RefreshMode.StoreWins, ( INSURAN)InsuranBindingSource.Current);
                }
                InsuranBindingSource.AddNew();
                if (GridViewInsuran.FocusedRowHandle == GridControl.AutoFilterRowHandle)
                {
                    GridViewInsuran.FocusedRowHandle = GridViewInsuran.RowCount - 1;
                }
                setValues();
                setReadOnly(false);
                yEARComboBoxEdit.Focus();


                newRec = true;
            }
        }
示例#6
0
 private bool move()
 {
     GridViewCarOff.CloseEditor();
     ImageComboBoxEditCode.Focus();
     // bindingNavigatorPositionItem.Focus();//trigger field leave event
     temp = newRec;
     if (checkForms())
     {
         errorProvider1.Clear();
         if (!temp)
         {
             context.Refresh(System.Data.Entity.Core.Objects.RefreshMode.StoreWins, ( CAROFF)CarOffBindingSource.Current);
         }
         setReadOnly(true);
         newRec   = false;
         modified = false;
         return(true);
     }
     return(false);
 }
示例#7
0
 private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
 {
     GridViewConsrt.ClearColumnsFilter();
     if (ConsrtBindingSource.Current == null)
     {
         //fake query in order to create a link between the database table and the binding source
         ConsrtBindingSource.DataSource = from opt in context.CONSRT where opt.CODE == "KJM9" select opt;
         ConsrtBindingSource.AddNew();
         if (GridViewConsrt.FocusedRowHandle == GridControl.AutoFilterRowHandle)
         {
             GridViewConsrt.FocusedRowHandle = GridViewConsrt.RowCount - 1;
         }
         cODETextEdit.Focus();
         cODETextEdit.Properties.ReadOnly = false;
         GridViewConsrt.Columns.ColumnByName(colName).OptionsColumn.AllowEdit = true;
         newRec = true;
         return;
     }
     cODETextEdit.Focus();
     // bindingNavigatorPositionItem.Focus();  //trigger field leave event
     GridViewConsrt.CloseEditor();
     temp = newRec;
     //if (validCheck.saveRoutine(cONSRTBindingSource, cONSRTBindingNavigator, context, errorProvider1, ref newRec, ref modified, (( CONSRT)cONSRTBindingSource.Current).checkAll, splitContainerControl1.Panel2.Controls, validCheck.dummy))
     if (checkForms())
     {
         errorProvider1.Clear();
         if (!temp)
         {
             context.Refresh(System.Data.Entity.Core.Objects.RefreshMode.StoreWins, ( CONSRT)ConsrtBindingSource.Current);
         }
         ConsrtBindingSource.AddNew();
         if (GridViewConsrt.FocusedRowHandle == GridControl.AutoFilterRowHandle)
         {
             GridViewConsrt.FocusedRowHandle = GridViewConsrt.RowCount - 1;
         }
         cODETextEdit.Focus();
         cODETextEdit.Properties.ReadOnly = false;
         GridViewConsrt.Columns.ColumnByName(colName).OptionsColumn.AllowEdit = true;
         newRec = true;
     }
 }
示例#8
0
 private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
 {
     GridViewDept.ClearColumnsFilter();
     if (DeptBindingSource.Current == null)
     {
         //fake query in order to create a link between the database table and the binding source
         DeptBindingSource.AddNew();
         if (GridViewDept.FocusedRowHandle == GridControl.AutoFilterRowHandle)
         {
             GridViewDept.FocusedRowHandle = GridViewDept.RowCount - 1;
         }
         //setValues();
         codeTextBox.Focus();
         setReadOnly(false);
         // lockGrid(false);
         newRec = true;
         return;
     }
     codeTextBox.Focus();
     //bindingNavigatorPositionItem.Focus();  //trigger field leave event
     GridViewDept.CloseEditor();
     temp = newRec;
     if (checkForms())
     {
         if (!temp)
         {
             context.Refresh(System.Data.Entity.Core.Objects.RefreshMode.StoreWins, (Dept)DeptBindingSource.Current);
         }
         DeptBindingSource.AddNew();
         if (GridViewDept.FocusedRowHandle == GridControl.AutoFilterRowHandle)
         {
             GridViewDept.FocusedRowHandle = GridViewDept.RowCount - 1;
         }
         //  setValues();
         codeTextBox.Focus();
         setReadOnly(false);
         //  lockGrid(false);
         newRec = true;
     }
     //////////////////////
 }
示例#9
0
        private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
        {
            GridViewAirport.ClearColumnsFilter();
            codeTextEdit.Focus();
            if (AirportBindingSource.Current == null)
            {
                //fake query in order to create a link between the database table and the binding source
                AirportBindingSource.DataSource = from opt in context.Airport where opt.Code == "KJM9" select opt;
                AirportBindingSource.AddNew();
                if (GridViewAirport.FocusedRowHandle == GridControl.AutoFilterRowHandle)
                {
                    GridViewAirport.FocusedRowHandle = GridViewAirport.RowCount - 1;
                }

                codeTextEdit.Focus();
                setReadOnly(false);
                newRec = true;
                setValues();
                return;
            }

            GridViewAirport.CloseEditor();
            temp = newRec;
            if (checkForms())
            {
                if (!temp)
                {
                    context.Refresh(System.Data.Entity.Core.Objects.RefreshMode.StoreWins, ( Airport)AirportBindingSource.Current);
                }

                AirportBindingSource.AddNew();
                if (GridViewAirport.FocusedRowHandle == GridControl.AutoFilterRowHandle)
                {
                    GridViewAirport.FocusedRowHandle = GridViewAirport.RowCount - 1;
                }
                setValues();
                codeTextEdit.Focus();
                setReadOnly(false);
                newRec = true;
            }
        }
示例#10
0
 private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
 {
     GridViewAirOff.ClearColumnsFilter();
     if (AirOffBindingSource.Current == null)
     {
         //fake query in order to create a link between the database table and the binding source
         AirOffBindingSource.DataSource = from opt in context.AIROFF where opt.CODE == "KJM9" select opt;
         AirOffBindingSource.AddNew();
         if (GridViewAirOff.FocusedRowHandle == GridControl.AutoFilterRowHandle)
         {
             GridViewAirOff.FocusedRowHandle = GridViewAirOff.RowCount - 1;
         }
         setValues();
         ImageComboBoxEditAir.Focus();
         setReadOnly(false);
         newRec = true;
         return;
     }
     ImageComboBoxEditAir.Focus();
     // bindingNavigatorPositionItem.Focus();  //trigger field leave event
     GridViewAirOff.CloseEditor();
     temp = newRec;
     if (checkForms())
     {
         errorProvider1.Clear();
         if (!temp)
         {
             context.Refresh(System.Data.Entity.Core.Objects.RefreshMode.StoreWins, ( AIROFF)AirOffBindingSource.Current);
         }
         AirOffBindingSource.AddNew();
         if (GridViewAirOff.FocusedRowHandle == GridControl.AutoFilterRowHandle)
         {
             GridViewAirOff.FocusedRowHandle = GridViewAirOff.RowCount - 1;
         }
         setValues();
         ImageComboBoxEditAir.Focus();
         setReadOnly(false);
         newRec = true;
     }
 }