private void LoadData(int?Id) { using (var e = new posb.Faena { Id = this.Id }) { e.Get(); } }
private void LoadData(int?Id) { using (var e = new posb.Faena { Id = this.Id }) { e.Get(); this.txtName.Text = e.Name; this.cmbYear.Text = e.Year.ToString(); this.cmbMonth.SelectedIndex = e.Month.Value; this.txtAmount.Text = String.Format("{0:0.00}", e.Amount); this.txtDescription.Text = e.Description; this.cbActive.Checked = e.Active.Value; this.cbAlways.Checked = e.Always.Value; } }