public static string GetText(EGovInteractState type) { if (type == EGovInteractState.New) { return("新办件"); } else if (type == EGovInteractState.Denied) { return("拒绝受理"); } else if (type == EGovInteractState.Accepted) { return("已受理"); } else if (type == EGovInteractState.Redo) { return("要求返工"); } else if (type == EGovInteractState.Replied) { return("已办理"); } else if (type == EGovInteractState.Checked) { return("处理完毕"); } else { throw new Exception(); } }
public static string GetValue(EGovInteractState type) { if (type == EGovInteractState.New) { return("New"); } else if (type == EGovInteractState.Denied) { return("Denied"); } else if (type == EGovInteractState.Accepted) { return("Accepted"); } else if (type == EGovInteractState.Redo) { return("Redo"); } else if (type == EGovInteractState.Replied) { return("Replied"); } else if (type == EGovInteractState.Checked) { return("Checked"); } else { throw new Exception(); } }
public static ListItem GetListItem(EGovInteractState type, bool selected) { var item = new ListItem(GetText(type), GetValue(type)); if (selected) { item.Selected = true; } return(item); }
public static bool Equals(EGovInteractState type, string typeStr) { if (string.IsNullOrEmpty(typeStr)) { return(false); } if (string.Equals(GetValue(type).ToLower(), typeStr.ToLower())) { return(true); } return(false); }
public static string GetFrontText(EGovInteractState type) { if (type == EGovInteractState.Denied) { return("拒绝受理"); } else if (type == EGovInteractState.Checked) { return("办理完毕"); } else { return("办理中"); } }
public int GetCountByDepartmentIdAndState(PublishmentSystemInfo publishmentSystemInfo, int departmentId, int nodeId, EGovInteractState state, DateTime begin, DateTime end) { string sqlString; if (nodeId == 0) { sqlString = $"SELECT COUNT(*) AS TotalNum FROM {publishmentSystemInfo.AuxiliaryTableForGovInteract} WHERE PublishmentSystemID = {publishmentSystemInfo.PublishmentSystemId} AND DepartmentID = {departmentId} AND State = '{EGovInteractStateUtils.GetValue(state)}' AND (AddDate BETWEEN '{begin.ToShortDateString()}' AND '{end.AddDays(1).ToShortDateString()}')"; } else { sqlString = $"SELECT COUNT(*) AS TotalNum FROM {publishmentSystemInfo.AuxiliaryTableForGovInteract} WHERE PublishmentSystemID = {publishmentSystemInfo.PublishmentSystemId} AND DepartmentID = {departmentId} AND NodeID = {nodeId} AND State = '{EGovInteractStateUtils.GetValue(state)}' AND (AddDate BETWEEN '{begin.ToShortDateString()}' AND '{end.AddDays(1).ToShortDateString()}')"; } return(BaiRongDataProvider.DatabaseDao.GetIntResult(sqlString)); }
public int GetCountByDepartmentIdAndState(PublishmentSystemInfo publishmentSystemInfo, int departmentId, EGovInteractState state) { string sqlString = $"SELECT COUNT(*) AS TotalNum FROM {publishmentSystemInfo.AuxiliaryTableForGovInteract} WHERE PublishmentSystemID = {publishmentSystemInfo.PublishmentSystemId} AND DepartmentID = {departmentId} AND State = '{EGovInteractStateUtils.GetValue(state)}'"; return(BaiRongDataProvider.DatabaseDao.GetIntResult(sqlString)); }
public void UpdateState(PublishmentSystemInfo publishmentSystemInfo, int contentId, EGovInteractState state) { string sqlString; if (state == EGovInteractState.Checked) { sqlString = $"UPDATE {publishmentSystemInfo.AuxiliaryTableForGovInteract} SET State = '{EGovInteractStateUtils.GetValue(state)}', IsChecked='{true}', CheckedLevel = 0 WHERE ID = {contentId}"; } else { sqlString = $"UPDATE {publishmentSystemInfo.AuxiliaryTableForGovInteract} SET State = '{EGovInteractStateUtils.GetValue(state)}', IsChecked='{false}', CheckedLevel = 0 WHERE ID = {contentId}"; } ExecuteNonQuery(sqlString); }
public static bool Equals(string typeStr, EGovInteractState type) { return(Equals(type, typeStr)); }