public List<taskstatus> taskstatusGetAll() { List<taskstatus> lsttaskstatus = new List<taskstatus>(); try { DataTable dt = SqlHelper.ExecuteDataset(SqlImplHelper.getConnectionString(), "taskstatusGetAll").Tables[0]; if (dt.Rows.Count > 0) { int colTaskStatudId = dt.Columns["TaskStatudId"].Ordinal; int colTastkStatusDescription = dt.Columns["TastkStatusDescription"].Ordinal; for (int i = 0; dt.Rows.Count > i; i++) { taskstatus NewEnt = new taskstatus(); NewEnt.TaskStatudId = Int32.Parse(dt.Rows[i].ItemArray[colTaskStatudId].ToString()); NewEnt.TastkStatusDescription = dt.Rows[i].ItemArray[colTastkStatusDescription].ToString(); lsttaskstatus.Add(NewEnt); } } return lsttaskstatus; } catch(Exception ex) { throw ex; } }
public List <taskstatus> taskstatusGetAll() { List <taskstatus> lsttaskstatus = new List <taskstatus>(); try { DataTable dt = SqlHelper.ExecuteDataset(SqlImplHelper.getConnectionString(), "taskstatusGetAll").Tables[0]; if (dt.Rows.Count > 0) { int colTaskStatusId = dt.Columns["TaskStatusId"].Ordinal; int colTaskStatusDescription = dt.Columns["TaskStatusDescription"].Ordinal; for (int i = 0; dt.Rows.Count > i; i++) { taskstatus NewEnt = new taskstatus(); NewEnt.TaskStatusId = Int32.Parse(dt.Rows[i].ItemArray[colTaskStatusId].ToString()); NewEnt.TaskStatusDescription = dt.Rows[i].ItemArray[colTaskStatusDescription].ToString(); lsttaskstatus.Add(NewEnt); } } return(lsttaskstatus); } catch (Exception ex) { throw ex; } }
public int taskstatusAdd( taskstatus taskstatus) { try { return (int)SqlHelper.ExecuteScalar(SqlImplHelper.getConnectionString(), "taskstatusAdd", taskstatus.TastkStatusDescription); } catch(Exception ex) { throw ex; } }
public int taskstatusAdd(taskstatus taskstatus) { try { return((int)SqlHelper.ExecuteScalar(SqlImplHelper.getConnectionString(), "taskstatusAdd", taskstatus.TaskStatusDescription)); } catch (Exception ex) { throw ex; } }
public void trackingTasks(tasktype opt, taskstatus opt1, int termConfirmation) { Panel TaskType = advanceSearch.Get <Panel>(SearchCriteria.ByAutomationId("ehTaskType")); ComboBox cb = TaskType.Get <ComboBox>(SearchCriteria.ByAutomationId("CheckableCombo")); Panel TaskType1 = advanceSearch.Get <Panel>(SearchCriteria.ByAutomationId("ehTaskStatus")); ComboBox cb1 = TaskType1.Get <ComboBox>(SearchCriteria.ByAutomationId("CheckableCombo")); DateTime beginWait = DateTime.Now; if (opt != tasktype.noSelection) { tasktype c = opt; switch (c) { case tasktype.Abstract: cb.Items[0].Check(); break; case tasktype.Proposal: cb.Items[1].Check(); break; case tasktype.Summary: cb.Items[2].Check(); break; case tasktype.OnePager: cb.Items[3].Check(); break; // case tasktype.noSelection: break; } } if (opt1 != taskstatus.noSelection) { taskstatus c1 = opt1; switch (c1) { case taskstatus.Complete: cb1.Items[0].Check(); break; case taskstatus.Due: cb1.Items[1].Check(); break; case taskstatus.Exempt: cb1.Items[2].Check(); break; case taskstatus.InProgress: cb1.Items[3].Check(); break; case taskstatus.NotStarted: cb1.Items[4].Check(); break; case taskstatus.Overdue: cb1.Items[5].Check(); break; // case taskstatus.noSelection: break; } } if (termConfirmation == 1) { advanceSearch.Get <CheckBox>(SearchCriteria.ByAutomationId("chkTermConfirmation")).Click(); } }
public taskstatus taskstatusGetById(int TaskStatudId) { try { DataTable dt = SqlHelper.ExecuteDataset(SqlImplHelper.getConnectionString(), "taskstatusGetById", TaskStatudId).Tables[0]; taskstatus NewEnt = new taskstatus(); if(dt.Rows.Count > 0) { DataRow dr = dt.Rows[0]; NewEnt.TaskStatudId = Int32.Parse(dr["TaskStatudId"].ToString()); NewEnt.TastkStatusDescription = dr["TastkStatusDescription"].ToString(); } return NewEnt; } catch(Exception ex) { throw ex; } }
public taskstatus taskstatusGetById(int TaskStatusId) { try { DataTable dt = SqlHelper.ExecuteDataset(SqlImplHelper.getConnectionString(), "taskstatusGetById", TaskStatusId).Tables[0]; taskstatus NewEnt = new taskstatus(); if (dt.Rows.Count > 0) { DataRow dr = dt.Rows[0]; NewEnt.TaskStatusId = Int32.Parse(dr["TaskStatusId"].ToString()); NewEnt.TaskStatusDescription = dr["TaskStatusDescription"].ToString(); } return(NewEnt); } catch (Exception ex) { throw ex; } }
public bool taskstatusUpdate(taskstatus taskstatus) { try { int update = SqlHelper.ExecuteNonQuery(SqlImplHelper.getConnectionString(), "taskstatusUpdate", taskstatus.TaskStatusId, taskstatus.TaskStatusDescription); if (update > 0) { return(true); } else { return(false); } } catch (Exception ex) { throw ex; } }
protected void btnSearch_Click(object sender, EventArgs e) { if (!String.IsNullOrEmpty(txtSearch.Text)) { DataTable dttTasks = new DataTable(); dttTasks.Columns.Add(new DataColumn("taskId", System.Type.GetType("System.Int32"))); dttTasks.Columns.Add(new DataColumn("datetime", System.Type.GetType("System.DateTime"))); dttTasks.Columns.Add(new DataColumn("taskTittle", System.Type.GetType("System.String"))); dttTasks.Columns.Add(new DataColumn("eventsDetectionId", System.Type.GetType("System.Int32"))); dttTasks.Columns.Add(new DataColumn("taskStatusId", System.Type.GetType("System.Int32"))); dttTasks.Columns.Add(new DataColumn("statusDescription", System.Type.GetType("System.String"))); dttTasks.Columns.Add(new DataColumn("userId", System.Type.GetType("System.Int32"))); dttTasks.Columns.Add(new DataColumn("userName", System.Type.GetType("System.String"))); dttTasks.Columns.Add(new DataColumn("serverityId", System.Type.GetType("System.Int32"))); dttTasks.Columns.Add(new DataColumn("sererityDescription", System.Type.GetType("System.String"))); dttTasks.Columns.Add(new DataColumn("SLAStatus", System.Type.GetType("System.String"))); tasks auxtTasks = new tasks(); tasksBus oTasks = new tasksBus(); eventsdetectionBus oEventsDetection = new eventsdetectionBus(); idsBus oIDPS = new idsBus(); eventsalarmBus oEventsAlarm = new eventsalarmBus(); severityBus oSeverity = new severityBus(); taskstatusBus oTaskStatus = new taskstatusBus(); usersBus oUsers = new usersBus(); auxtTasks = oTasks.tasksGetById(Convert.ToInt32(txtSearch.Text)); if (auxtTasks != null) { taskstatus auxStatus = new taskstatus(); users auxUser = new users(); eventsdetection auxEventDetection = new eventsdetection(); eventsalarm auxEventAlarm = new eventsalarm(); severity auxSeverity = new severity(); auxStatus = oTaskStatus.taskstatusGetById(auxtTasks.TaskStatudId); auxUser = oUsers.usersGetById(auxtTasks.UserId); auxEventDetection = oEventsDetection.eventsdetectionGetById(auxtTasks.EventsDetectionId); auxEventAlarm = oEventsAlarm.eventsalarmGetById(auxEventDetection.EventsAlarmId); auxSeverity = oSeverity.severityGetById(auxEventAlarm.Severity); //resolver SLAStatus dttTasks.Rows.Add(auxtTasks.TaskId, auxtTasks.DateTime, auxtTasks.TaskTittle, auxtTasks.EventsDetectionId, auxtTasks.TaskStatudId, auxStatus.TaskStatusDescription, auxtTasks.UserId, auxUser.UserName, auxEventAlarm.Severity, auxSeverity.SeverityDescription, ""); gvTasks.DataSource = dttTasks; gvTasks.DataBind(); } else { lblMessage.Text = "Busqueda sin resultados..."; } } }
public bool taskstatusUpdate( taskstatus taskstatus) { try { int update = SqlHelper.ExecuteNonQuery(SqlImplHelper.getConnectionString(), "taskstatusUpdate", taskstatus.TaskStatudId, taskstatus.TastkStatusDescription); if (update > 0) { return true; } else { return false; } } catch(Exception ex) { throw ex; } }
public bool taskstatusUpdate(taskstatus taskstatus) { taskstatusImpl otaskstatusImpl = new taskstatusImpl(); return(otaskstatusImpl.taskstatusUpdate(taskstatus)); }
public bool taskstatusUpdate(taskstatus taskstatus) { taskstatusImpl otaskstatusImpl = new taskstatusImpl(); return otaskstatusImpl.taskstatusUpdate( taskstatus); }
protected void getEventsDetectionData() { DataTable dttEventsDetection = new DataTable(); dttEventsDetection.Columns.Add(new DataColumn("eventsDetectionId", System.Type.GetType("System.Int32"))); dttEventsDetection.Columns.Add(new DataColumn("datetime", System.Type.GetType("System.DateTime"))); dttEventsDetection.Columns.Add(new DataColumn("eventStauts", System.Type.GetType("System.Int32"))); dttEventsDetection.Columns.Add(new DataColumn("eventStatusDescription", System.Type.GetType("System.String"))); dttEventsDetection.Columns.Add(new DataColumn("IDSId", System.Type.GetType("System.Int32"))); dttEventsDetection.Columns.Add(new DataColumn("IDPS", System.Type.GetType("System.String"))); dttEventsDetection.Columns.Add(new DataColumn("idsName", System.Type.GetType("System.String"))); dttEventsDetection.Columns.Add(new DataColumn("eventsAlarmId", System.Type.GetType("System.Int32"))); dttEventsDetection.Columns.Add(new DataColumn("severityId", System.Type.GetType("System.Int32"))); dttEventsDetection.Columns.Add(new DataColumn("severityDescription", System.Type.GetType("System.String"))); dttEventsDetection.Columns.Add(new DataColumn("SLATimeToResponse", System.Type.GetType("System.Int32"))); dttEventsDetection.Columns.Add(new DataColumn("TaskId", System.Type.GetType("System.Int32"))); dttEventsDetection.Columns.Add(new DataColumn("IDPSEventId", System.Type.GetType("System.Int32"))); List <eventsdetection> lstEvetnsDetection = new List <eventsdetection>(); eventsdetectionBus oEventsDetection = new eventsdetectionBus(); idsBus oIDPS = new idsBus(); eventsalarmBus oEventsAlarm = new eventsalarmBus(); severityBus oSeverity = new severityBus(); tasksBus oTask = new tasksBus(); taskstatusBus oTaskStatus = new taskstatusBus(); lstEvetnsDetection = oEventsDetection.eventsdetectionGetAll(); if (lstEvetnsDetection.Count > 0) { foreach (eventsdetection row in lstEvetnsDetection) { if (row.EventStatus == 2 || row.EventStatus == 5) //Closed, Rejected { continue; } ids auxIDPS = new ids(); eventsalarm auxEventAlarm = new eventsalarm(); severity auxSeverity = new severity(); tasks auxTask = new tasks(); taskstatus auxTaskStatus = new taskstatus(); auxIDPS = oIDPS.idsGetById(row.IdsId); auxEventAlarm = oEventsAlarm.eventsalarmGetById(row.EventsAlarmId); auxSeverity = oSeverity.severityGetById(auxEventAlarm.Severity); auxTask = oTask.tasksGetByEventsDetectionId(row.EventsDetectionId); auxTaskStatus = oTaskStatus.taskstatusGetById(row.EventStatus); dttEventsDetection.Rows.Add(row.EventsDetectionId, row.DateTime, row.EventStatus, auxTaskStatus.TaskStatusDescription, row.IdsId, auxIDPS.IdsIP, auxIDPS.idsName, row.EventsAlarmId, auxSeverity.SeverityId, auxSeverity.SeverityDescription, auxSeverity.SLATimeToResponse, auxTask.TaskId, row.IDPSEventId); } gvEventsDetection.DataSource = dttEventsDetection; gvEventsDetection.DataBind(); } }
private void getTasksData() { DataTable dttTasks = new DataTable(); dttTasks.Columns.Add(new DataColumn("taskId", System.Type.GetType("System.Int32"))); dttTasks.Columns.Add(new DataColumn("datetime", System.Type.GetType("System.DateTime"))); dttTasks.Columns.Add(new DataColumn("taskTittle", System.Type.GetType("System.String"))); dttTasks.Columns.Add(new DataColumn("eventsDetectionId", System.Type.GetType("System.Int32"))); dttTasks.Columns.Add(new DataColumn("taskStatusId", System.Type.GetType("System.Int32"))); dttTasks.Columns.Add(new DataColumn("statusDescription", System.Type.GetType("System.String"))); dttTasks.Columns.Add(new DataColumn("userId", System.Type.GetType("System.Int32"))); dttTasks.Columns.Add(new DataColumn("userName", System.Type.GetType("System.String"))); dttTasks.Columns.Add(new DataColumn("serverityId", System.Type.GetType("System.Int32"))); dttTasks.Columns.Add(new DataColumn("sererityDescription", System.Type.GetType("System.String"))); dttTasks.Columns.Add(new DataColumn("SLAStatus", System.Type.GetType("System.String"))); List <tasks> lstTasks = new List <tasks>(); tasksBus oTasks = new tasksBus(); eventsdetectionBus oEventsDetection = new eventsdetectionBus(); idsBus oIDPS = new idsBus(); eventsalarmBus oEventsAlarm = new eventsalarmBus(); severityBus oSeverity = new severityBus(); taskstatusBus oTaskStatus = new taskstatusBus(); usersBus oUsers = new usersBus(); lstTasks = oTasks.tasksGetAll(); if (lstTasks.Count > 0) { foreach (tasks row in lstTasks) { if (row.TaskStatudId == 2 || row.TaskStatudId == 5) //Closed, Rejected { continue; } taskstatus auxStatus = new taskstatus(); users auxUser = new users(); eventsdetection auxEventDetection = new eventsdetection(); eventsalarm auxEventAlarm = new eventsalarm(); severity auxSeverity = new severity(); string SLASatus = ""; auxStatus = oTaskStatus.taskstatusGetById(row.TaskStatudId); auxUser = oUsers.usersGetById(row.UserId); auxEventDetection = oEventsDetection.eventsdetectionGetById(row.EventsDetectionId); auxEventAlarm = oEventsAlarm.eventsalarmGetById(auxEventDetection.EventsAlarmId); auxSeverity = oSeverity.severityGetById(auxEventAlarm.Severity); DateTime deadTime = row.DateTime; deadTime.AddMinutes(auxSeverity.SLATimeToResponse); if (DateTime.Now > deadTime) { SLASatus = "Vencido"; } if (DateTime.Now < deadTime) { SLASatus = "En término"; } dttTasks.Rows.Add(row.TaskId, row.DateTime, row.TaskTittle, row.EventsDetectionId, row.TaskStatudId, auxStatus.TaskStatusDescription, row.UserId, auxUser.UserName, auxEventAlarm.Severity, auxSeverity.SeverityDescription, SLASatus); } gvTasks.DataSource = dttTasks; gvTasks.DataBind(); } }
public int taskstatusAdd(taskstatus taskstatus) { taskstatusImpl otaskstatusImpl = new taskstatusImpl(); return(otaskstatusImpl.taskstatusAdd(taskstatus)); }
protected void getTaskData(int taskId) { DataTable dttTask = new DataTable(); dttTask.Columns.Add(new DataColumn("taskId", System.Type.GetType("System.Int32"))); dttTask.Columns.Add(new DataColumn("datetime", System.Type.GetType("System.DateTime"))); dttTask.Columns.Add(new DataColumn("taskTittle", System.Type.GetType("System.String"))); dttTask.Columns.Add(new DataColumn("eventsDetectionId", System.Type.GetType("System.Int32"))); dttTask.Columns.Add(new DataColumn("taskStatusId", System.Type.GetType("System.Int32"))); dttTask.Columns.Add(new DataColumn("statusDescription", System.Type.GetType("System.String"))); dttTask.Columns.Add(new DataColumn("userId", System.Type.GetType("System.Int32"))); dttTask.Columns.Add(new DataColumn("userName", System.Type.GetType("System.String"))); dttTask.Columns.Add(new DataColumn("serverityId", System.Type.GetType("System.Int32"))); dttTask.Columns.Add(new DataColumn("sererityDescription", System.Type.GetType("System.String"))); dttTask.Columns.Add(new DataColumn("SLAStatus", System.Type.GetType("System.String"))); tasks auxtTasks = new tasks(); tasksBus oTasks = new tasksBus(); eventsdetectionBus oEventsDetection = new eventsdetectionBus(); idsBus oIDPS = new idsBus(); eventsalarmBus oEventsAlarm = new eventsalarmBus(); severityBus oSeverity = new severityBus(); taskstatusBus oTaskStatus = new taskstatusBus(); usersBus oUsers = new usersBus(); auxtTasks = oTasks.tasksGetById(taskId); if (auxtTasks != null) { taskstatus auxStatus = new taskstatus(); users auxUser = new users(); eventsdetection auxEventDetection = new eventsdetection(); eventsalarm auxEventAlarm = new eventsalarm(); severity auxSeverity = new severity(); string SLASatus = ""; auxStatus = oTaskStatus.taskstatusGetById(auxtTasks.TaskStatudId); auxUser = oUsers.usersGetById(auxtTasks.UserId); auxEventDetection = oEventsDetection.eventsdetectionGetById(auxtTasks.EventsDetectionId); auxEventAlarm = oEventsAlarm.eventsalarmGetById(auxEventDetection.EventsAlarmId); auxSeverity = oSeverity.severityGetById(auxEventAlarm.Severity); DateTime deadTime = auxtTasks.DateTime; deadTime.AddMinutes(auxSeverity.SLATimeToResponse); if (DateTime.Now > deadTime) { SLASatus = "Vencido"; } if (DateTime.Now < deadTime) { SLASatus = "En término"; } dttTask.Rows.Add(auxtTasks.TaskId, auxtTasks.DateTime, auxtTasks.TaskTittle, auxtTasks.EventsDetectionId, auxtTasks.TaskStatudId, auxStatus.TaskStatusDescription, auxtTasks.UserId, auxUser.UserName, auxEventAlarm.Severity, auxSeverity.SeverityDescription, SLASatus); gvTask.DataSource = dttTask; gvTask.DataBind(); } }
public int taskstatusAdd(taskstatus taskstatus) { taskstatusImpl otaskstatusImpl = new taskstatusImpl(); return otaskstatusImpl.taskstatusAdd( taskstatus); }