private void ProjectSearchLookUpEdit_EditValueChanged(object sender, EventArgs e)
        {
            if (ProjectSearchLookUpEdit.EditValue == null)
            {
                return;
            }
            if (string.IsNullOrEmpty(ProjectSearchLookUpEdit.EditValue.ToString()))
            {
                return;
            }

            Guid projectId = (Guid)ProjectSearchLookUpEdit.EditValue;

            if (projectId != Guid.Empty)
            {
                ProjectIterationSearchLookUpEdit.ReLoadData(new BinaryOperator("ProjectId", projectId), "ProjectIteration");

                ((Katrin.Domain.Impl.ProjectWeekReport)EntityBindingSource.Current).ProjectId = projectId;

                if (ProjectSearchLookUpEdit.Tag != null)
                {
                    ((Katrin.Domain.Impl.ProjectWeekReport)EntityBindingSource.Current).ProjectIterationId = Guid.Empty;
                }
                ProjectSearchLookUpEdit.Tag = e;
            }
        }
Пример #2
0
        public override void InitEditors(Entity entity)
        {
            base.InitEditors(entity);

            ProjectIterationSearchLookUpEdit.Bind(entity);
            NewProjectIterationSearchLookUpEdit.Bind(entity);
            TNewProjectIterationSearchLookUpEdit.Bind(entity);
        }
 public override void InitEditors(Entity entity)
 {
     base.InitEditors(entity);
     CurrentProgressCodeLookUpEdit.BindPickList(entity);
     CurrentProgressCodeLookUpEdit.BindPickList(entity);
     OutlookProgressCodeLookUpEdit.BindPickList(entity);
     CurrentQualityCodeLookUpEdit.BindPickList(entity);
     OutlookQualityCodeLookUpEdit.BindPickList(entity);
     ProjectSearchLookUpEdit.Bind(entity);
     ProjectIterationSearchLookUpEdit.Bind(entity);
 }
Пример #4
0
        public override void InitEditors(Entity entity)
        {
            base.InitEditors(entity);
            string layoutResourceNamespace = "Katrin.Win.MainModule.DefaultLayout";

            ProjectSearchLookUpEdit.Bind(entity);
            ProjectIterationSearchLookUpEdit.Bind(entity);
            ProjectModuleSearchLookUpEdit.Bind(entity);
            OwnerIdLookUpEdit.Bind(entity);
            StatusCodeLookUpEdit.BindPickList(entity);
            priorityLookUpEdit.BindPickList(entity);
        }
Пример #5
0
 public override void InitEditors(Entity entity)
 {
     base.InitEditors(entity);
     ProjectSearchLookUpEdit.Bind(entity);
     ProjectIterationSearchLookUpEdit.Bind(entity, new BinaryOperator("StatusCode", 2, BinaryOperatorType.NotEqual));
     ProjectModuleSearchLookUpEdit.Bind(entity);
     ProjectIterationSearchLookUpEdit.Properties.ReadOnly = true;
     ProjectModuleSearchLookUpEdit.Properties.ReadOnly    = true;
     OwnerIdLookUpEdit.Bind(entity);
     StatusCodeLookUpEdit.BindPickList(entity);
     priorityLookUpEdit.BindPickList(entity);
     taskCategoryCodeLookUpEdit.BindPickList(entity);
 }
        public override void InitEditors(Entity entity)
        {
            base.InitEditors(entity);
            CurrentProgressCodeLookUpEdit.BindPickList(entity);
            string defaultLayoutPath = "Katrin.Win.MainModule.DefaultLayout";

            CurrentProgressCodeLookUpEdit.BindPickList(entity);
            OutlookProgressCodeLookUpEdit.BindPickList(entity);
            CurrentQualityCodeLookUpEdit.BindPickList(entity);
            OutlookQualityCodeLookUpEdit.BindPickList(entity);
            ProjectSearchLookUpEdit.Bind(entity);
            ProjectIterationSearchLookUpEdit.Bind(entity);
        }
