Beispiel #1
0
 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();
     }
 }
Beispiel #2
0
        public void UpdateState(int applyId, EGovPublicApplyState state)
        {
            string sqlString =
                $"UPDATE {TableName} SET State = '{EGovPublicApplyStateUtils.GetValue(state)}' WHERE ID = {applyId}";

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

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