Ejemplo n.º 1
0
        //private 任务Dao m_rwDao = new 任务Dao();

        private void 进口箱批量任务录入_Load(object sender, EventArgs e)
        {
            m_暂存区Grid = base.AssociateArchiveGrid(pnl暂存区, "任务备案_进口箱批量任务录入_暂存区") as ArchiveUnboundGrid;
            m_cm      = m_暂存区Grid.ControlManager as IWindowControlManager <进口票>;

            m_显示区Grid = MyTemplateForm.AssociateArchiveDetailGrid(pnl显示区, "任务备案_进口箱批量任务录入_显示区", m_cm, m_cm.Dao as IRelationalDao) as ArchiveUnboundGrid;
            m_cm2     = m_显示区Grid.ControlManager as IWindowControlManager <任务>;

            base.AssociateDataControls(new Control[] {
                pnl任务性质, pnl转关箱标志, pnl委托人, pnl委托时间, pnl委托联系人,
                pnl船名, pnl航次, pnl提箱时间要求, pnl还箱进港时间要求,
                pnl备注, pnl总箱量, pnl提单号, pnl提示性箱号, pnl箱属船公司
            }, m_cm.DisplayManager, m_gridName);

            m_cm.StateControls.Add(new StateControl(btn新增任务, true));
            m_cm.StateControls.Add(new StateControl(btn暂存待确认, false));
            m_cm.StateControls.Add(new StateControl(btn删除, StateType.View));
            m_cm.StateControls.Add(new StateControl(btn修改, StateType.View));
            m_cm.StateControls.Add(new StateControl(btn预录入发送, false));
            m_cm.StateControls.Add(new StateControl(btn网上导入, false));

            m_cm.DisplayManager.DataControls["委托人编号"].SelectedDataValueChanged += new EventHandler(任务预备案_委托人编号_SelectedDataValueChanged);

            //MyTemplateForm.RestrictToUserAccess(m_cm.DisplayManager.SearchManager, "备案主管");

            RemoveGridValidations();

            m_cm.DisplayManager.PositionChanging += new Feng.CancelEventHandler(DisplayManager_PositionChanging);
            m_cm.DisplayManager.PositionChanged  += new EventHandler(DisplayManager_PositionChanged);

            Helper.SetGridDefault(this, m_暂存区Grid);

            m_cm.DisplayManager.SearchManager.LoadData();
        }
Ejemplo n.º 2
0
        private void 备案确认情况查询_Load(object sender, EventArgs e)
        {
            m_信息区Grid = base.AssociateArchiveGrid(pnl信息区, "查询统计_备案确认情况查询") as ArchiveUnboundGrid;
            m_信息区Grid.DataRowTemplate.Cells["预录入号"].DoubleClick += new EventHandler(备案确认情况查询_DoubleClick);

            m_信息区Grid.ChangeControlPositionAccordColumn(lbl反馈区, "任务号");

            Helper.SetGridDefault(this, m_信息区Grid);
        }
        ///// <summary>
        /////
        ///// </summary>
        ///// <param name="dataSource"></param>
        ///// <param name="dataMember"></param>
        //public override void SetDataBinding(object dataSource, string dataMember)
        //{
        //    base.SetDataBinding(dataSource, dataMember);

        //    ArchiveUnboundGrid.SetGridRowCellProperties(this);
        //}

        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void row_Saving(object sender, System.ComponentModel.CancelEventArgs e)
        {
            Xceed.Grid.CellRow row = (Xceed.Grid.CellRow)sender;

            ArchiveUnboundGrid.SaveRowValues(row, row.ParentGrid as ArchiveUnboundDetailGrid);

            e.Cancel = (this.ControlManager.State != StateType.View);

            if (e.Cancel)
            {
                this.ControlManager.CancelEdit();
            }
        }
