protected override void UpdateData(DataRow row) { if (row == null) { application.dataLibs.UpdateData(myDataSet.employee); } else { data.baseDS.employeeRow employeeRow = (data.baseDS.employeeRow)row; emGeneral.GetData(employeeRow); emPrivate.GetData(employeeRow); emIdentity.GetData(employeeRow); emWork.GetData(employeeRow); emEmergency.GetData(employeeRow); application.dataLibs.UpdateData(employeeRow); emEducation.SaveData(employeeRow.emCode); emLanguage.SaveData(employeeRow.emCode); emProject.SaveData(employeeRow.emCode); emRelatives.SaveData(employeeRow.emCode); emWorkHistory.SaveData(employeeRow.emCode); emDocFile.SaveData(employeeRow.emCode); emWorkRewards.SaveData(employeeRow.emCode); emWorkPunishment.SaveData(employeeRow.emCode); emWorkLeave.SaveData(employeeRow.emCode); } }
protected override void LoadData() { application.dataLibs.LoadData(myDataSet.employee, null); if (myMasterSource.Current != null) { data.baseDS.employeeRow employeeRow = (data.baseDS.employeeRow)((DataRowView)myMasterSource.Current).Row; SetData(employeeRow); } }
public override void AddNew(string code) { string[] saveData = this.SaveEditData(); this.AddNewRow(); data.baseDS.employeeRow employeeRow = (data.baseDS.employeeRow)((DataRowView)myMasterSource.Current).Row; if (employeeRow == null) { return; } application.dataLibs.InitData(employeeRow); employeeRow.emCode = code; SetData(employeeRow); }
private void employeeSource_CurrentChanged(object sender, EventArgs e) { try { if (this.fOnProccessing || myMasterSource.Current == null) { return; } data.baseDS.employeeRow employeeRow = (data.baseDS.employeeRow)((DataRowView)myMasterSource.Current).Row; SetData(employeeRow); LockEdit(this.isLockEdit); } catch (Exception ex) { this.ShowError(ex); } }
protected virtual void SetData(data.baseDS.employeeRow employeeRow) { emGeneral.SetData(employeeRow); emPrivate.SetData(employeeRow); emIdentity.SetData(employeeRow); emWork.SetData(employeeRow); emEmergency.SetData(employeeRow); emEducation.LoadData(employeeRow.emCode); emLanguage.LoadData(employeeRow.emCode); emProject.LoadData(employeeRow.emCode); emRelatives.LoadData(employeeRow.emCode); emWorkHistory.LoadData(employeeRow.emCode); emDocFile.LoadData(employeeRow.emCode); emWorkRewards.LoadData(employeeRow.emCode); emWorkPunishment.LoadData(employeeRow.emCode); emWorkLeave.LoadData(employeeRow.emCode); }