Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
 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);
     }
 }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
 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);
     }
 }
Esempio n. 5
0
        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);
        }