Ejemplo n.º 4
0
        //private 任务Dao m_rwDao = new 任务Dao();

        private void 进口箱批量任务录入_Load(object sender, EventArgs e)
        {
            m_暂存区Grid = base.AssociateArchiveGrid(pnl暂存区, "任务备案_进口箱批量任务确认_暂存区") as ArchiveUnboundGrid;
            m_cm      = m_暂存区Grid.ControlManager as IWindowControlManager <进口票>;

            m_显示区Grid = MyTemplateForm.AssociateArchiveDetailGrid(pnl显示区, "任务备案_进口箱批量任务确认_显示区", m_cm, m_cm.Dao as IRelationalDao) as ArchiveUnboundGrid;
            m_cm2     = m_显示区Grid.ControlManager as IWindowControlManager <任务>;

            base.AssociateDataControls(new Control[] {
                pnl任务性质, pnl转关箱标志, pnl委托人, pnl委托时间, pnl委托联系人, pnl提单号,
                pnl船名, pnl航次, pnl提箱时间要求, pnl还箱进港时间要求,
                pnl备注, pnl总箱量, pnl提单号, pnl箱属船公司
            }, m_cm.DisplayManager, m_gridName);

            m_cm.StateControls.Add(new StateControl(btn修改, StateType.View));
            m_cm.StateControls.Add(new StateControl(btn拒绝, StateType.View));
            m_cm.StateControls.Add(new StateControl(btn放弃, false));
            m_cm.StateControls.Add(new StateControl(btn备案确认, StateType.View | StateType.Add | StateType.Edit));

            m_cm.DisplayManager.DataControls["委托人编号"].SelectedDataValueChanged += new EventHandler(任务预备案_委托人编号_SelectedDataValueChanged);

            m_cm.DisplayManager.PositionChanging += new Feng.CancelEventHandler(DisplayManager_PositionChanging);
            m_cm.DisplayManager.PositionChanged  += new EventHandler(DisplayManager_PositionChanged);

            Helper.SetGridDefault(this, m_暂存区Grid);

            if (m_提单号 == null)
            {
                m_cm.DisplayManager.SearchManager.LoadData();
            }
            else
            {
                btn修改.Enabled = false;
                m_cm.DisplayManager.SearchManager.AdditionalSearchExpression = null;
                m_cm.DisplayManager.SearchManager.LoadData(SearchExpression.Eq("提单号", m_提单号), null);
            }
        }
        private void 任务正式备案_Load(object sender, EventArgs e)
        {
            m_rightGrid = base.AssociateArchiveGrid(pnl任务预备案信息区, m_gridName) as ArchiveUnboundGrid;

            m_cm = m_rightGrid.ControlManager as IWindowControlManager;
            m_rightGrid.DataRowTemplate.Cells["预录入号"].DoubleClick += new EventHandler(任务正式备案_DoubleClick);
            m_rightGrid.DataRowTemplate.Cells["确认"].DoubleClick += new EventHandler(任务正式备案_DoubleClick);
            m_rightGrid.DataRowTemplate.Cells["拒绝"].DoubleClick += new EventHandler(任务正式备案_DoubleClick);

            m_rightGrid.ChangeControlPositionAccordColumn(lbl备案确认区, "确认");
            m_rightGrid.ChangeControlPositionAccordColumn(btn批量确认, "确认");

            Helper.SetGridDefault(this, m_rightGrid);

            m_cm.DisplayManager.SearchManager.LoadData();
        }
        //private 任务Dao m_rwDao = new 任务Dao();
        private void 进口箱批量任务录入_Load(object sender, EventArgs e)
        {
            m_暂存区Grid = base.AssociateArchiveGrid(pnl暂存区, "任务备案_进口箱批量任务录入_暂存区") as ArchiveUnboundGrid;
            m_cm = m_暂存区Grid.ControlManager as IWindowControlManager<进口票>;

            m_显示区Grid = MyTemplateForm.AssociateArchiveDetailGrid(pnl显示区, "任务备案_进口箱批量任务录入_显示区", m_cm, m_cm.Dao as IRelationalDao) as ArchiveUnboundGrid;
            m_cm2 = m_显示区Grid.ControlManager as IWindowControlManager<任务>;

            base.AssociateDataControls(new Control[] {
                pnl任务性质, pnl转关箱标志, pnl委托人, pnl委托时间, pnl委托联系人,
                pnl船名, pnl航次,pnl提箱时间要求, pnl还箱进港时间要求,
                pnl备注, pnl总箱量, pnl提单号, pnl提示性箱号, pnl箱属船公司 }, m_cm.DisplayManager, m_gridName);

            m_cm.StateControls.Add(new StateControl(btn新增任务, true));
            m_cm.StateControls.Add(new StateControl(btn暂存待确认, false));
            m_cm.StateControls.Add(new StateControl(btn删除, StateType.View));
            m_cm.StateControls.Add(new StateControl(btn修改, StateType.View));
            m_cm.StateControls.Add(new StateControl(btn预录入发送, false));
            m_cm.StateControls.Add(new StateControl(btn网上导入, false));

            m_cm.DisplayManager.DataControls["委托人编号"].SelectedDataValueChanged += new EventHandler(任务预备案_委托人编号_SelectedDataValueChanged);

            //MyTemplateForm.RestrictToUserAccess(m_cm.DisplayManager.SearchManager, "备案主管");

            RemoveGridValidations();

            m_cm.DisplayManager.PositionChanging += new Feng.CancelEventHandler(DisplayManager_PositionChanging);
            m_cm.DisplayManager.PositionChanged += new EventHandler(DisplayManager_PositionChanged);

            Helper.SetGridDefault(this, m_暂存区Grid);

            m_cm.DisplayManager.SearchManager.LoadData();
        }
 private void m_cm_ListChanged(object sender, ListChangedEventArgs e)
 {
     ArchiveUnboundGrid.OnListChanged(e, this);
 }