Пример #7
0
        private void ProjectSearchLookUpEdit_EditValueChanged(object sender, EventArgs e)
        {
            if (ProjectSearchLookUpEdit.EditValue == null)
            {
                return;
            }

            Guid projectId = projectId = (Guid)ProjectSearchLookUpEdit.EditValue;;

            if (projectId == Guid.Empty)
            {
                return;
            }


            // iteration reload data
            ProjectIterationSearchLookUpEdit.ReloadData(new BinaryOperator("ProjectId", projectId));

            // iteration reload data
            ProjectModuleSearchLookUpEdit.ReloadData(new BinaryOperator("ProjectId", projectId));
            // owner reload data
            EventHandler <EventArgs <Guid> > handler = OnProjectChange;

            if (handler != null)
            {
                handler(OwnerIdLookUpEdit, new EventArgs <Guid>(projectId));
            }

            EntityBindingSource.Current.AsDyanmic().ProjectId = projectId;

            CriteriaOperator theOperator = Context.GetFilter("ProjectIterationId");

            if (theOperator == null)
            {
                return;
            }
            if (!(theOperator is BinaryOperator))
            {
                return;
            }
            OperandValue operandValue = ((BinaryOperator)theOperator).RightOperand as OperandValue;

            if (operandValue.Value is Guid)
            {
                EntityBindingSource.Current.AsDyanmic().ProjectIterationId = operandValue.Value;
            }
        }
 private void ProjectSearchLookUpEdit_EditValueChanged(object sender, EventArgs e)
 {
     if (ProjectSearchLookUpEdit.EditValue != null)
     {
         Guid projectId = (Guid)ProjectSearchLookUpEdit.EditValue;
         if (projectId != Guid.Empty)
         {
             ProjectIterationSearchLookUpEdit.ReloadData(new BinaryOperator("ProjectId", projectId));
             EntityBindingSource.Current.AsDyanmic().ProjectId = projectId;
             if (sender.AsDyanmic().Tag != null)
             {
                 EntityBindingSource.Current.AsDyanmic().ProjectIterationId = Guid.Empty;
             }
             sender.AsDyanmic().Tag = e;
         }
     }
 }
Пример #9
0
 public void BindNewTask(int minValue, int defaultValue, Guid projectId, object newTaskOne, object newTaskTwo)
 {
     _minValue = minValue;
     NewTaskOneBindingSource.DataSource = newTaskOne;
     NewTaskTwoBindingSource.DataSource = newTaskTwo;
     hourTrackBarControl.Value          = defaultValue;
     ProjectIterationSearchLookUpEdit.ReLoadData(new BinaryOperator("ProjectId", projectId), "ProjectIteration");
     NewProjectIterationSearchLookUpEdit.ReLoadData(new BinaryOperator("ProjectId", projectId), "ProjectIteration");
     TNewProjectIterationSearchLookUpEdit.ReLoadData(new BinaryOperator("ProjectId", projectId), "ProjectIteration");
     string[] splitTypes = { "RemainderTime", "Rate", "Manual" };
     splitTypeRadio.Properties.Items.Clear();
     for (int i = 0; i < splitTypes.Count(); i++)
     {
         RadioGroupItem item = new RadioGroupItem(i, ResourceService.GetString(splitTypes[i]));
         splitTypeRadio.Properties.Items.Add(item);
     }
     splitTypeRadio.EditValue = 0;
     if (OnValueChanged != null)
     {
         OnValueChanged(null, new EventArgs <int, int>(hourTrackBarControl.Value, 0));
     }
 }
Пример #10
0
        private void ProjectSearchLookUpEdit_EditValueChanged(object sender, EventArgs e)
        {
            ProjectIterationSearchLookUpEdit.Properties.ReadOnly = true;
            ProjectModuleSearchLookUpEdit.Properties.ReadOnly    = true;

            if (ProjectSearchLookUpEdit.EditValue == null)
            {
                ProjectSearchLookUpEdit.EditValue = Guid.Empty;
            }
            if (string.IsNullOrEmpty(ProjectSearchLookUpEdit.EditValue.ToString()))
            {
                return;
            }
            Guid projectId = projectId = (Guid)ProjectSearchLookUpEdit.EditValue;

            if (projectId == Guid.Empty)
            {
                return;
            }



            ProjectIterationSearchLookUpEdit.Properties.ReadOnly = false;
            ProjectModuleSearchLookUpEdit.Properties.ReadOnly    = false;

            // owner reload data
            EventHandler <EventArgs <Guid> > handler = OnProjectChange;

            if (handler != null)
            {
                handler(OwnerIdLookUpEdit, new EventArgs <Guid>(projectId));
            }

            var taskEntity = (Katrin.Domain.Impl.ProjectTask)EntityBindingSource.Current;

            taskEntity.ProjectId = projectId;

            // iteration reload data
            CriteriaOperator filter = (new BinaryOperator("ProjectId", projectId));

            filter &= new BinaryOperator("StatusCode", 2, BinaryOperatorType.NotEqual);
            if (taskEntity.ProjectIterationId != null && taskEntity.ProjectIterationId != Guid.Empty)
            {
                filter |= new BinaryOperator("ProjectIterationId", taskEntity.ProjectIterationId ?? Guid.Empty, BinaryOperatorType.Equal);
            }
            ProjectIterationSearchLookUpEdit.ReLoadData(filter, "ProjectIteration");

            // iteration reload data
            ProjectModuleSearchLookUpEdit.ReLoadData(new BinaryOperator("ProjectId", projectId), "ProjectModule");

            CriteriaOperator theOperator = Context.GetFilter("ProjectIterationId");

            if (theOperator == null)
            {
                return;
            }
            if (!(theOperator is BinaryOperator))
            {
                return;
            }
            OperandValue operandValue = ((BinaryOperator)theOperator).RightOperand as OperandValue;

            if (operandValue.Value is Guid)
            {
                ((Katrin.Domain.Impl.ProjectTask)EntityBindingSource.Current).ProjectIterationId = (Guid)operandValue.Value;
            }
        }