예제 #1
0
        public ProjectEquipmentCard(object idProject)
        {
            new UI.UserCulture().SetCultureOnForm();
            InitializeComponent();
            IsEditMode = false;

            ProjectEquipmentModel           = new Model.ProjectEquipmentModel();
            ProjectEquipmentModel.ProjectID = (int)idProject;
            LoadEquipments();

            comboEquipmetns.SelectedValueChanged += ComboEquipmetns_SelectedValueChanged;
        }
예제 #2
0
        public ProjectEquipmentCard(object id, object idProject, object idEquipment, object percent)
        {
            new UI.UserCulture().SetCultureOnForm();
            InitializeComponent();
            IsEditMode = true;

            ProjectEquipmentModel                       = new Model.ProjectEquipmentModel();
            ProjectEquipmentModel.Id                    = (int)id;
            ProjectEquipmentModel.ProjectID             = (int)idProject;
            ProjectEquipmentModel.EquipmentID           = (int)idEquipment;
            ProjectEquipmentModel.EquipmetnUsingPercent = (double)percent;
            ProjectEquipmentModel.GetDataByEquipmentID();

            LoadEquipments();
            comboEquipmetns.SelectedValue = ProjectEquipmentModel.EquipmentID;
            txtUsePercent.Text            = percent.ToString();

            comboEquipmetns.SelectedValueChanged += ComboEquipmetns_SelectedValueChanged;
        }