コード例 #1
0
 public DepartmentModule()
 {
     CurrentModuleName          = "Department";
     CurrentModuleEntity        = new DepartmentEntities();
     CurrentModuleEntity.Module = this;
     InitializeModule();
 }
コード例 #2
0
        public override void InitGridControlDataSource()
        {
            DepartmentEntities entity = (DepartmentEntities)((BaseModuleERP)Screen.Module).CurrentModuleEntity;
            BindingSource      bds    = new BindingSource();

            bds.DataSource  = entity.DepartmentRoomsList;
            this.DataSource = bds;
        }
コード例 #3
0
        public void ChangeDepartmentRoomBoundary()
        {
            DepartmentEntities entity     = (DepartmentEntities)CurrentModuleEntity;
            HRDepartmentsInfo  mainObject = (HRDepartmentsInfo)entity.MainObject;

            mainObject.HRDepartmentBoundary      = (decimal)entity.DepartmentRoomsList.Sum(o => o.HRDepartmentRoomBoundary);
            mainObject.HRDepartmentMenBoundary   = (decimal)entity.DepartmentRoomsList.Sum(o => o.HRDepartmentRoomMenBoundary);
            mainObject.HRDepartmentWoMenBoundary = (decimal)entity.DepartmentRoomsList.Sum(o => o.HRDepartmentRoomWoMenBoundary);
            entity.UpdateMainObjectBindingSource();
        }
コード例 #4
0
        protected override void GridView_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
        {
            base.GridView_CellValueChanged(sender, e);

            DepartmentEntities entity = (DepartmentEntities)(this.Screen.Module as BaseModuleERP).CurrentModuleEntity;

            if (entity.DepartmentRoomsList.CurrentIndex >= 0)
            {
                HRDepartmentRoomsInfo item = entity.DepartmentRoomsList[entity.DepartmentRoomsList.CurrentIndex];
                if (e.Column.FieldName == "HRDepartmentRoomWoMenBoundary")
                {
                    item.HRDepartmentRoomBoundary = item.HRDepartmentRoomMenBoundary + item.HRDepartmentRoomWoMenBoundary;
                    ((DepartmentModule)Screen.Module).ChangeDepartmentRoomBoundary();
                }
                if (e.Column.FieldName == "HRDepartmentRoomMenBoundary")
                {
                    item.HRDepartmentRoomBoundary = item.HRDepartmentRoomMenBoundary + item.HRDepartmentRoomWoMenBoundary;
                    ((DepartmentModule)Screen.Module).ChangeDepartmentRoomBoundary();
                }
            }
        }
コード例 #5
0
        public void RemoveSelectedItemFromDepartmentItemList()
        {
            DepartmentEntities entity = (DepartmentEntities)CurrentModuleEntity;

            entity.DepartmentRoomsList.RemoveSelectedRowObjectFromList();
        }
コード例 #6
0
        public override int ActionSave()
        {
            DepartmentEntities entity = (DepartmentEntities)CurrentModuleEntity;

            return(base.ActionSave());
        }