private void MakeListFromSH(int yr, int mt, int idsh = int.MinValue) { var err = DataTasks.MakeSalarySheetsFromTemplate(yr, mt, idsh); if (err != null && err.Count > 0) { Form_ErrorList.ShowErrorList(MyMainForm, err); } SaveData(); }
public bool CheckPayListIDs(int ids) { var err = DataTasks.CheckPayListIDs(ids); if (err.HasErrors) { Form_ErrorList.ShowErrorList(MyMainForm, err); return(false); } return(true); }
public static void ShowErrorList(Form owner, ErrorList errorlist) { if (errorlist == null) { return; } var fe = new Form_ErrorList(); fe.dgvErrorList.AutoGenerateColumns = false; KlonsData.St.ErrorInfoList.SetErrorList(errorlist); fe.bsErr.DataSource = KlonsData.St.ErrorInfoList; fe.dgcSource.DataPropertyName = "Source"; fe.dgcMessage.DataPropertyName = "Message"; fe.ShowDialog(owner); }
public bool CheckEventsForAll() { if (bsPersons.Count == 0) { return(true); } var err = DataTasks.CheckEventsAll(); if (err.HasErrors) { Form_ErrorList.ShowErrorList(MyMainForm, err); return(false); } return(true); }
public bool CheckEventsForCurrent() { if (bsPersons.Count == 0 || bsPersons.Current == null) { return(true); } var drv = bsPersons.Current as DataRowView; var dr = drv.Row as KlonsADataSet.PERSONSRow; var err = DataTasks.CheckEvents(dr.ID); if (err.HasErrors) { Form_ErrorList.ShowErrorList(MyMainForm, err); return(false); } return(true); }