private void btnAttachFile_Click(object sender, EventArgs e) { var manager = FileBlobManager.Create(this.Manager.CreationInfo); if (XF_FileBlobNewEdit.F_Show(manager) == DialogResult.Yes) { this.Manager.RefreshFileList(); } }
private void BindModel(DriverModel mod) { BindingSource bsModel = new BindingSource(); bsModel.DataSource = mod; DriverCode.DataBindings.Add("EditValue", bsModel, mod.GetName(p => p.DriverCode), true, DataSourceUpdateMode.OnPropertyChanged); FirstName.DataBindings.Add("EditValue", bsModel, mod.GetName(p => p.FirstName), true, DataSourceUpdateMode.OnPropertyChanged); SecondName.DataBindings.Add("EditValue", bsModel, mod.GetName(p => p.SecondName), true, DataSourceUpdateMode.OnPropertyChanged); LastName.DataBindings.Add("EditValue", bsModel, mod.GetName(p => p.LastName), true, DataSourceUpdateMode.OnPropertyChanged); DateOfBirth.DataBindings.Add("EditValue", bsModel, mod.GetName(p => p.DateOfBirth), true, DataSourceUpdateMode.OnPropertyChanged); DateOfHire.DataBindings.Add("EditValue", bsModel, mod.GetName(p => p.DateOfHire), true, DataSourceUpdateMode.OnPropertyChanged); CellPhone.DataBindings.Add("EditValue", bsModel, mod.GetName(p => p.CellPhone), true, DataSourceUpdateMode.OnPropertyChanged); EmergencyPhone.DataBindings.Add("EditValue", bsModel, mod.GetName(p => p.EmergencyPhone), true, DataSourceUpdateMode.OnPropertyChanged); Email.DataBindings.Add("EditValue", bsModel, mod.GetName(p => p.Email), true, DataSourceUpdateMode.OnPropertyChanged); //LicenseID.DataBindings.Add("EditValue", bsModel, mod.GetName(p => p.LicenseID), true, DataSourceUpdateMode.OnPropertyChanged); //LicenseExpirationDate.DataBindings.Add("EditValue", bsModel, mod.GetName(p => p.LicenseExpirationDate), true, DataSourceUpdateMode.OnPropertyChanged); PayRateOverride.DataBindings.Add("EditValue", bsModel, mod.GetName(p => p.PayRateOverride), true, DataSourceUpdateMode.OnPropertyChanged); IsEnabled.DataBindings.Add("Checked", bsModel, mod.GetName(p => p.IsEnabled), true, DataSourceUpdateMode.OnPropertyChanged); BindingSource bsLocations = new BindingSource(); bsLocations.DataSource = mod.Locations; gridControlLocations.DataSource = bsLocations; FileBlobCreationInfoModel info = new FileBlobCreationInfoModel(); info.DriverID = this.Manager.ActiveModel.DriverID; var manager = FileBlobManager.Create(info); xu_Files.Load(manager); var driverLicensesManager = DriverLicenseCatalogManager.Create(this.Manager.ActiveModel.DriverID); xu_DriverLicenses.LoadManager(driverLicensesManager); }
public static DialogResult F_ShowEdit(uint blobID) { var manager = FileBlobManager.CreateEdit(blobID); return(F_Show(manager)); }