Ejemplo n.º 8
0
 private void 车辆报停启用登记_Load(object sender, EventArgs e)
 {
     m_信息区Grid = base.AssociateArchiveGrid(pnl信息区, "车队级调度_车辆报停启用") as ArchiveUnboundGrid;
     Helper.SetGridDefault(this, m_信息区Grid);
 }
        //private 任务Dao m_rwDao = new 任务Dao();
        private void 进口箱批量任务录入_Load(object sender, EventArgs e)
        {
            m_暂存区Grid = base.AssociateArchiveGrid(pnl暂存区, "任务备案_进口箱批量任务确认_暂存区") as ArchiveUnboundGrid;
            m_cm = m_暂存区Grid.ControlManager as IWindowControlManager<进口票>;

            m_显示区Grid = MyTemplateForm.AssociateArchiveDetailGrid(pnl显示区, "任务备案_进口箱批量任务确认_显示区", m_cm, m_cm.Dao as IRelationalDao) as ArchiveUnboundGrid;
            m_cm2 = m_显示区Grid.ControlManager as IWindowControlManager<任务>;

            base.AssociateDataControls(new Control[] {
                pnl任务性质, pnl转关箱标志, pnl委托人, pnl委托时间, pnl委托联系人, pnl提单号,
                pnl船名,pnl航次, pnl提箱时间要求, pnl还箱进港时间要求,
                pnl备注, pnl总箱量, pnl提单号, pnl箱属船公司 }, m_cm.DisplayManager, m_gridName);

            m_cm.StateControls.Add(new StateControl(btn修改, StateType.View));
            m_cm.StateControls.Add(new StateControl(btn拒绝, StateType.View));
            m_cm.StateControls.Add(new StateControl(btn放弃, false));
            m_cm.StateControls.Add(new StateControl(btn备案确认, StateType.View | StateType.Add | StateType.Edit));

            m_cm.DisplayManager.DataControls["委托人编号"].SelectedDataValueChanged += new EventHandler(任务预备案_委托人编号_SelectedDataValueChanged);

            m_cm.DisplayManager.PositionChanging += new Feng.CancelEventHandler(DisplayManager_PositionChanging);
            m_cm.DisplayManager.PositionChanged += new EventHandler(DisplayManager_PositionChanged);

            Helper.SetGridDefault(this, m_暂存区Grid);

            if (m_提单号 == null)
            {
                m_cm.DisplayManager.SearchManager.LoadData();
            }
            else
            {
                btn修改.Enabled = false;
                m_cm.DisplayManager.SearchManager.AdditionalSearchExpression = null;
                m_cm.DisplayManager.SearchManager.LoadData(SearchExpression.Eq("提单号", m_提单号), null);
            }
        }
Ejemplo n.º 10
0
        private void 任务正式备案二_Load(object sender, EventArgs e)
        {
            m_rightGrid = base.AssociateArchiveGrid(pnl请求区, "任务备案_任务正式备案二") as ArchiveUnboundGrid;
            m_cm = m_rightGrid.ControlManager as IWindowControlManager;
            m_cmT = m_cm as IWindowControlManager<任务>;

            MyTemplateForm.AddControl(pnl备案明细窗体, new 备案明细窗体(m_cm, m_gridName));
            base.AssociateDataControls(new System.Windows.Forms.Control[] { pnl任务号 }, m_cm.DisplayManager, m_gridName);

            m_cm.StateControls.Add(new StateControl(btn修改, StateType.View));
            m_cm.StateControls.Add(new StateControl(btn拒绝, StateType.View));
            m_cm.StateControls.Add(new StateControl(btn放弃, false));
            m_cm.StateControls.Add(new StateControl(btn备案确认, StateType.View | StateType.Add | StateType.Edit));

            m_cm.StateControls.Add(new StateControl(btn网上委托导入, true));

            m_cm.DisplayManager.PositionChanged += new EventHandler(DisplayManager_PositionChanged);
            m_cm.DisplayManager.PositionChanging += new CancelEventHandler(DisplayManager_PositionChanging);

            Helper.SetGridDefault(this, m_rightGrid);

            m_cm.DisplayManager.SearchManager.LoadData();
        }
