public UjfOrderPartAddChangeForm(UjfOrderParts od) { this.order = UjfOrderParts.Null; this.InitializeComponent(); this.set_Font(Manager.WindowFont); this.order = od; this.rtbOrderPartName.set_Text(System.Convert.ToString(od.PartName)); this.dtStartDate.Value = System.Convert.ToDateTime(od.FromDate); this.dtEndDate.Value = System.Convert.ToDateTime(od.ToDate); this.bsExecuter.set_DataSource(Mappers.UjfOrganizationPersonnelMapper.FindAll()); UjfOrganizationPersonnel personnel = new UjfOrganizationPersonnel { EmployeeName = "Не выбрано", Id = 0L }; this.bsExecuter.Insert(0, personnel); this.cbExecuter.set_DataSource(this.bsExecuter); this.cbExecuter.set_DisplayMember("EmployeeName"); this.cbExecuter.set_ValueMember("Id"); this.cbExecuter.set_SelectedValue((long) this.order.ChiefExecuter); }
private void tsbAddStaff_Click(object sender, System.EventArgs e) { UjfOrderParts od = new UjfOrderParts { OrderId = this.order.Id }; UjfOrderPartAddChangeForm form = new UjfOrderPartAddChangeForm(od); form.ShowDialog(); if ((form.DialogResult == System.Windows.Forms.DialogResult.OK) && (this.base_OrderParts != null)) { this.base_OrderParts.Add(od); } this.UpdateBsOrderParts(); }
public UjfOrderPartAddChangeForm() { this.order = UjfOrderParts.Null; this.InitializeComponent(); }