public static string GetText(EGovPublicApplyState type) { if (type == EGovPublicApplyState.New) { return("新申请"); } else if (type == EGovPublicApplyState.Denied) { return("拒绝受理"); } else if (type == EGovPublicApplyState.Accepted) { return("已受理"); } else if (type == EGovPublicApplyState.Redo) { return("要求返工"); } else if (type == EGovPublicApplyState.Replied) { return("已办理"); } else if (type == EGovPublicApplyState.Checked) { return("处理完毕"); } else { throw new Exception(); } }
public void UpdateState(int applyId, EGovPublicApplyState state) { string sqlString = $"UPDATE {TableName} SET State = '{EGovPublicApplyStateUtils.GetValue(state)}' WHERE ID = {applyId}"; ExecuteNonQuery(sqlString); }
public static string GetValue(EGovPublicApplyState type) { if (type == EGovPublicApplyState.New) { return("New"); } else if (type == EGovPublicApplyState.Denied) { return("Denied"); } else if (type == EGovPublicApplyState.Accepted) { return("Accepted"); } else if (type == EGovPublicApplyState.Redo) { return("Redo"); } else if (type == EGovPublicApplyState.Replied) { return("Replied"); } else if (type == EGovPublicApplyState.Checked) { return("Checked"); } else { throw new Exception(); } }
public static ListItem GetListItem(EGovPublicApplyState type, bool selected) { var item = new ListItem(GetText(type), GetValue(type)); if (selected) { item.Selected = true; } return(item); }
public static bool Equals(EGovPublicApplyState type, string typeStr) { if (string.IsNullOrEmpty(typeStr)) { return(false); } if (string.Equals(GetValue(type).ToLower(), typeStr.ToLower())) { return(true); } return(false); }
public GovPublicApplyInfo(int id, int styleId, int publishmentSystemId, bool isOrganization, string title, string departmentName, int departmentId, DateTime addDate, string queryCode, EGovPublicApplyState state) { Id = id; StyleId = styleId; PublishmentSystemId = publishmentSystemId; IsOrganization = isOrganization; Title = title; DepartmentName = departmentName; DepartmentId = departmentId; AddDate = addDate; QueryCode = queryCode; State = state; }
public static string GetFrontText(EGovPublicApplyState type) { if (type == EGovPublicApplyState.Denied) { return("拒绝受理"); } else if (type == EGovPublicApplyState.Checked) { return("办理完毕"); } else { return("申请办理中"); } }
public int GetCountByDepartmentIdAndState(int publishmentSystemId, int departmentId, EGovPublicApplyState state, DateTime begin, DateTime end) { string sqlString = $"SELECT COUNT(*) AS TotalNum FROM {TableName} WHERE PublishmentSystemID = {publishmentSystemId} AND DepartmentID = {departmentId} AND State = '{EGovPublicApplyStateUtils.GetValue(state)}' AND (AddDate BETWEEN '{begin.ToShortDateString()}' AND '{end.AddDays(1).ToShortDateString()}')"; return(BaiRongDataProvider.DatabaseDao.GetIntResult(sqlString)); }
public int GetCountByDepartmentIdAndState(int publishmentSystemId, int departmentId, EGovPublicApplyState state) { string sqlString = $"SELECT COUNT(*) AS TotalNum FROM {TableName} WHERE PublishmentSystemID = {publishmentSystemId} AND DepartmentID = {departmentId} AND State = '{EGovPublicApplyStateUtils.GetValue(state)}'"; return(BaiRongDataProvider.DatabaseDao.GetIntResult(sqlString)); }
public static bool Equals(string typeStr, EGovPublicApplyState type) { return(Equals(type, typeStr)); }