Ejemplo n.º 11
0
        private void 转关箱预排车_Load(object sender, EventArgs e)
        {
            m_全部监管车辆及作业现状Grid = base.AssociateBoundGrid(pnl全部监管车辆及作业现状, "车队级调度_转关箱预排车_监管车辆及作业状况") as DataUnboundGrid;
            m_待排转关箱任务区Grid = base.AssociateBoundGrid(pnl待排转关箱任务区, "车队级调度_转关箱预排车_待排转关箱任务") as DataUnboundGrid;
            m_暂存计划区Grid = base.AssociateArchiveGrid(pnl暂存计划区, "车队级调度_转关箱预排车_暂存计划区") as ArchiveUnboundGrid;

            m_全部监管车辆及作业现状Grid.ChangeControlPositionAccordColumn(label1, "第1天");

            m_全部监管车辆及作业现状Grid.DataRowTemplate.Cells["后续作业计划"].DoubleClick += new EventHandler(转关箱预排车_DoubleClick);
            m_待排转关箱任务区Grid.DataRowTemplate.Cells["提单号"].DoubleClick += new EventHandler(转关箱预排车_DoubleClick);

            m_全部监管车辆及作业现状Grid.EnableDragDrop = true;
            m_待排转关箱任务区Grid.EnableDragDrop = true;
            m_全部监管车辆及作业现状Grid.GridDragOver += new System.Windows.Forms.DragEventHandler(m_全部监管车辆及作业现状Grid_GridDragOver);
            m_全部监管车辆及作业现状Grid.GridDragDrop += new System.Windows.Forms.DragEventHandler(m_全部监管车辆及作业现状Grid_GridDragDrop);
            m_全部监管车辆及作业现状Grid.GridDragStart += new EventHandler<GridDataGragEventArgs>(m_待排转关箱任务区Grid_GridDragStart);
            m_待排转关箱任务区Grid.GridDragOver += new System.Windows.Forms.DragEventHandler(m_全部监管车辆及作业现状Grid_GridDragOver);
            m_待排转关箱任务区Grid.GridDragDrop += new System.Windows.Forms.DragEventHandler(m_全部监管车辆及作业现状Grid_GridDragDrop);
            m_待排转关箱任务区Grid.GridDragStart += new EventHandler<GridDataGragEventArgs>(m_待排转关箱任务区Grid_GridDragStart);

            m_暂存计划区Grid.DisplayManager.PositionChanged += new EventHandler(DisplayManager_PositionChanged);

            Helper.SetGridDefault(this, m_暂存计划区Grid);
            Helper.SetGridDefault(this, m_全部监管车辆及作业现状Grid);
        }
Ejemplo n.º 12
0
        private void 任务预备案_Load(object sender, EventArgs e)
        {
            m_rightGrid = base.AssociateArchiveGrid(pnl待确认区, "任务备案_任务预备案") as ArchiveUnboundGrid;
            var cm = m_rightGrid.ControlManager;
            m_cm = m_rightGrid.ControlManager as IWindowControlManager;
            m_cmT = m_cm as IWindowControlManager<任务>;

            MyTemplateForm.AddControl(pnl备案明细窗体, new 备案明细窗体(cm, m_gridName));
            cm.DisplayManager.DataControls["装货地编号"].SelectedDataValueChanged += new EventHandler(任务预备案_SelectedDataValueChanged);
            cm.DisplayManager.DataControls["卸货地编号"].SelectedDataValueChanged += new EventHandler(任务预备案_SelectedDataValueChanged);

            cm.StateControls.Add(new StateControl(btn预录入发送, false));
            cm.StateControls.Add(new StateControl(btn暂存待确认, false));
            cm.StateControls.Add(new StateControl(btn删除, StateType.View));
            cm.StateControls.Add(new StateControl(btn新增任务, true));
            cm.StateControls.Add(new StateControl(btn修改, StateType.View));
            cm.StateControls.Add(new StateControl(btn文件导入, true));

            cm.DisplayManager.PositionChanged += new EventHandler(DisplayManager_PositionChanged);
            cm.DisplayManager.PositionChanging += new CancelEventHandler(DisplayManager_PositionChanging);

            //MyTemplateForm.RestrictToUserAccess(m_cm.DisplayManager.SearchManager, "备案主管");

            Helper.SetGridDefault(this, m_rightGrid);

            cm.DisplayManager.SearchManager.LoadData();
        }