Beispiel #1
0
 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();
     }
 }
Beispiel #2
0
 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();
     }
 }
Beispiel #3
0
        public static ListItem GetListItem(EGovInteractState type, bool selected)
        {
            var item = new ListItem(GetText(type), GetValue(type));

            if (selected)
            {
                item.Selected = true;
            }
            return(item);
        }
Beispiel #4
0
 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);
 }
Beispiel #5
0
 public static string GetFrontText(EGovInteractState type)
 {
     if (type == EGovInteractState.Denied)
     {
         return("拒绝受理");
     }
     else if (type == EGovInteractState.Checked)
     {
         return("办理完毕");
     }
     else
     {
         return("办理中");
     }
 }
Beispiel #6
0
        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));
        }
Beispiel #7
0
        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));
        }
Beispiel #8
0
        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);
        }
Beispiel #9
0
 public static bool Equals(string typeStr, EGovInteractState type)
 {
     return(Equals(type, typeStr));
 }