예제 #1
0
 public void ProcessRequest(HttpContext context)
 {
     context.Response.ContentType = "text/plain";
     string accessToken = context.Request["accessToken"];
     if (accessToken != null)
     {
         BLL.sys_UserInfo sys_UserInfo_bll = new BLL.sys_UserInfo();
         Model.sys_UserInfo sys_UserInfo_model = null;
         List<Model.sys_UserInfo> sys_UserInfo_models = sys_UserInfo_bll.GetModelList("U_AccessToken='" + accessToken + "'");
         if (sys_UserInfo_models.Count > 0)
         {
             sys_UserInfo_model = sys_UserInfo_models[0];
         }
         if (sys_UserInfo_model == null)
         {
             HttpContext.Current.Response.Write("{'status':'10003','msg':'accessToken无效'}");
         }
         else
         {
             StringBuilder sb = new StringBuilder();
             Maticsoft.BLL.AR_Announcement AR_Announcement_bll = new BLL.AR_Announcement();
             List<Maticsoft.Model.AR_Announcement> AR_Announcement_models = AR_Announcement_bll.GetModelList(string.Format("A_GroupID={0}", sys_UserInfo_model.U_Committee));
             Maticsoft.Model.AR_Announcement model = new Model.AR_Announcement();
             for (int i = 0; i < AR_Announcement_models.Count; i++)
             {
                 if (i != 0)
                     sb.Append(",");
                 model = AR_Announcement_models[i];
                 string jsonData = "{'AnnouncementID':'" + model.AnnouncementID + "','A_Title':'" + model.A_Title + "','A_Content':'" + model.A_Content + "','A_DateTime':'" + TimeParser.UNIX_TIMESTAMP(model.A_DateTime) + "','A_ResponsibilityUserID':'" + getUserModelById(model.A_ResponsibilityUserID).U_CName + "','A_Type':'" + getA_Type(model.A_Type) + "'}";
                 sb.Append(jsonData);
             }
             HttpContext.Current.Response.Write("{'status':'200','result':[" + sb.ToString() + "]}");
         }
     }
     else
     {
         HttpContext.Current.Response.Write("{'status':'10003','msg':'accessToken无效'}");
     }
 }
예제 #2
0
 public void ProcessRequest(HttpContext context)
 {
     context.Response.ContentType = "text/plain";
     string accessToken = context.Request["accessToken"];
     if (accessToken != null)
     {
         BLL.sys_UserInfo sys_UserInfo_bll = new BLL.sys_UserInfo();
         Model.sys_UserInfo sys_UserInfo_model = null;
         List<Model.sys_UserInfo> sys_UserInfo_models = sys_UserInfo_bll.GetModelList("U_AccessToken='" + accessToken + "'");
         if (sys_UserInfo_models.Count > 0)
         {
             sys_UserInfo_model = sys_UserInfo_models[0];
         }
         if (sys_UserInfo_model == null)
         {
             HttpContext.Current.Response.Write("{'status':'10003','msg':'accessToken无效'}");
         }
         else
         {
             StringBuilder sb = new StringBuilder();
             Maticsoft.BLL.education_Activity education_Activity_bll = new BLL.education_Activity();
             Maticsoft.Model.education_Activity model = new Model.education_Activity();
             List<Maticsoft.Model.education_Activity> education_Activity_models = education_Activity_bll.GetModelList(string.Format("A_Object={0}", sys_UserInfo_model.U_Committee));
             for (int i = 0; i < education_Activity_models.Count; i++)
             {
                 if (i != 0)
                     sb.Append(",");
                 model = education_Activity_models[i];
                 string jsonData = "{'ActivityID':'0','A_DateTime':'" + TimeParser.UNIX_TIMESTAMP(model.A_DateTime) + "','A_Location':'" + model.A_Location + "','A_Form':'" + model.A_Form + "','A_Object':'" + getUserModelById(model.A_Object).U_CName + "','A_Crowd':'" + model.A_Crowd + "','A_Duration':'" + model.A_Duration + "','A_Organizers':'" + model.A_Organizers + "','A_Partners':'" + model.A_Partners + "','A_Missionary':'" + model.A_Missionary + "','A_Number':'" + model.A_Number + "','A_Theme':'" + model.A_Theme + "'}";
                 sb.Append(jsonData);
             }
             HttpContext.Current.Response.Write("{'status':'200','result':[" + sb.ToString() + "]}");
         }
     }
     else
     {
         HttpContext.Current.Response.Write("{'status':'10003','msg':'accessToken无效'}");
     }
 }
