private void btnRun_Click(object sender, EventArgs e) { if (checkValues()) { foreach (object item in checkedListBox1.CheckedItems) { Notification_Dep_user dep = (Notification_Dep_user)item; if (!string.IsNullOrEmpty(dep.DepartmentCode)) { int nStartId = AMP_Common.getRecentSnapshotID(dtPickerStart.Value); int nEndId = AMP_Common.getRecentSnapshotID(dtPickerEnd.Value); DateTime dtStart = AMP_Common.getRecentSnapshotDateTime(dtPickerStart.Value); DateTime dtEnd = AMP_Common.getRecentSnapshotDateTime(dtPickerEnd.Value); string strEventID = txtEventID.Text.ToString(); if (!string.IsNullOrEmpty(strEventID)) { EventAmendmentBLL.checkAmendmentManually(dep.DepartmentCode, nStartId, nEndId, strEventID); } else { EventAmendmentBLL.checkAmendmentManually(dep.DepartmentCode, nStartId, nEndId); } } } } }
static void Main(string[] args) { EventAmendmentBLL.checkAmendmentbyDepartment_AllofEvent(); }