public ProjectEquipmentCard(object idProject) { new UI.UserCulture().SetCultureOnForm(); InitializeComponent(); IsEditMode = false; ProjectEquipmentModel = new Model.ProjectEquipmentModel(); ProjectEquipmentModel.ProjectID = (int)idProject; LoadEquipments(); comboEquipmetns.SelectedValueChanged += ComboEquipmetns_SelectedValueChanged; }
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; }