예제 #3
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string accessToken = context.Request["accessToken"];
            if (accessToken != null)
            {
                BLL.sys_UserInfo sys_UserInfo_bll = new BLL.sys_UserInfo();
                Model.sys_UserInfo sys_UserInfo_model = null;
                List<Model.sys_UserInfo> sys_UserInfo_models = sys_UserInfo_bll.GetModelList("U_AccessToken='" + accessToken +"'");
                if (sys_UserInfo_models.Count > 0)
                {
                    sys_UserInfo_model = sys_UserInfo_models[0];
                }
                if (sys_UserInfo_model == null)
                {
                    HttpContext.Current.Response.Write("{'status':'10003','msg':'accessToken无效'}");
                }
                else
                {
                    Maticsoft.BLL.Nation nation_bll = new BLL.Nation();
                    Maticsoft.Model.Nation nation_model = nation_bll.GetModel(sys_UserInfo_model.U_NationID);
                    string nation_Str = nation_model.N_Name;
                    string U_BloodType_Str = getU_BloodType(sys_UserInfo_model.U_BloodType);
                    string U_Education_Str = getU_Education(sys_UserInfo_model.U_Education);
                    string U_PermanentType_Str = getU_PermanentType(sys_UserInfo_model.U_PermanentType);
                    string U_PaymentType_Str = getU_PaymentType(Convert.ToInt32(sys_UserInfo_model.U_PaymentType));
                    string U_RelationShip_Str = getU_RelationShip(sys_UserInfo_model.U_RelationShip);

                    HttpContext.Current.Response.Write("{'status':'200','result':{'UserID':'" + sys_UserInfo_model.UserID + "','U_IDCard':'" + sys_UserInfo_model.U_IDCard + "','U_CName':'" + sys_UserInfo_model.U_CName + "','U_Hometown':'" + sys_UserInfo_model.U_Hometown + "','U_NationID':'" + nation_Str + "','U_BloodType':'" + U_BloodType_Str + "','U_MobileNo':'" + sys_UserInfo_model.U_MobileNo + "','U_Education':'" + U_Education_Str + "','U_CurrentAddress':'" + sys_UserInfo_model.U_CurrentAddress + "','U_WorkingUnits':'" + sys_UserInfo_model.U_WorkingUnits + "','U_WorkingContactName':'" + sys_UserInfo_model.U_WorkingContactName + "','U_WorkingContactTel':'" + sys_UserInfo_model.U_WorkingContactTel + "','U_PaymentType':'" + U_PaymentType_Str + "','U_MedicalNO':'" + sys_UserInfo_model.U_MobileNo + "','U_SocialNO':'" + sys_UserInfo_model.U_SocialNO + "','U_FamilyCode':'" + sys_UserInfo_model.U_FamilyCode + "','U_RelationShip':'" + U_RelationShip_Str + "','U_ResponsibilityUserID':'" + getUserModelById(sys_UserInfo_model.U_ResponsibilityUserID).U_CName + "','U_FilingUnits':'" + getGroupModelById(sys_UserInfo_model.U_Committee).G_CName + "','U_FilingUserID':'" + getUserModelById(sys_UserInfo_model.U_FilingUserID).U_CName + "'}}");
                }
            }
            else
            {
                HttpContext.Current.Response.Write("{'status':'10003','msg':'accessToken无效'}");
            }
        }