private void Serach() { string s; try { bool showIgnore = Convert.ToBoolean(Request.Params["ShowIgnore"]); ErrorType errorType = ErrorType.GetErrorTypeByID(Convert.ToInt32(Request.Params["ErrorType"])); Account account = Session[SessionKeys.LOGININFO] as Account; List <SystemError> type = InstanceFactory.CreateSystemErrorFacade().GetDiyProcessError(showIgnore, errorType, account); StringBuilder builder = new StringBuilder(); List <DiyProcessSystemError> DiyProcesslist = DiyProcessSystemError.Turn(type); foreach (DiyProcessSystemError error in DiyProcesslist) { builder.AppendFormat("<tr><td></td><td>{0}</td><td>{1}</td><td>{2}</td><td><a href=\"#\" onclick='window.open(\"{3}\")' >¸üÕý</a></td><td><a href=\"#\" onclick='IgnoreDiyProcessError({4},{5},this)' >{6}</a></td></tr>", error.Description, error.CompanyName, error.DepartmentName, error.EditUrl, error.MarkID, error.ErrorTypeID, error.ErrorStatus); } List <HtmlModal> htmlmodal = new List <HtmlModal>(); htmlmodal.Add(new HtmlModal(builder.ToString())); s = JsonConvert.SerializeObject(htmlmodal); } catch (Exception ex) { List <Error> error = new List <Error>(); error.Add(new Error("DiyProcessErrorMessage", ex.Message)); s = JsonConvert.SerializeObject(error); } Response.Write(s); Response.End(); }
/// <summary> /// /// </summary> /// <returns></returns> public List <SystemError> GetAllIgnoreSystemError() { List <SystemError> items = new List <SystemError>(); SqlCommand cmd = new SqlCommand(); using (SqlDataReader sdr = SqlHelper.ExecuteReader("GetAllSystemError", cmd)) { while (sdr.Read()) { items.Add(new SystemError(Convert.ToInt32(sdr[_DbPKID]), "", ErrorType.GetErrorTypeByID(Convert.ToInt32(sdr[_DbErrorType])), Convert.ToInt32(sdr[_DbMarkID]))); } } return(items); }
/// <summary> /// /// </summary> public SystemError GetSystemErrorByTypeAndMarkID(ErrorType errorType, int markID) { SystemError systemError = null; SqlCommand cmd = new SqlCommand(); cmd.Parameters.Add(_ErrorType, SqlDbType.Int).Value = errorType.ID; cmd.Parameters.Add(_MarkID, SqlDbType.Int).Value = markID; using (SqlDataReader sdr = SqlHelper.ExecuteReader("GetSystemErrorByTypeAndMarkID", cmd)) { while (sdr.Read()) { systemError = new SystemError(Convert.ToInt32(sdr[_DbPKID]), "", ErrorType.GetErrorTypeByID(Convert.ToInt32(sdr[_DbErrorType])), Convert.ToInt32(sdr[_DbMarkID])); } } return(systemError); }
private void IgnoreDoorCardError() { string s = "[]"; try { int markID = Convert.ToInt32(Request.Params["MarkID"]); int ErrorTypeID = Convert.ToInt32(Request.Params["ErrorTypeID"]); InstanceFactory.CreateSystemErrorFacade().UpdateErrorStatus( new SystemError("", ErrorType.GetErrorTypeByID(ErrorTypeID), markID)); } catch (Exception ex) { List <Error> error = new List <Error>(); error.Add(new Error("doorcardErrorMessage", ex.Message)); s = JsonConvert.SerializeObject(error); } Response.Write(s); Response.End(); }
private void IgnoreError(string typeid, string markid) { _ISystemErrorFacade.UpdateErrorStatus( new SystemError("", ErrorType.GetErrorTypeByID(Convert.ToInt32(typeid)), Convert.ToInt32(markid))); }