Ejemplo n.º 1
0
        private void LoadSaveConfiguration()
        {
            Path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\OrmGenerator\\";

            if (!Directory.Exists(Path))
            {
                Directory.CreateDirectory(Path);
            }

            Path += Constant.FILE_NAME_SAVE_CONFIGURATION;

            if (!File.Exists(Constant.FILE_NAME_SAVE_CONFIGURATION))
            {
                File.Create(Path);
            }

            Saves = JsonMethod <SaveConfigModel> .ReadAllDataJson(Path);

            if (Saves != null)
            {
                foreach (var item in Saves)
                {
                    ComboBox_Connection_Save.HorizontalContentAlignment = HorizontalAlignment.Left;
                    ComboBox_Connection_Save.Items.Add(item.Name);
                }
            }
            else
            {
                Saves = new List <SaveConfigModel>();
                ComboBox_Connection_Save.HorizontalContentAlignment = HorizontalAlignment.Center;
                ComboBox_Connection_Save.Items.Add(langue.ComboBox_Saves_Empty);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 返回DataTable(商品分类)
        /// </summary>
        /// <returns></returns>
        protected string GetSelectCategory()
        {
            SqlRun    sql = new SqlRun(SqlRun.sqlstr);
            DataTable ds  = sql.RunProcedureDR("Pc_Template", new SqlParameter[] {
                new SqlParameter("@type", "PC_GetSelectCategory")
            });

            if (ds.Rows.Count > 0)
            {
                ///加载商品分类
                string    category = "";
                DataTable dtc      = ds;
                if (dtc.Rows.Count > 0)
                {
                    foreach (DataRow dr_c1 in dtc.Rows)
                    {
                        category += "<option value='" + dr_c1["id"] + "'>" + dr_c1["title"] + "</option>";
                    }
                }
                return("{\"flag\":\"0\",\"category\":\"" + category + "\"}");
            }
            else
            {
                string error = "没有商品分类,请添加";
                return(JsonMethod.GetError(1, error));
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 返回DataTable(商品组合)
        /// </summary>
        /// <returns></returns>
        protected string GetSelectTemPro()
        {
            SqlRun    sql = new SqlRun(SqlRun.sqlstr);
            DataTable ds  = sql.RunProcedureDR("Pc_Template", new SqlParameter[] {
                new SqlParameter("@type", "PC_GetSelectTemPro")
            });

            if (ds.Rows.Count > 0)
            {
                ///加载商品组合
                string    prom = "";
                DataTable dtc  = ds;
                if (dtc.Rows.Count > 0)
                {
                    foreach (DataRow dr_c1 in dtc.Rows)
                    {
                        prom += "<option value='" + dr_c1["Id"] + "'>" + dr_c1["name"] + "</option>";
                    }
                }
                return("{\"flag\":\"0\",\"prom\":\"" + prom + "\"}");
            }
            else
            {
                string error = "没有主题商品组合,请添加";
                return(JsonMethod.GetError(1, error));
            }
        }
Ejemplo n.º 4
0
        private void Button_Save_Configuration_Click(object sender, RoutedEventArgs e)
        {
            SaveDialog dialog = new SaveDialog();

            dialog.ShowDialog();
            string SaveName = dialog.TextBox_Save_Name.Text;

            if (!string.IsNullOrEmpty(SaveName))
            {
                SaveConfigModel model = new SaveConfigModel()
                {
                    Name                 = SaveName,
                    Address              = TextBox_IP.Text,
                    Username             = TextBox_Username.Text,
                    Password             = TextBox_Password.Text,
                    CurrentConnectorType = ComboBox_SqlType.SelectedItem.ToString(),
                };

                Saves.Add(model);

                var result = JsonMethod <SaveConfigModel> .AddData(Saves);

                JsonMethod <SaveConfigModel> .WriteDataJson(Path, result);

                UpdateComboBox_Saves(Saves);
            }
        }
Ejemplo n.º 5
0
        public void ProcessRequest(HttpContext context)
        {
            string Json = "";

            try
            {
                Dt_User user = RoleFuns.IsLoginAdmin(context.Session["user"]);
                if (user != null)//登录检测,权限检测 context.Session["user"]
                {
                    string type = context.Request.QueryString["Type"].Trim();
                    if (type == "GetClientType")
                    {
                        Json = GetClientType(context, user.userId, user.entId);
                    }
                }
                else
                {
                    Json = JsonMethod.GetError(2, "登陆超时,请重新登陆!");
                }
            }
            catch (Exception e)
            {
                Json = JsonMethod.GetError(1, e.Message);
            }
            //.Replace("\"", "\\\"").Replace("\r", "").Replace("\n", "")
            context.Response.Write(Json);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 上传图片
        /// </summary>
        protected string UploadImage(HttpContext context)
        {
            string         filePath    = string.Empty;
            string         fileNewName = string.Empty;
            HttpPostedFile _upfile     = context.Request.Files["fulFile"];

            //HttpFileCollection files = context.Request.Files["fulFile"];
            if (_upfile == null)
            {
                return(JsonMethod.GetError(1, "请选择要上传的文件"));//请选择要上传的文件
            }
            else
            {
                string fileName = _upfile.FileName;                                            /*获取文件名: C:\Documents and Settings\Administrator\桌面\123.jpg*/
                string suffix   = fileName.Substring(fileName.LastIndexOf(".") + 1).ToLower(); /*获取后缀名并转为小写: jpg*/
                int    bytes    = _upfile.ContentLength;                                       //获取文件的字节大小
                if (suffix != "jpg" && suffix != "png")
                {
                    return(JsonMethod.GetError(1, "上传文件格式错误")); //只能上传JPG格式图片
                }
                else if (bytes > 1024 * 1024 * 5)
                {
                    return(JsonMethod.GetError(1, "图片不能大于5M")); //图片不能大于1M
                }
                String path        = context.Server.MapPath("/UploadFile/Images/");
                string year        = DateTime.Now.Year.ToString();
                string month       = DateTime.Now.Month.ToString();
                string date        = DateTime.Now.ToFileTimeUtc().ToString();
                string newfileName = date + suffix;
                string newPath     = path + "/" + year + "/" + month;
                _upfile.SaveAs(newPath + "/" + newfileName);//保存图片
                return(JsonMethod.GetError(0, "上传成功"));
            }
        }
Ejemplo n.º 7
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string returnJson = "";

            try
            {
                Dt_User user = RoleFuns.IsLoginAdmin(context.Session["user"]);
                if (user != null)                                              //登录检测,权限检测 context.Session["user"]
                {
                    string  type = context.Request.QueryString["type"].Trim(); //请求类型
                    string  json = context.Request.QueryString["json"].Trim(); //请求参数(json类型)
                    string  proc = context.Request.QueryString["proc"].Trim(); //存储过程名称
                    JObject obj  = (JObject)JsonConvert.DeserializeObject(json);
                    if (obj["type"] != null)
                    {
                        switch (type)
                        {
                        case "ReturnList":
                            returnJson = GetReturnJson(json, proc, user.userId, user.entId);
                            break;

                        case "ReturnDataSet":
                            returnJson = ReturnDataSetJson(json, proc, user.userId, user.entId);
                            break;

                        case "ReturnNumber":
                            returnJson = GetReturnJsonInt(json, proc, user.userId, user.entId);
                            break;

                        case "ReturnListNumber":
                            returnJson = GetReturnDs(json, proc, user.userId, user.entId);
                            break;

                        case "ReturnListJson":
                            returnJson = ReturnListJson(json, proc, user.userId, user.entId);
                            break;

                        case "AddCart":
                            returnJson = ReturnListJson(json, proc, user.userId, user.entId);
                            break;

                        default:
                            returnJson = JsonMethod.GetError(1, "参数错误!");
                            break;
                        }
                    }
                }
                else
                {
                    returnJson = JsonMethod.GetError(2, "登陆超时,请重新登陆!");
                }
            }
            catch (Exception e)
            {
                string msg = e.Message.ToString().Trim().Replace("\"", "\\\"").Replace("\r", "").Replace("\n", "");
                returnJson = JsonMethod.GetError(2, msg);
            }
            context.Response.Write(returnJson);
        }
Ejemplo n.º 8
0
 /// <summary>
 /// 更新数据目录
 /// </summary>
 /// <param name="json"></param>
 /// <param name="proc"></param>
 /// <returns></returns>
 protected string GetReturnJsonInt(string json, string proc, string userId, string entid)
 {
     try
     {
         string         r_json = "";
         var            msg    = "";
         SqlParameter[] param  = (JsonMethod.ListParameter(json, userId, entid)).ToArray();//动态解析json参数
         SqlRun         sql    = new SqlRun(SqlRun.sqlstr);
         int            n      = sql.ExecuteNonQuery(proc, param);
         if (n > 0)
         {
             msg    = "更新成功";
             r_json = JsonMethod.GetError(0, msg);
         }
         else
         {
             msg    = "更新失败!";
             r_json = JsonMethod.GetError(1, msg);
         }
         return(r_json);
     }
     catch (Exception ex)
     {
         string r_json = JsonMethod.GetError(1, ex.Message);
         return(r_json);
     }
 }
Ejemplo n.º 9
0
        /// <summary>
        /// 返回DataTable()
        /// </summary>
        /// <param name="json"></param>
        /// <param name="proc"></param>
        /// <param name="userId"></param>
        /// <param name="entid"></param>
        /// <returns></returns>
        protected string GetReturnJsonBox(string json, string proc, string typename, string userId, string entid)
        {
            SqlParameter[] param = (JsonMethod.ListParameter(json, userId, entid)).ToArray();//动态解析json参数
            SqlRun         sql   = new SqlRun(SqlRun.sqlstr);
            DataTable      ds    = sql.RunProcedureDR(proc, param);

            if (ds.Rows.Count > 0)
            {
                ///加载节点
                string    objList = "";
                DataTable dtc     = ds;
                if (dtc.Rows.Count > 0)
                {
                    switch (typename)
                    {
                    case "Pc_GetType":    //资质角色
                        foreach (DataRow dr_c1 in dtc.Rows)
                        {
                            objList += "<option value='" + dr_c1["TypeId"] + "'>" + dr_c1["Name"] + "</option>";
                        }
                        break;

                    default:
                        break;
                    }
                }
                return("{\"flag\":\"0\",\"objList\":\"" + objList + "\"}");
            }
            else
            {
                string error = "无数据";
                return(JsonMethod.GetError(1, error));
            }
        }
Ejemplo n.º 10
0
        /// <summary>
        /// 返回DataTable(活动模板)
        /// </summary>
        /// <returns></returns>
        protected string GetSelectTemplate()
        {
            SqlRun    sql = new SqlRun(SqlRun.sqlstr);
            DataTable ds  = sql.RunProcedureDR("Pc_Template", new SqlParameter[] {
                new SqlParameter("@type", "PC_GetSelectTemplate")
            });

            if (ds.Rows.Count > 0)
            {
                ///加载商品分类
                string    templatestr = "";
                DataTable dtc         = ds;
                if (dtc.Rows.Count > 0)
                {
                    foreach (DataRow dr_c1 in dtc.Rows)
                    {
                        templatestr += "<option value='" + dr_c1["TemplateCode"] + "'>" + dr_c1["TemplateName"] + "</option>";
                    }
                }
                return("{\"flag\":\"0\",\"templatestr\":\"" + templatestr + "\"}");
            }
            else
            {
                string error = "没有活动模板,请添加->上架";
                return(JsonMethod.GetError(1, error));
            }
        }
Ejemplo n.º 11
0
        /// <summary>
        /// 删除设备类型
        /// </summary>
        /// <param name="json"></param>
        /// <param name="proc"></param>
        /// <param name="userId"></param>
        /// <param name="entid"></param>
        /// <returns></returns>
        protected string GetDelTypeReturnJson(string userId, string entId, string id)
        {
            SqlRun    sql = new SqlRun(SqlRun.sqlstr);
            DataTable ds  = sql.RunProcedureDR("Pc_Coupon", new SqlParameter[] {
                new SqlParameter("@type", "PC_DelType"),
                new SqlParameter("@strWhere", id),
                new SqlParameter("@entId", entId)
            });
            string r_json;

            if (ds.Rows.Count > 0 && ds.Rows[0]["flag"].ToString() == "1")
            {
                r_json = JsonMethod.GetError(0, "删除成功");
            }
            else if (ds.Rows.Count > 0 && ds.Rows[0]["flag"].ToString() == "2")
            {
                string error = "无法删除,请清除所属优惠券";
                r_json = JsonMethod.GetError(1, error);
            }
            else
            {
                string error = "无数据";
                r_json = JsonMethod.GetError(1, error);
            }
            return(r_json);
        }
Ejemplo n.º 12
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string returnJson = "";

            try
            {
                Dt_User user = RoleFuns.IsLoginAdmin(context.Session["user"]);
                if (user != null)                                              //登录检测,权限检测 context.Session["user"]
                {
                    string type = context.Request.QueryString["type"].Trim();  //请求类型
                    string json = context.Request.QueryString["json"].Trim();  //请求参数(json类型)

                    string  proc = context.Request.QueryString["proc"].Trim(); //存储过程名称
                    JObject obj  = (JObject)JsonConvert.DeserializeObject(json);
                    if (obj["type"] != null)
                    {
                        List <string> rolestr = context.Session["role"] != null ? (List <string>)context.Session["role"] : null;
                        RoleFuns.SetAdminLog(user.username, obj["type"].ToString(), rolestr);
                        //if (/*rolestr == null || RoleFuns.SetAdminLog(user.username, obj["type"].ToString(), rolestr) == 0*/false)
                        //{
                        //    returnJson = JsonMethod.GetError(4, "抱歉您没有权限进入!");
                        //}
                        //else
                        //{
                        switch (type)
                        {
                        case "ReturnNumber":
                            returnJson = GetReturnJsonInt(json, proc, user.userId, user.entId);
                            break;

                        case "ReturnList":
                            returnJson = GetReturnJson(json, proc, user.userId, user.entId);
                            break;

                        case "ReturnBox":
                            returnJson = GetReturnJsonBox(json, proc, obj["type"].ToString(), user.userId, user.entId);
                            break;

                        default:
                            returnJson = JsonMethod.GetError(4, "参数错误!");
                            break;
                        }
                        //}
                    }
                }
                else
                {
                    returnJson = JsonMethod.GetError(2, "登陆超时,请重新登陆!");
                }
            }
            catch (Exception e)
            {
                string msg = e.Message.ToString().Trim().Replace("\"", "\\\"").Replace("\r", "").Replace("\n", "");
                returnJson = JsonMethod.GetError(3, msg);
            }
            context.Response.Write(returnJson);
        }
Ejemplo n.º 13
0
        /// <summary>
        /// 管理员登陆
        /// </summary>
        /// <param name="json"></param>
        /// <param name="proc"></param>
        /// <returns></returns>
        protected string UserLogin(string json, string proc, HttpContext context)
        {
            string  r_json    = "";
            JObject obj       = (JObject)JsonConvert.DeserializeObject(json);
            var     admincode = obj["code"].ToString();
            //Log.Debug("登录回传验证码:", admincode);
            var code = context.Session["AdminLognCode"];

            //Log.Debug("后台保存二维码:", code.ToString());
            if (string.IsNullOrEmpty(admincode) || code == null || code.ToString().ToLower() != admincode.ToLower())
            {
                return(JsonMethod.GetError(1, "验证码不正确!"));
            }
            SqlParameter[] param = new SqlParameter[] {
                new SqlParameter("@type", obj["type"].ToString()),
                new SqlParameter("@username", obj["username"].ToString()),
            };

            SqlRun    sql = new SqlRun(SqlRun.sqlstr);
            DataSet   ds  = sql.RunProDataSet(proc, param);
            DataTable dt  = ds.Tables[0];

            if (dt.Rows.Count > 0)
            {
                var pass = Encryption.GetMD5_16(obj["password"].ToString().ToString());
                if (dt.Rows[0]["password"].ToString() == Encryption.GetMD5_16(obj["password"].ToString().ToString()))
                {
                    context.Session.Timeout = 500;
                    //DataTable dq = ds.Tables[1];

                    context.Session["user"] = dt;
                    //context.Session["userId"] = dt.Rows[0]["userId"].ToString();
                    //context.Session["entId"] = dt.Rows[0]["entId"].ToString();
                    //context.Session["name"] = dt.Rows[0]["name"].ToString();
                    //context.Session["password"] = dt.Rows[0]["password"].ToString();
                    //context.Session["roleId"] = dt.Rows[0]["role_id"].ToString();
                    //context.Session["roleType"] = dt.Rows[0]["role_type"].ToString();
                    //context.Session["username"] = dt.Rows[0]["username"].ToString();

                    context.Session["role"] = null;// DateTableTool.DataTableToList<Rolestr>(dq).Select(a=>a.power).ToList();
                    //RoleFuns.AddAdminLoginLog(dt.Rows[0]["username"].ToString(), context.Request.ServerVariables.Get("REMOTE_ADDR").ToString(), context.Request.ServerVariables.Get("REMOTE_PORT").ToString());
                    r_json = JsonMethod.GetError(0, "登陆成功");
                }
                else
                {
                    r_json = JsonMethod.GetError(1, "密码错误");
                }
            }
            else
            {
                r_json = JsonMethod.GetError(1, "该账号不存在");
            }
            return(r_json);
        }
Ejemplo n.º 14
0
        public TrashDialog(string Path)
        {
            InitializeComponent();

            this.Path = Path;

            foreach (var item in JsonMethod <SaveConfigModel> .ReadAllDataJson(this.Path))
            {
                ComboBox_Configuration_Save.Items.Add(item.Name);
            }
        }
Ejemplo n.º 15
0
        /// <summary>
        /// 删除推荐商品
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        private string DeleteGoodsRecommend(string json)
        {
            dynamic obj       = JsonConvert.DeserializeObject <dynamic>(json);
            int     type      = Convert.ToInt32(obj.code);
            int     articleid = Convert.ToInt32(obj.articleid);

            DAL.GoodsInfoDal goodsInfoDal = new DAL.GoodsInfoDal();
            bool             result       = goodsInfoDal.DeleteGoodsRecommend(articleid, type);

            return(result ? JsonMethod.GetError(1, "删除成功") : JsonMethod.GetError(0, "删除失败,请稍后重试"));
        }
Ejemplo n.º 16
0
        public JsonResult UpdateProduct(string category_id, string sub_title, string img_url, string left_pic, string content, string brand_img_url, string sort_id, string article_id,
                                        string generic, string drug_factory, string approval_number, string drug_spec, string big_package, string package_unit, string min_package, string mnemonic_code, string Storage_conditions,
                                        string BrandCode, string rate, string min_package_astrict, string price, string category, string dosage_form, string recommendList, string isZbz, string isDbz, string zhaiyao)
        {
            Dt_User user = RoleFuns.IsLoginAdmin(HttpContext.Session["user"]);

            if (user != null)//登录检测,权限检测 context.Session["user"]
            {
                try
                {
                    StringBuilder strSql = new StringBuilder();
                    //修改商品主表
                    strSql.Append("update dt_article set category_id='" + category_id + "',title='" + sub_title + "',img_url='" + img_url + "',");
                    strSql.Append("left_pic='" + left_pic + "',content='" + content + "',brand_img_url='" + brand_img_url + "',sort_id='" + sort_id + "' ");
                    strSql.Append(" ,zhaiyao='" + zhaiyao + "' where id='" + article_id + "' and entid='" + user.entId + "' ;");
                    //修改属性表
                    strSql.Append("update dt_article_attribute set sub_title='" + sub_title.ToString().Trim() + "',generic='" + generic + "',drug_factory='" + drug_factory + "',");
                    strSql.Append("approval_number='" + approval_number + "',drug_spec='" + drug_spec + "',big_package='" + big_package + "',min_package='" + min_package + "',");
                    strSql.Append("package_unit='" + package_unit + "',Storage_conditions='" + Storage_conditions + "',category='" + category + "',mnemonic_code='" + mnemonic_code + "',");
                    strSql.Append("dosage_form='" + dosage_form + "',rate='" + rate + "',brandId='" + BrandCode + "',price='" + price + "',min_package_astrict='" + min_package_astrict + "'");
                    strSql.Append(",scattered='" + isZbz + "',packControl='" + isDbz + "' where article_id='" + article_id + "' and entid='" + user.entId + "'");
                    //status = " + obj["status"].ToString().Trim() + "
                    SqlRun sql  = new SqlRun(SqlRun.sqlstr);
                    bool   flag = sql.ExecuteSql(strSql.ToString());
                    if (flag)
                    {
                        SqlParameter[] prmt = new SqlParameter[] {
                            new SqlParameter("@type", "GoodsRecommend"),
                            new SqlParameter("@recommendList", recommendList),
                            new SqlParameter("@article_id", article_id),
                            new SqlParameter("@BrandCode", BrandCode),
                            new SqlParameter("@entId", user.entId),
                        };
                        int n = sql.ExecuteNonQuery("Proc_Admin_GoodsList", prmt);
                        return(Json(JsonMethod.GetError(0, "操作成功")));
                    }
                    else
                    {
                        return(Json(JsonMethod.GetError(1, "操作失败")));
                    }
                }
                catch (Exception ex)
                {
                    Log.Error("错误:商品编辑失败", ex.Message);
                    LogQueue.Write(LogType.Error, "Goods/UpdateProduct", ex.Message);
                    return(Json(JsonMethod.GetError(1, "操作失败")));
                }
            }
            else
            {
                return(Json(JsonMethod.GetError(2, "登录超时")));
            }
        }
Ejemplo n.º 17
0
        /// <summary>
        /// 网站设置修改
        /// </summary>
        /// <param name="json"></param>
        /// <param name="proc"></param>
        /// <param name="UserId"></param>
        /// <param name="entId"></param>
        /// <returns></returns>
        protected string SaveBase(string json, string proc, string UserId, string entId)
        {
            JObject obj = (JObject)JsonConvert.DeserializeObject(json);

            ///修改webconfig节点
            BasisConfig.UpdateAppSetting("SercerIp", obj["ip"].ToString());
            StringBuilder strSql = new StringBuilder();

            //修改商品主表
            strSql.Append("select entid from dt_system_base(nolock) where entid='" + entId + "'");
            SqlRun    sql = new SqlRun(SqlRun.sqlstr);
            DataTable dt  = sql.RtDataTable(strSql.ToString());

            //清空StringBuilder
            strSql.Length = 0;
            if (dt.Rows.Count > 0)
            {
                strSql.Append("update dt_system_base set web_name=@web_name,web_ip=@web_ip,company=@company,complaints=@complaints,xxjyz=@xxjyz,xxfwz=@xxfwz,icp=@icp,beizhu=@beizhu,img_app=@img_app,img_logo=@img_logo,img_left=@img_left,img_right=@img_right,img_service=@img_service,link_service=@link_service where entid=@entid");
            }
            else
            {
                strSql.Append("insert into dt_system_base(entId,web_name,web_ip,company,complaints,xxjyz,xxfwz,icp,beizhu,img_app,img_logo,img_left,img_right,img_service,link_service) ");
                strSql.Append(" values(@entId,@web_name,@web_ip,@company,@complaints,@xxjyz,@xxfwz,@icp,@beizhu,@img_app,@img_logo,@img_left,@img_right,@img_service,@link_service);");
            }
            SqlParameter[] prmt = new SqlParameter[] {
                new SqlParameter("@entid", entId),
                new SqlParameter("@web_name", obj["title"].ToString()),
                new SqlParameter("@web_ip", obj["ip"].ToString()),
                new SqlParameter("@company", obj["company"].ToString()),
                new SqlParameter("@complaints", obj["complaints"].ToString()),
                new SqlParameter("@xxjyz", obj["xxjyz"].ToString()),
                new SqlParameter("@xxfwz", obj["xxfwz"].ToString()),
                new SqlParameter("@icp", obj["ICP"].ToString()),
                new SqlParameter("@beizhu", obj["beizhu"].ToString()),
                new SqlParameter("@img_app", obj["app_url"].ToString()),
                new SqlParameter("@img_logo", obj["logo_url"].ToString()),
                new SqlParameter("@img_left", obj["left_url"].ToString()),
                new SqlParameter("@img_right", obj["right_url"].ToString()),
                new SqlParameter("@img_service", obj["kf_url"].ToString()),
                new SqlParameter("@link_service", obj["kf_link"].ToString())
            };

            int n = sql.ExecuteSql(strSql.ToString(), prmt);

            if (n > 0)
            {
                return(JsonMethod.GetError(0, "提交成功"));
            }
            else
            {
                return(JsonMethod.GetError(1, "提交失败"));
            }
        }
Ejemplo n.º 18
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string returnJson = "";

            try
            {
                Dt_User user = RoleFuns.IsLoginAdmin(context.Session["user"]);
                //if (context.Session["UserId"] != null)
                //{
                //    userId = context.Session["UserId"].ToString().Trim();
                //    entid = context.Session["Entid"].ToString().Trim();
                //}
                if (user != null)
                {
                    string  type = context.Request.QueryString["type"].Trim(); //请求类型
                    string  json = context.Request.QueryString["json"].Trim(); //请求参数(json类型)
                    string  proc = context.Request.QueryString["proc"].Trim(); //存储过程名称
                    JObject obj  = (JObject)JsonConvert.DeserializeObject(json);
                    if (obj["type"] != null)
                    {
                        List <string> rolestr = context.Session["role"] != null ? (List <string>)context.Session["role"] : null;
                        RoleFuns.SetAdminLog(user.username, obj["type"].ToString(), rolestr);
                        //执行查询返回列表
                        if (type == "ReturnList")
                        {
                            returnJson = GetReturnJson(json, proc, user.userId, user.entId);
                        }
                        //执行修改,插入返回影响行数
                        else if (type == "ReturnNumber")
                        {
                            returnJson = GetReturnJsonInt(json, proc, user.userId, user.entId);
                        }
                        //执行修改,插入返回执行结果
                        else if (type == "ReturnListNumber")
                        {
                            returnJson = GetReturnDs(json, proc, user.userId, user.entId);
                        }
                    }
                }
                else
                {
                    returnJson = JsonMethod.GetError(2, "登陆超时,请重新登陆!");
                }
            }
            catch (Exception e)
            {
                string msg = e.Message.ToString().Trim().Replace("\"", "\\\"").Replace("\r", "").Replace("\n", "");
                returnJson = JsonMethod.GetError(4, msg);;
            }
            context.Response.Write(returnJson);
        }
Ejemplo n.º 19
0
        /// <summary>
        /// 经纬度解析
        /// </summary>
        /// <param name="Longitude">精度</param>
        /// <param name="Latitude">纬度</param>
        /// <param name="CallType">响应方式</param>
        public BaiduLocation Getdistrict(string Longitude, string Latitude, string CallType)
        {
            var url         = "http://api.map.baidu.com/geocoder";
            var parameters1 = new Dictionary <string, string>();

            parameters1.Add("location", Latitude + "," + Longitude);//维度加精度
            parameters1.Add("output", CallType);
            parameters1.Add("key", "8K08CxWScbFV7BKKarcevPq9LWBaVAUj");
            var result      = _http.HttpSend(url, parameters1, "post");
            var baiduResult = JsonMethod.JsonToModel <BaiduLocation>(result);

            return(baiduResult);
        }
Ejemplo n.º 20
0
        private void Button_Validate_Click(object sender, RoutedEventArgs e)
        {
            List <SaveConfigModel> saves = JsonMethod <SaveConfigModel> .ReadAllDataJson(Path);

            SaveConfigModel save = saves.Where(x => x.Name == ComboBox_Configuration_Save.SelectedItem.ToString()).FirstOrDefault();

            saves.Remove(save);

            JsonMethod <SaveConfigModel> .WriteDataJson(Path, JsonMethod <SaveConfigModel> .AddData(saves));

            NewSaveConfig = saves;

            this.Close();
        }
Ejemplo n.º 21
0
        public void ProcessRequest(HttpContext context)
        {
            string Json = "";

            try
            {
                Dt_User user = RoleFuns.IsLoginAdmin(context.Session["user"]);
                if (user != null)//登录检测,权限检测 context.Session["user"]
                {
                    string type = context.Request.QueryString["Type"].Trim();
                    if (type == "Search")
                    {
                        Json = Search(context);
                    }
                    else if (type == "SaveSign")
                    {
                        Json = SaveSign(context);
                    }
                    else if (type == "delSign")
                    {
                        Json = delSign(context);
                    }
                    else if (type == "CreateSign")
                    {
                        Json = CreateSign(context, user.userId, user.entId);
                    }
                    else if (type == "GetSign")
                    {
                        Json = GetSign(context, user.userId, user.entId);
                    }
                    else if (type == "UpdateData")
                    {
                        Json = UpdateData(context);
                    }
                }
                else
                {
                    Json = JsonMethod.GetError(2, "登陆超时,请重新登陆!");
                }
            }
            catch (Exception e)
            {
                return_code = 2;
                string error = e.Message.ToString().Trim().Replace("\"", "\\\"").Replace("\r", "").Replace("\n", "");
                Json = DTcms.Common.GetJson.GetErrorJson(return_code, 0, error);
            }
            JObject jo = (JObject)JsonConvert.DeserializeObject(Json);

            context.Response.Write(jo);
        }
Ejemplo n.º 22
0
        /// <summary>
        /// 修改是否启用
        /// </summary>
        /// <param name="json"></param>
        /// <param name="proc"></param>
        /// <param name="userid"></param>
        /// <param name="entid"></param>
        /// <returns></returns>
        protected string EnablePayment(string json, string proc, string userid, string entid)
        {
            SqlParameter[] param  = (JsonMethod.ListParameter(json, userid, entid)).ToArray();//动态解析json参数
            SqlRun         sql    = new SqlRun(SqlRun.sqlstr);
            int            number = sql.ExecuteNonQuery(proc, param);

            if (number > 0)
            {
                return(JsonMethod.GetError(0, "操作成功"));
            }
            else
            {
                return(JsonMethod.GetError(1, "操作失败"));
            }
        }
Ejemplo n.º 23
0
        private string GetClientType(HttpContext context, string userid, string entid)
        {
            string    Json   = "";
            string    sqlStr = "select TypeID,ClientType from dt_CustomerType where status=1   order by TypeID asc";
            SqlRun    sql    = new SqlRun(SqlRun.sqlstr);
            DataTable dt     = sql.RtDataTable(sqlStr);

            if (dt.Rows.Count > 0)
            {
                Json = JsonMethod.GetDataTable(0, dt.Rows.Count, 1, dt);
            }
            else
            {
                Json = JsonMethod.GetError(1, "客户分类加载失败");
            }
            return(Json);
        }
Ejemplo n.º 24
0
        /// <summary>
        /// 更新配置的数据
        /// </summary>
        /// <param name="json"></param>
        /// <param name="proc"></param>
        /// <returns></returns>
        protected string SetConfig(string json)
        {
            JObject obj = (JObject)JsonConvert.DeserializeObject(json);
            string  r_json;

            if (obj["bonusAmount"] != null)
            {
                UpdateAppSetting("OrderAmount", obj["bonusAmount"].ToString());
                r_json = JsonMethod.GetError(0, "修改成功");
            }
            else
            {
                string msg = "修改失败";
                r_json = JsonMethod.GetError(1, msg);
            }
            return(r_json);
        }
Ejemplo n.º 25
0
        /// <summary>
        /// 根据名称获取天气
        /// </summary>
        /// <param name="cityName"></param>
        /// <returns></returns>
        public WeatherInfo GetWeatherInfo(string cityName)
        {
            var url         = "http://wthrcdn.etouch.cn/WeatherApi";
            var parameters2 = new Dictionary <string, string>();

            parameters2.Add("city", cityName);
            var weatherXML  = _http.HttpSend(url, parameters2, "post").ToString();
            var weatherInfo = new WeatherInfo();
            var doc         = new XmlDocument();

            doc.LoadXml(weatherXML);
            var weatherJson = JsonMethod.XmlToJSON(doc);

            weatherInfo = JsonMethod.JsonToModel <WeatherInfo>(weatherJson);

            return(weatherInfo);
        }
Ejemplo n.º 26
0
        /// <summary>
        /// 加载商品选项分类/属性/状态
        /// </summary>
        /// <returns></returns>
        protected string LoadCheckBox(string json, string proc, string userId, string entId, HttpContext context)
        {
            string checkType = context.Request.QueryString["CheckType"];

            SqlParameter[] param = (JsonMethod.ListParameter(json, userId, entId)).ToArray();//动态解析json参数
            SqlRun         sql   = new SqlRun(SqlRun.sqlstr);
            DataSet        ds    = sql.RunProDataSet(proc, param);
            ///加载商品分类
            string    categoryList = "";
            DataTable dtc          = ds.Tables[0];

            if (dtc.Rows.Count > 0)
            {
                DataRow[] drc_1 = dtc.Select("class_layer=1", "sort_id asc");
                foreach (DataRow dr_c1 in drc_1)
                {
                    categoryList += "<option value='" + dr_c1["id"] + "'>" + dr_c1["title"] + "</option>";
                    DataRow[] drc_2 = dtc.Select("class_layer=2 and parent_id=" + dr_c1["id"] + " ", "sort_id asc");
                    foreach (DataRow dr_c2 in drc_2)
                    {
                        categoryList += "<option value='" + dr_c2["id"] + "'>&nbsp;&nbsp;├" + dr_c2["title"] + "</option>";
                    }
                }
            }
            ///加载商品属性
            string    attributeList = "";
            int       no            = 0;
            DataTable dta           = ds.Tables[1];

            if (dta.Rows.Count > 0)
            {
                foreach (DataRow dr_a in dta.Rows)
                {
                    if (checkType == "CheckBox")
                    {
                        attributeList += "<div class='radio-box'><input name='isRecommend' type='checkbox' id='tjCheck_" + no + "' value='" + dr_a["id"] + "' ><label for='status-" + no + "'>" + dr_a["title"] + "</label></div>";
                    }
                    else
                    {
                        attributeList += "<option value='" + dr_a["id"] + "'>" + dr_a["title"] + "</option>";
                    }
                    no++;
                }
            }
            return("{\"flag\":\"0\",\"categoryList\":\"" + categoryList + "\",\"attributeList\":\"" + attributeList + "\"}");
        }
Ejemplo n.º 27
0
        /// <summary>
        /// 获取商品分类列表
        /// </summary>
        /// <param name="json"></param>
        /// <param name="proc"></param>
        /// <param name="userId"></param>
        /// <param name="entId"></param>
        /// <returns></returns>
        protected string GetGoodsCategory(string json, string proc, string userId, string entId)
        {
            SqlParameter[] param = (JsonMethod.ListParameter(json, userId, entId)).ToArray();//动态解析json参数
            SqlRun         sql   = new SqlRun(SqlRun.sqlstr);
            DataTable      dt    = sql.RunProcedureDR(proc, param);
            string         r_json;

            if (dt.Rows.Count > 0)
            {
                r_json = JsonMethod.GoodsCategory(dt);
            }
            else
            {
                string error = "无数据";
                r_json = JsonMethod.GetError(1, error);
            }
            return(r_json);
        }
Ejemplo n.º 28
0
        /// <summary>
        /// 获取多个表返回Json
        /// </summary>
        /// <param name="json"></param>
        /// <param name="proc"></param>
        /// <param name="userId"></param>
        /// <param name="entid"></param>
        /// <returns></returns>
        protected string ReturnDataSetJson(string json, string proc, string userId, string entId)
        {
            SqlParameter[] param = (JsonMethod.ListParameter(json, userId, entId)).ToArray();//动态解析json参数
            SqlRun         sql   = new SqlRun(SqlRun.sqlstr);
            DataSet        ds    = sql.RunProDataSet(proc, param);
            string         r_json;

            if (ds.Tables.Count > 0)
            {
                r_json = JsonMethod.DataSetToJson("0", ds);
            }
            else
            {
                string error = "无数据";
                r_json = JsonMethod.GetError(1, error);
            }
            return(r_json);
        }
Ejemplo n.º 29
0
        protected string SaveTemplate(string title, string content, string strWhere)
        {
            SqlRun sql = new SqlRun(SqlRun.sqlstr);
            int    num = sql.ExecuteNonQuery("Pc_Template", new SqlParameter[] {
                new SqlParameter("@type", "PC_AddTemplate"),
                new SqlParameter("@TemplateName", title),
                new SqlParameter("@TemplateText", content),
                new SqlParameter("@TemplateCode", strWhere)
            });

            if (num > 0)
            {
                return(JsonMethod.GetError(0, "操作成功"));
            }
            else
            {
                return(JsonMethod.GetError(1, "操作失败"));
            }
        }
Ejemplo n.º 30
0
        protected string GetWebSiteBase(string json, string proc, string UserId, string entId)
        {
            JObject       obj    = (JObject)JsonConvert.DeserializeObject(json);
            StringBuilder strSql = new StringBuilder();

            //修改商品主表
            strSql.Append("select entId,web_name,web_ip,company,complaints,xxjyz,xxfwz,icp,beizhu,img_app,img_logo,img_left,img_right,img_service,link_service from dt_system_base(nolock) where entid='" + entId + "'");
            SqlRun    sql = new SqlRun(SqlRun.sqlstr);
            DataTable dt  = sql.RtDataTable(strSql.ToString());

            if (dt.Rows.Count > 0)
            {
                return(JsonMethod.GetDataTable(0, 1, 1, dt));
            }
            else
            {
                return(JsonMethod.GetError(1, "无数据"));
            }
        }
Ejemplo n.º 31
0
 public WeiboClientV2()
 {
     //TODO: Set BaseUri property Here 在这里指定服务基础地址
     BaseUri = new Uri("https://api.weibo.com/2");
             
 _executeEmotionsMethod = new JsonMethod<Emotions.Request, Emotions.Response>(this, new Uri("emotions.json", UriKind.Relative));
             
 _executeCommentsByMeMethod = new JsonMethod<CommentsByMe.Request, CommentsByMe.Response>(this, new Uri("comments/by_me.json", UriKind.Relative));
             
 _executeCommentsCreateMethod = new JsonMethod<CommentsCreate.Request, CommentsCreate.Response>(this, new Uri("comments/create.json", UriKind.Relative));
             
 _executeCommentsDestroyMethod = new JsonMethod<CommentsDestroy.Request, CommentsDestroy.Response>(this, new Uri("comments/destroy.json", UriKind.Relative));
             
 _executeCommentsDestroyBatchMethod = new JsonMethod<CommentsDestroyBatch.Request, CommentsDestroyBatch.Response>(this, new Uri("comments/destroy_batch.json", UriKind.Relative));
             
 _executeCommentsMentionsMethod = new JsonMethod<CommentsMentions.Request, CommentsMentions.Response>(this, new Uri("comments/mentions.json", UriKind.Relative));
             
 _executeCommentsReplyMethod = new JsonMethod<CommentsReply.Request, CommentsReply.Response>(this, new Uri("comments/reply.json", UriKind.Relative));
             
 _executeCommentsShowMethod = new JsonMethod<CommentsShow.Request, CommentsShow.Response>(this, new Uri("comments/show.json", UriKind.Relative));
             
 _executeCommentsShowBatchMethod = new JsonMethod<CommentsShowBatch.Request, CommentsShowBatch.Response>(this, new Uri("comments/show_batch.json", UriKind.Relative));
             
 _executeCommentsTimelineMethod = new JsonMethod<CommentsTimeline.Request, CommentsTimeline.Response>(this, new Uri("comments/timeline.json", UriKind.Relative));
             
 _executeCommentsToMeMethod = new JsonMethod<CommentsToMe.Request, CommentsToMe.Response>(this, new Uri("comments/to_me.json", UriKind.Relative));
             
 _executeFriendshipsCreateMethod = new JsonMethod<FriendshipsCreate.Request, FriendshipsCreate.Response>(this, new Uri("friendships/create.json", UriKind.Relative));
             
 _executeFriendshipsDestroyMethod = new JsonMethod<FriendshipsDestroy.Request, FriendshipsDestroy.Response>(this, new Uri("friendships/destroy.json", UriKind.Relative));
             
 _executeFriendshipsFollowersMethod = new JsonMethod<FriendshipsFollowers.Request, FriendshipsFollowers.Response>(this, new Uri("friendships/followers.json", UriKind.Relative));
             
 _executeFriendshipsFriendsMethod = new JsonMethod<FriendshipsFriends.Request, FriendshipsFriends.Response>(this, new Uri("friendships/friends.json", UriKind.Relative));
             
 _executeFriendshipsGroupsMethod = new JsonMethod<FriendshipsGroups.Request, FriendshipsGroups.Response>(this, new Uri("friendships/groups.json", UriKind.Relative));
             
 _executeFriendshipsShowMethod = new JsonMethod<FriendshipsShow.Request, FriendshipsShow.Response>(this, new Uri("friendships/show.json", UriKind.Relative));
             
 _executeFriendshipsFollowersActiveMethod = new JsonMethod<FriendshipsFollowersActive.Request, FriendshipsFollowersActive.Response>(this, new Uri("friendships/followers/active.json", UriKind.Relative));
             
 _executeFriendshipsFollowersIdsMethod = new JsonMethod<FriendshipsFollowersIds.Request, FriendshipsFollowersIds.Response>(this, new Uri("friendships/followers/ids.json", UriKind.Relative));
             
 _executeFriendshipsFriendsBilateralMethod = new JsonMethod<FriendshipsFriendsBilateral.Request, FriendshipsFriendsBilateral.Response>(this, new Uri("friendships/friends/bilateral.json", UriKind.Relative));
             
 _executeFriendshipsFriendsIdsMethod = new JsonMethod<FriendshipsFriendsIds.Request, FriendshipsFriendsIds.Response>(this, new Uri("friendships/friends/ids.json", UriKind.Relative));
             
 _executeFriendshipsFriendsInCommonMethod = new JsonMethod<FriendshipsFriendsInCommon.Request, FriendshipsFriendsInCommon.Response>(this, new Uri("friendships/friends/in_common.json", UriKind.Relative));
             
 _executeFriendshipsFriendsBilateralIdsMethod = new JsonMethod<FriendshipsFriendsBilateralIds.Request, FriendshipsFriendsBilateralIds.Response>(this, new Uri("friendships/friends/bilateral/ids.json", UriKind.Relative));
             
 _executeFriendshipsFriendsChainFollowersMethod = new JsonMethod<FriendshipsFriendsChainFollowers.Request, FriendshipsFriendsChainFollowers.Response>(this, new Uri("friendships/friends_chain/followers.json", UriKind.Relative));
             
 _executeFriendshipsRemarkUpdateMethod = new JsonMethod<FriendshipsRemarkUpdate.Request, FriendshipsRemarkUpdate.Response>(this, new Uri("friendships/remark/update.json", UriKind.Relative));
             
 _executeStatusesBilateralTimelineMethod = new JsonMethod<StatusesBilateralTimeline.Request, StatusesBilateralTimeline.Response>(this, new Uri("statuses/bilateral_timeline.json", UriKind.Relative));
             
 _executeStatusesCountMethod = new JsonMethod<StatusesCount.Request, StatusesCount.Response>(this, new Uri("statuses/count.json", UriKind.Relative));
             
 _executeStatusesDestroyMethod = new JsonMethod<StatusesDestroy.Request, StatusesDestroy.Response>(this, new Uri("statuses/destroy.json", UriKind.Relative));
             
 _executeStatusesFriendsTimelineMethod = new JsonMethod<StatusesFriendsTimeline.Request, StatusesFriendsTimeline.Response>(this, new Uri("statuses/friends_timeline.json", UriKind.Relative));
             
 _executeStatusesHomeTimelineMethod = new JsonMethod<StatusesHomeTimeline.Request, StatusesHomeTimeline.Response>(this, new Uri("statuses/home_timeline.json", UriKind.Relative));
             
 _executeStatusesMentionsMethod = new JsonMethod<StatusesMentions.Request, StatusesMentions.Response>(this, new Uri("statuses/mentions.json", UriKind.Relative));
             
 _executeStatusesPublicTimelineMethod = new JsonMethod<StatusesPublicTimeline.Request, StatusesPublicTimeline.Response>(this, new Uri("statuses/public_timeline.json", UriKind.Relative));
             
 _executeStatusesQueryidMethod = new JsonMethod<StatusesQueryid.Request, StatusesQueryid.Response>(this, new Uri("statuses/queryid.json", UriKind.Relative));
             
 _executeStatusesQuerymidMethod = new JsonMethod<StatusesQuerymid.Request, StatusesQuerymid.Response>(this, new Uri("statuses/querymid.json", UriKind.Relative));
             
 _executeStatusesRepostMethod = new JsonMethod<StatusesRepost.Request, StatusesRepost.Response>(this, new Uri("statuses/repost.json", UriKind.Relative));
             
 _executeStatusesRepostByMeMethod = new JsonMethod<StatusesRepostByMe.Request, StatusesRepostByMe.Response>(this, new Uri("statuses/repost_by_me.json", UriKind.Relative));
             
 _executeStatusesRepostTimelineMethod = new JsonMethod<StatusesRepostTimeline.Request, StatusesRepostTimeline.Response>(this, new Uri("statuses/repost_timeline.json", UriKind.Relative));
             
 _executeStatusesShowMethod = new JsonMethod<StatusesShow.Request, StatusesShow.Response>(this, new Uri("statuses/show.json", UriKind.Relative));
             
 _executeStatusesUpdateMethod = new JsonMethod<StatusesUpdate.Request, StatusesUpdate.Response>(this, new Uri("statuses/update.json", UriKind.Relative));
             
 _executeStatusesUploadMethod = new JsonMethod<StatusesUpload.Request, StatusesUpload.Response>(this, new Uri("statuses/upload.json", UriKind.Relative));
             
 _executeStatusesUploadUrlTextMethod = new JsonMethod<StatusesUploadUrlText.Request, StatusesUploadUrlText.Response>(this, new Uri("statuses/upload_url_text.json", UriKind.Relative));
             
 _executeStatusesUserTimelineMethod = new JsonMethod<StatusesUserTimeline.Request, StatusesUserTimeline.Response>(this, new Uri("statuses/user_timeline.json", UriKind.Relative));
             
 _executeStatusesFilterCreateMethod = new JsonMethod<StatusesFilterCreate.Request, StatusesFilterCreate.Response>(this, new Uri("statuses/filter/create.json", UriKind.Relative));
             
 _executeStatusesFriendsTimelineIdsMethod = new JsonMethod<StatusesFriendsTimelineIds.Request, StatusesFriendsTimelineIds.Response>(this, new Uri("statuses/friends_timeline/ids.json", UriKind.Relative));
             
 _executeStatusesMentionsIdsMethod = new JsonMethod<StatusesMentionsIds.Request, StatusesMentionsIds.Response>(this, new Uri("statuses/mentions/ids.json", UriKind.Relative));
             
 _executeStatusesMentionsShieldMethod = new JsonMethod<StatusesMentionsShield.Request, StatusesMentionsShield.Response>(this, new Uri("statuses/mentions/shield.json", UriKind.Relative));
             
 _executeStatusesRepostTimelineIdsMethod = new JsonMethod<StatusesRepostTimelineIds.Request, StatusesRepostTimelineIds.Response>(this, new Uri("statuses/repost_timeline/ids.json", UriKind.Relative));
             
 _executeStatusesToMeIdsMethod = new JsonMethod<StatusesToMeIds.Request, StatusesToMeIds.Response>(this, new Uri("statuses/to_me/ids.json", UriKind.Relative));
             
 _executeStatusesUserTimelineIdsMethod = new JsonMethod<StatusesUserTimelineIds.Request, StatusesUserTimelineIds.Response>(this, new Uri("statuses/user_timeline/ids.json", UriKind.Relative));
             
 _executeUsersCancelTopStatusMethod = new JsonMethod<UsersCancelTopStatus.Request, UsersCancelTopStatus.Response>(this, new Uri("users/cancel_top_status.json", UriKind.Relative));
             
 _executeUsersCountsMethod = new JsonMethod<UsersCounts.Request, UsersCounts.Response>(this, new Uri("users/counts.json", UriKind.Relative));
             
 _executeUsersDomainShowMethod = new JsonMethod<UsersDomainShow.Request, UsersDomainShow.Response>(this, new Uri("users/domain_show.json", UriKind.Relative));
             
 _executeUsersGetTopStatusMethod = new JsonMethod<UsersGetTopStatus.Request, UsersGetTopStatus.Response>(this, new Uri("users/get_top_status.json", UriKind.Relative));
             
 _executeUsersSetTopStatusMethod = new JsonMethod<UsersSetTopStatus.Request, UsersSetTopStatus.Response>(this, new Uri("users/set_top_status.json", UriKind.Relative));
             
 _executeUsersShowMethod = new JsonMethod<UsersShow.Request, UsersShow.Response>(this, new Uri("users/show.json", UriKind.Relative));
             
 _executeUsersShowRankMethod = new JsonMethod<UsersShowRank.Request, UsersShowRank.Response>(this, new Uri("users/show_rank.json", UriKind.Relative));
             
         _requestEmotionsMethod = new JsonMethod<Emotions.Request, Stream>(this, new Uri("emotions.json", UriKind.Relative));
         _requestCommentsByMeMethod = new JsonMethod<CommentsByMe.Request, Stream>(this, new Uri("comments/by_me.json", UriKind.Relative));
         _requestCommentsCreateMethod = new JsonMethod<CommentsCreate.Request, Stream>(this, new Uri("comments/create.json", UriKind.Relative));
         _requestCommentsDestroyMethod = new JsonMethod<CommentsDestroy.Request, Stream>(this, new Uri("comments/destroy.json", UriKind.Relative));
         _requestCommentsDestroyBatchMethod = new JsonMethod<CommentsDestroyBatch.Request, Stream>(this, new Uri("comments/destroy_batch.json", UriKind.Relative));
         _requestCommentsMentionsMethod = new JsonMethod<CommentsMentions.Request, Stream>(this, new Uri("comments/mentions.json", UriKind.Relative));
         _requestCommentsReplyMethod = new JsonMethod<CommentsReply.Request, Stream>(this, new Uri("comments/reply.json", UriKind.Relative));
         _requestCommentsShowMethod = new JsonMethod<CommentsShow.Request, Stream>(this, new Uri("comments/show.json", UriKind.Relative));
         _requestCommentsShowBatchMethod = new JsonMethod<CommentsShowBatch.Request, Stream>(this, new Uri("comments/show_batch.json", UriKind.Relative));
         _requestCommentsTimelineMethod = new JsonMethod<CommentsTimeline.Request, Stream>(this, new Uri("comments/timeline.json", UriKind.Relative));
         _requestCommentsToMeMethod = new JsonMethod<CommentsToMe.Request, Stream>(this, new Uri("comments/to_me.json", UriKind.Relative));
         _requestFriendshipsCreateMethod = new JsonMethod<FriendshipsCreate.Request, Stream>(this, new Uri("friendships/create.json", UriKind.Relative));
         _requestFriendshipsDestroyMethod = new JsonMethod<FriendshipsDestroy.Request, Stream>(this, new Uri("friendships/destroy.json", UriKind.Relative));
         _requestFriendshipsFollowersMethod = new JsonMethod<FriendshipsFollowers.Request, Stream>(this, new Uri("friendships/followers.json", UriKind.Relative));
         _requestFriendshipsFriendsMethod = new JsonMethod<FriendshipsFriends.Request, Stream>(this, new Uri("friendships/friends.json", UriKind.Relative));
         _requestFriendshipsGroupsMethod = new JsonMethod<FriendshipsGroups.Request, Stream>(this, new Uri("friendships/groups.json", UriKind.Relative));
         _requestFriendshipsShowMethod = new JsonMethod<FriendshipsShow.Request, Stream>(this, new Uri("friendships/show.json", UriKind.Relative));
         _requestFriendshipsFollowersActiveMethod = new JsonMethod<FriendshipsFollowersActive.Request, Stream>(this, new Uri("friendships/followers/active.json", UriKind.Relative));
         _requestFriendshipsFollowersIdsMethod = new JsonMethod<FriendshipsFollowersIds.Request, Stream>(this, new Uri("friendships/followers/ids.json", UriKind.Relative));
         _requestFriendshipsFriendsBilateralMethod = new JsonMethod<FriendshipsFriendsBilateral.Request, Stream>(this, new Uri("friendships/friends/bilateral.json", UriKind.Relative));
         _requestFriendshipsFriendsIdsMethod = new JsonMethod<FriendshipsFriendsIds.Request, Stream>(this, new Uri("friendships/friends/ids.json", UriKind.Relative));
         _requestFriendshipsFriendsInCommonMethod = new JsonMethod<FriendshipsFriendsInCommon.Request, Stream>(this, new Uri("friendships/friends/in_common.json", UriKind.Relative));
         _requestFriendshipsFriendsBilateralIdsMethod = new JsonMethod<FriendshipsFriendsBilateralIds.Request, Stream>(this, new Uri("friendships/friends/bilateral/ids.json", UriKind.Relative));
         _requestFriendshipsFriendsChainFollowersMethod = new JsonMethod<FriendshipsFriendsChainFollowers.Request, Stream>(this, new Uri("friendships/friends_chain/followers.json", UriKind.Relative));
         _requestFriendshipsRemarkUpdateMethod = new JsonMethod<FriendshipsRemarkUpdate.Request, Stream>(this, new Uri("friendships/remark/update.json", UriKind.Relative));
         _requestStatusesBilateralTimelineMethod = new JsonMethod<StatusesBilateralTimeline.Request, Stream>(this, new Uri("statuses/bilateral_timeline.json", UriKind.Relative));
         _requestStatusesCountMethod = new JsonMethod<StatusesCount.Request, Stream>(this, new Uri("statuses/count.json", UriKind.Relative));
         _requestStatusesDestroyMethod = new JsonMethod<StatusesDestroy.Request, Stream>(this, new Uri("statuses/destroy.json", UriKind.Relative));
         _requestStatusesFriendsTimelineMethod = new JsonMethod<StatusesFriendsTimeline.Request, Stream>(this, new Uri("statuses/friends_timeline.json", UriKind.Relative));
         _requestStatusesHomeTimelineMethod = new JsonMethod<StatusesHomeTimeline.Request, Stream>(this, new Uri("statuses/home_timeline.json", UriKind.Relative));
         _requestStatusesMentionsMethod = new JsonMethod<StatusesMentions.Request, Stream>(this, new Uri("statuses/mentions.json", UriKind.Relative));
         _requestStatusesPublicTimelineMethod = new JsonMethod<StatusesPublicTimeline.Request, Stream>(this, new Uri("statuses/public_timeline.json", UriKind.Relative));
         _requestStatusesQueryidMethod = new JsonMethod<StatusesQueryid.Request, Stream>(this, new Uri("statuses/queryid.json", UriKind.Relative));
         _requestStatusesQuerymidMethod = new JsonMethod<StatusesQuerymid.Request, Stream>(this, new Uri("statuses/querymid.json", UriKind.Relative));
         _requestStatusesRepostMethod = new JsonMethod<StatusesRepost.Request, Stream>(this, new Uri("statuses/repost.json", UriKind.Relative));
         _requestStatusesRepostByMeMethod = new JsonMethod<StatusesRepostByMe.Request, Stream>(this, new Uri("statuses/repost_by_me.json", UriKind.Relative));
         _requestStatusesRepostTimelineMethod = new JsonMethod<StatusesRepostTimeline.Request, Stream>(this, new Uri("statuses/repost_timeline.json", UriKind.Relative));
         _requestStatusesShowMethod = new JsonMethod<StatusesShow.Request, Stream>(this, new Uri("statuses/show.json", UriKind.Relative));
         _requestStatusesUpdateMethod = new JsonMethod<StatusesUpdate.Request, Stream>(this, new Uri("statuses/update.json", UriKind.Relative));
         _requestStatusesUploadMethod = new JsonMethod<StatusesUpload.Request, Stream>(this, new Uri("statuses/upload.json", UriKind.Relative));
         _requestStatusesUploadUrlTextMethod = new JsonMethod<StatusesUploadUrlText.Request, Stream>(this, new Uri("statuses/upload_url_text.json", UriKind.Relative));
         _requestStatusesUserTimelineMethod = new JsonMethod<StatusesUserTimeline.Request, Stream>(this, new Uri("statuses/user_timeline.json", UriKind.Relative));
         _requestStatusesFilterCreateMethod = new JsonMethod<StatusesFilterCreate.Request, Stream>(this, new Uri("statuses/filter/create.json", UriKind.Relative));
         _requestStatusesFriendsTimelineIdsMethod = new JsonMethod<StatusesFriendsTimelineIds.Request, Stream>(this, new Uri("statuses/friends_timeline/ids.json", UriKind.Relative));
         _requestStatusesMentionsIdsMethod = new JsonMethod<StatusesMentionsIds.Request, Stream>(this, new Uri("statuses/mentions/ids.json", UriKind.Relative));
         _requestStatusesMentionsShieldMethod = new JsonMethod<StatusesMentionsShield.Request, Stream>(this, new Uri("statuses/mentions/shield.json", UriKind.Relative));
         _requestStatusesRepostTimelineIdsMethod = new JsonMethod<StatusesRepostTimelineIds.Request, Stream>(this, new Uri("statuses/repost_timeline/ids.json", UriKind.Relative));
         _requestStatusesToMeIdsMethod = new JsonMethod<StatusesToMeIds.Request, Stream>(this, new Uri("statuses/to_me/ids.json", UriKind.Relative));
         _requestStatusesUserTimelineIdsMethod = new JsonMethod<StatusesUserTimelineIds.Request, Stream>(this, new Uri("statuses/user_timeline/ids.json", UriKind.Relative));
         _requestUsersCancelTopStatusMethod = new JsonMethod<UsersCancelTopStatus.Request, Stream>(this, new Uri("users/cancel_top_status.json", UriKind.Relative));
         _requestUsersCountsMethod = new JsonMethod<UsersCounts.Request, Stream>(this, new Uri("users/counts.json", UriKind.Relative));
         _requestUsersDomainShowMethod = new JsonMethod<UsersDomainShow.Request, Stream>(this, new Uri("users/domain_show.json", UriKind.Relative));
         _requestUsersGetTopStatusMethod = new JsonMethod<UsersGetTopStatus.Request, Stream>(this, new Uri("users/get_top_status.json", UriKind.Relative));
         _requestUsersSetTopStatusMethod = new JsonMethod<UsersSetTopStatus.Request, Stream>(this, new Uri("users/set_top_status.json", UriKind.Relative));
         _requestUsersShowMethod = new JsonMethod<UsersShow.Request, Stream>(this, new Uri("users/show.json", UriKind.Relative));
         _requestUsersShowRankMethod = new JsonMethod<UsersShowRank.Request, Stream>(this, new Uri("users/show_rank.json", UriKind.Relative));
     }
Ejemplo n.º 32
0
		public WeiboClient()
		{
			//TODO: Set BaseUri property Here 在这里指定服务基础地址
			BaseUri = new Uri("http://api.t.sina.com.cn");
					
			_executeEmotionsMethod= new JsonMethod<EmotionsRequest, EmotionsResponse>(this, new Uri("emotions.json", UriKind.Relative));
						
			_executeFavoritesMethod= new JsonMethod<FavoritesRequest, FavoritesResponse>(this, new Uri("favorites.json", UriKind.Relative));
						
			_executeAccountEndSessionMethod= new JsonMethod<AccountEndSessionRequest, AccountEndSessionResponse>(this, new Uri("account/end_session.json", UriKind.Relative));
						
			_executeAccountGetPrivacyMethod= new JsonMethod<AccountGetPrivacyRequest, AccountGetPrivacyResponse>(this, new Uri("account/get_privacy.json", UriKind.Relative));
						
			_executeAccountRateLimitStatusMethod= new JsonMethod<AccountRateLimitStatusRequest, AccountRateLimitStatusResponse>(this, new Uri("account/rate_limit_status.json", UriKind.Relative));
						
			_executeAccountUpdateProfileMethod= new JsonMethod<AccountUpdateProfileRequest, AccountUpdateProfileResponse>(this, new Uri("account/update_profile.json", UriKind.Relative));
						
			_executeAccountUpdateProfileImageMethod= new JsonMethod<AccountUpdateProfileImageRequest, AccountUpdateProfileImageResponse>(this, new Uri("account/update_profile_image.json", UriKind.Relative));
						
			_executeAccountVerifyCredentialsMethod= new JsonMethod<AccountVerifyCredentialsRequest, AccountVerifyCredentialsResponse>(this, new Uri("account/verify_credentials.json", UriKind.Relative));
						
			_executeBlocksBlockingMethod= new JsonMethod<BlocksBlockingRequest, BlocksBlockingResponse>(this, new Uri("blocks/blocking.json", UriKind.Relative));
						
			_executeBlocksCreateMethod= new JsonMethod<BlocksCreateRequest, BlocksCreateResponse>(this, new Uri("blocks/create.json", UriKind.Relative));
						
			_executeBlocksDestroyMethod= new JsonMethod<BlocksDestroyRequest, BlocksDestroyResponse>(this, new Uri("blocks/destroy.json", UriKind.Relative));
						
			_executeBlocksExistsMethod= new JsonMethod<BlocksExistsRequest, BlocksExistsResponse>(this, new Uri("blocks/exists.json", UriKind.Relative));
						
			_executeFavoritesCreateMethod= new JsonMethod<FavoritesCreateRequest, FavoritesCreateResponse>(this, new Uri("favorites/create.json", UriKind.Relative));
						
			_executeFavoritesDestroyMethod= new JsonMethod<FavoritesDestroyRequest, FavoritesDestroyResponse>(this, new Uri("favorites/destroy/{id}.json", UriKind.Relative));
						
			_executeFavoritesDestroyBatchMethod= new JsonMethod<FavoritesDestroyBatchRequest, FavoritesDestroyBatchResponse>(this, new Uri("favorites/destroy_batch.json", UriKind.Relative));
						
			_executeFriendshipsCreateMethod= new JsonMethod<FriendshipsCreateRequest, FriendshipsCreateResponse>(this, new Uri("friendships/create/{id}.json", UriKind.Relative));
						
			_executeFriendshipsDestroyMethod= new JsonMethod<FriendshipsDestroyRequest, FriendshipsDestroyResponse>(this, new Uri("friendships/destroy/{id}.json", UriKind.Relative));
						
			_executeFriendshipsExistsMethod= new JsonMethod<FriendshipsExistsRequest, FriendshipsExistsResponse>(this, new Uri("friendships/exists.json", UriKind.Relative));
						
			_executeFriendshipsShowMethod= new JsonMethod<FriendshipsShowRequest, FriendshipsShowResponse>(this, new Uri("friendships/show.json", UriKind.Relative));
						
			_executeShortUrlExpandMethod= new JsonMethod<ShortUrlExpandRequest, ShortUrlExpandResponse>(this, new Uri("short_url/expand.json", UriKind.Relative));
						
			_executeShortUrlShortenMethod= new JsonMethod<ShortUrlShortenRequest, ShortUrlShortenResponse>(this, new Uri("short_url/shorten.json", UriKind.Relative));
						
			_executeShortUrlCommentCommentsMethod= new JsonMethod<ShortUrlCommentCommentsRequest, ShortUrlCommentCommentsResponse>(this, new Uri("short_url/comment/comments.json", UriKind.Relative));
						
			_executeShortUrlCommentCountsMethod= new JsonMethod<ShortUrlCommentCountsRequest, ShortUrlCommentCountsResponse>(this, new Uri("short_url/comment/counts.json", UriKind.Relative));
						
			_executeShortUrlShareCountsMethod= new JsonMethod<ShortUrlShareCountsRequest, ShortUrlShareCountsResponse>(this, new Uri("short_url/share/counts.json", UriKind.Relative));
						
			_executeShortUrlShareStatusesMethod= new JsonMethod<ShortUrlShareStatusesRequest, ShortUrlShareStatusesResponse>(this, new Uri("short_url/share/statuses.json", UriKind.Relative));
						
			_executeStatusesCommentMethod= new JsonMethod<StatusesCommentRequest, StatusesCommentResponse>(this, new Uri("statuses/comment.json", UriKind.Relative));
						
			_executeStatusesCommentsByMeMethod= new JsonMethod<StatusesCommentsByMeRequest, StatusesCommentsByMeResponse>(this, new Uri("statuses/comments_by_me.json", UriKind.Relative));
						
			_executeStatusesCommentsTimelineMethod= new JsonMethod<StatusesCommentsTimelineRequest, StatusesCommentsTimelineResponse>(this, new Uri("statuses/comments_timeline.json", UriKind.Relative));
						
			_executeStatusesCommentsToMeMethod= new JsonMethod<StatusesCommentsToMeRequest, StatusesCommentsToMeResponse>(this, new Uri("statuses/comments_to_me.json", UriKind.Relative));
						
			_executeStatusesCommentDestroyMethod= new JsonMethod<StatusesCommentDestroyRequest, StatusesCommentDestroyResponse>(this, new Uri("statuses/comment_destroy/{id}.json", UriKind.Relative));
						
			_executeStatusesCommentDestroyBatchMethod= new JsonMethod<StatusesCommentDestroyBatchRequest, StatusesCommentDestroyBatchResponse>(this, new Uri("statuses/comment/destroy_batch.json", UriKind.Relative));
						
			_executeStatusesCountsMethod= new JsonMethod<StatusesCountsRequest, StatusesCountsResponse>(this, new Uri("statuses/counts.json", UriKind.Relative));
						
			_executeStatusesFollowersMethod= new JsonMethod<StatusesFollowersRequest, StatusesFollowersResponse>(this, new Uri("statuses/followers.json", UriKind.Relative));
						
			_executeStatusesFriendsMethod= new JsonMethod<StatusesFriendsRequest, StatusesFriendsResponse>(this, new Uri("statuses/friends.json", UriKind.Relative));
						
			_executeStatusesFriendsTimelineMethod= new JsonMethod<StatusesFriendsTimelineRequest, StatusesFriendsTimelineResponse>(this, new Uri("statuses/friends_timeline.json", UriKind.Relative));
						
			_executeStatusesPublicTimelineMethod= new JsonMethod<StatusesPublicTimelineRequest, StatusesPublicTimelineResponse>(this, new Uri("statuses/public_timeline.json", UriKind.Relative));
						
			_executeStatusesReplyMethod= new JsonMethod<StatusesReplyRequest, StatusesReplyResponse>(this, new Uri("statuses/reply.json", UriKind.Relative));
						
			_executeStatusesRepostMethod= new JsonMethod<StatusesRepostRequest, StatusesRepostResponse>(this, new Uri("statuses/repost.json", UriKind.Relative));
						
			_executeStatusesRepostByMeMethod= new JsonMethod<StatusesRepostByMeRequest, StatusesRepostByMeResponse>(this, new Uri("statuses/repost_by_me.json", UriKind.Relative));
						
			_executeStatusesResetCountMethod= new JsonMethod<StatusesResetCountRequest, StatusesResetCountResponse>(this, new Uri("statuses/reset_count.json", UriKind.Relative));
						
			_executeStatusesShowMethod= new JsonMethod<StatusesShowRequest, StatusesShowResponse>(this, new Uri("statuses/show/{id}.json", UriKind.Relative));
						
			_executeStatusesUnreadMethod= new JsonMethod<StatusesUnreadRequest, StatusesUnreadResponse>(this, new Uri("statuses/unread.json", UriKind.Relative));
						
			_executeStatusesUpdateMethod= new JsonMethod<StatusesUpdateRequest, StatusesUpdateResponse>(this, new Uri("statuses/update.json", UriKind.Relative));
						
			_executeStatusesUploadMethod= new JsonMethod<StatusesUploadRequest, StatusesUploadResponse>(this, new Uri("statuses/upload.json", UriKind.Relative));
						
			_executeStatusesUserTimelineMethod= new JsonMethod<StatusesUserTimelineRequest, StatusesUserTimelineResponse>(this, new Uri("statuses/user_timeline/{id}.json", UriKind.Relative));
						
			_executeTagsCreateMethod= new JsonMethod<TagsCreateRequest, TagsCreateResponse>(this, new Uri("tags/create.json", UriKind.Relative));
						
			_executeTagsSuggestionsMethod= new JsonMethod<TagsSuggestionsRequest, TagsSuggestionsResponse>(this, new Uri("tags/suggestions.json", UriKind.Relative));
						
			_executeTrendsFollowMethod= new JsonMethod<TrendsFollowRequest, TrendsFollowResponse>(this, new Uri("trends/follow.json", UriKind.Relative));
						
			_executeTrendsStatusesMethod= new JsonMethod<TrendsStatusesRequest, TrendsStatusesResponse>(this, new Uri("trends/statuses.json", UriKind.Relative));
						
			_executeTrendsTrendsMethod= new JsonMethod<TrendsTrendsRequest, TrendsTrendsResponse>(this, new Uri("trends.json", UriKind.Relative));
						
			_executeUserFriendsUpdateRemarkMethod= new JsonMethod<UserFriendsUpdateRemarkRequest, UserFriendsUpdateRemarkResponse>(this, new Uri("user/friends/update_remark.json", UriKind.Relative));
						
			_executeUsersHotMethod= new JsonMethod<UsersHotRequest, UsersHotResponse>(this, new Uri("users/hot.json", UriKind.Relative));
						
			_executeUsersShowMethod= new JsonMethod<UsersShowRequest, UsersShowResponse>(this, new Uri("users/show/{id}.json", UriKind.Relative));
						
					
			_requestEmotionsMethod= new JsonMethod<EmotionsRequest, Stream>(this, new Uri("emotions.json", UriKind.Relative));
						
			_requestFavoritesMethod= new JsonMethod<FavoritesRequest, Stream>(this, new Uri("favorites.json", UriKind.Relative));
						
			_requestAccountEndSessionMethod= new JsonMethod<AccountEndSessionRequest, Stream>(this, new Uri("account/end_session.json", UriKind.Relative));
						
			_requestAccountGetPrivacyMethod= new JsonMethod<AccountGetPrivacyRequest, Stream>(this, new Uri("account/get_privacy.json", UriKind.Relative));
						
			_requestAccountRateLimitStatusMethod= new JsonMethod<AccountRateLimitStatusRequest, Stream>(this, new Uri("account/rate_limit_status.json", UriKind.Relative));
						
			_requestAccountUpdatePrivacyMethod= new JsonMethod<AccountUpdatePrivacyRequest, Stream>(this, new Uri("account/update_privacy.json", UriKind.Relative));
						
			_requestAccountUpdateProfileMethod= new JsonMethod<AccountUpdateProfileRequest, Stream>(this, new Uri("account/update_profile.json", UriKind.Relative));
						
			_requestAccountUpdateProfileImageMethod= new JsonMethod<AccountUpdateProfileImageRequest, Stream>(this, new Uri("account/update_profile_image.json", UriKind.Relative));
						
			_requestAccountVerifyCredentialsMethod= new JsonMethod<AccountVerifyCredentialsRequest, Stream>(this, new Uri("account/verify_credentials.json", UriKind.Relative));
						
			_requestBlocksBlockingMethod= new JsonMethod<BlocksBlockingRequest, Stream>(this, new Uri("blocks/blocking.json", UriKind.Relative));
						
			_requestBlocksBlockingIdsMethod= new JsonMethod<BlocksBlockingIdsRequest, Stream>(this, new Uri("blocks/blocking/ids.json", UriKind.Relative));
						
			_requestBlocksCreateMethod= new JsonMethod<BlocksCreateRequest, Stream>(this, new Uri("blocks/create.json", UriKind.Relative));
						
			_requestBlocksDestroyMethod= new JsonMethod<BlocksDestroyRequest, Stream>(this, new Uri("blocks/destroy.json", UriKind.Relative));
						
			_requestBlocksExistsMethod= new JsonMethod<BlocksExistsRequest, Stream>(this, new Uri("blocks/exists.json", UriKind.Relative));
						
			_requestFavoritesCreateMethod= new JsonMethod<FavoritesCreateRequest, Stream>(this, new Uri("favorites/create.json", UriKind.Relative));
						
			_requestFavoritesDestroyMethod= new JsonMethod<FavoritesDestroyRequest, Stream>(this, new Uri("favorites/destroy/{id}.json", UriKind.Relative));
						
			_requestFavoritesDestroyBatchMethod= new JsonMethod<FavoritesDestroyBatchRequest, Stream>(this, new Uri("favorites/destroy_batch.json", UriKind.Relative));
						
			_requestFriendshipsCreateMethod= new JsonMethod<FriendshipsCreateRequest, Stream>(this, new Uri("friendships/create/{id}.json", UriKind.Relative));
						
			_requestFriendshipsDestroyMethod= new JsonMethod<FriendshipsDestroyRequest, Stream>(this, new Uri("friendships/destroy/{id}.json", UriKind.Relative));
						
			_requestFriendshipsExistsMethod= new JsonMethod<FriendshipsExistsRequest, Stream>(this, new Uri("friendships/exists.json", UriKind.Relative));
						
			_requestFriendshipsShowMethod= new JsonMethod<FriendshipsShowRequest, Stream>(this, new Uri("friendships/show.json", UriKind.Relative));
						
			_requestShortUrlExpandMethod= new JsonMethod<ShortUrlExpandRequest, Stream>(this, new Uri("short_url/expand.json", UriKind.Relative));
						
			_requestShortUrlShortenMethod= new JsonMethod<ShortUrlShortenRequest, Stream>(this, new Uri("short_url/shorten.json", UriKind.Relative));
						
			_requestShortUrlCommentCommentsMethod= new JsonMethod<ShortUrlCommentCommentsRequest, Stream>(this, new Uri("short_url/comment/comments.json", UriKind.Relative));
						
			_requestShortUrlCommentCountsMethod= new JsonMethod<ShortUrlCommentCountsRequest, Stream>(this, new Uri("short_url/comment/counts.json", UriKind.Relative));
						
			_requestShortUrlShareCountsMethod= new JsonMethod<ShortUrlShareCountsRequest, Stream>(this, new Uri("short_url/share/counts.json", UriKind.Relative));
						
			_requestShortUrlShareStatusesMethod= new JsonMethod<ShortUrlShareStatusesRequest, Stream>(this, new Uri("short_url/share/statuses.json", UriKind.Relative));
						
			_requestSocialgraphFollowsIdsMethod= new JsonMethod<SocialgraphFollowsIdsRequest, Stream>(this, new Uri("followers/ids/{id}.json", UriKind.Relative));
						
			_requestSocialgraphFriendsIdsMethod= new JsonMethod<SocialgraphFriendsIdsRequest, Stream>(this, new Uri("friends/ids/{id}.json", UriKind.Relative));
						
			_requestStatusesCommentMethod= new JsonMethod<StatusesCommentRequest, Stream>(this, new Uri("statuses/comment.json", UriKind.Relative));
						
			_requestStatusesCommentsMethod= new JsonMethod<StatusesCommentsRequest, Stream>(this, new Uri("statuses/comments.json", UriKind.Relative));
						
			_requestStatusesCommentsByMeMethod= new JsonMethod<StatusesCommentsByMeRequest, Stream>(this, new Uri("statuses/comments_by_me.json", UriKind.Relative));
						
			_requestStatusesCommentsTimelineMethod= new JsonMethod<StatusesCommentsTimelineRequest, Stream>(this, new Uri("statuses/comments_timeline.json", UriKind.Relative));
						
			_requestStatusesCommentsToMeMethod= new JsonMethod<StatusesCommentsToMeRequest, Stream>(this, new Uri("statuses/comments_to_me.json", UriKind.Relative));
						
			_requestStatusesCommentDestroyMethod= new JsonMethod<StatusesCommentDestroyRequest, Stream>(this, new Uri("statuses/comment_destroy/{id}.json", UriKind.Relative));
						
			_requestStatusesCommentDestroyBatchMethod= new JsonMethod<StatusesCommentDestroyBatchRequest, Stream>(this, new Uri("statuses/comment/destroy_batch.json", UriKind.Relative));
						
			_requestStatusesCountsMethod= new JsonMethod<StatusesCountsRequest, Stream>(this, new Uri("statuses/counts.json", UriKind.Relative));
						
			_requestStatusesDestroyMethod= new JsonMethod<StatusesDestroyRequest, Stream>(this, new Uri("statuses/destroy/{id}.json", UriKind.Relative));
						
			_requestStatusesFollowersMethod= new JsonMethod<StatusesFollowersRequest, Stream>(this, new Uri("statuses/followers.json", UriKind.Relative));
						
			_requestStatusesFriendsMethod= new JsonMethod<StatusesFriendsRequest, Stream>(this, new Uri("statuses/friends.json", UriKind.Relative));
						
			_requestStatusesFriendsTimelineMethod= new JsonMethod<StatusesFriendsTimelineRequest, Stream>(this, new Uri("statuses/friends_timeline.json", UriKind.Relative));
						
			_requestStatusesMentionsMethod= new JsonMethod<StatusesMentionsRequest, Stream>(this, new Uri("statuses/mentions.json", UriKind.Relative));
						
			_requestStatusesPublicTimelineMethod= new JsonMethod<StatusesPublicTimelineRequest, Stream>(this, new Uri("statuses/public_timeline.json", UriKind.Relative));
						
			_requestStatusesReplyMethod= new JsonMethod<StatusesReplyRequest, Stream>(this, new Uri("statuses/reply.json", UriKind.Relative));
						
			_requestStatusesRepostMethod= new JsonMethod<StatusesRepostRequest, Stream>(this, new Uri("statuses/repost.json", UriKind.Relative));
						
			_requestStatusesRepostByMeMethod= new JsonMethod<StatusesRepostByMeRequest, Stream>(this, new Uri("statuses/repost_by_me.json", UriKind.Relative));
						
			_requestStatusesRepostTimelineMethod= new JsonMethod<StatusesRepostTimelineRequest, Stream>(this, new Uri("statuses/repost_timeline.json", UriKind.Relative));
						
			_requestStatusesResetCountMethod= new JsonMethod<StatusesResetCountRequest, Stream>(this, new Uri("statuses/reset_count.json", UriKind.Relative));
						
			_requestStatusesShowMethod= new JsonMethod<StatusesShowRequest, Stream>(this, new Uri("statuses/show/{id}.json", UriKind.Relative));
						
			_requestStatusesUnreadMethod= new JsonMethod<StatusesUnreadRequest, Stream>(this, new Uri("statuses/unread.json", UriKind.Relative));
						
			_requestStatusesUpdateMethod= new JsonMethod<StatusesUpdateRequest, Stream>(this, new Uri("statuses/update.json", UriKind.Relative));
						
			_requestStatusesUploadMethod= new JsonMethod<StatusesUploadRequest, Stream>(this, new Uri("statuses/upload.json", UriKind.Relative));
						
			_requestStatusesUserTimelineMethod= new JsonMethod<StatusesUserTimelineRequest, Stream>(this, new Uri("statuses/user_timeline/{id}.json", UriKind.Relative));
						
			_requestTagsCreateMethod= new JsonMethod<TagsCreateRequest, Stream>(this, new Uri("tags/create.json", UriKind.Relative));
						
			_requestTagsDestroyMethod= new JsonMethod<TagsDestroyRequest, Stream>(this, new Uri("tags/destroy.json", UriKind.Relative));
						
			_requestTagsDestroyBatchMethod= new JsonMethod<TagsDestroyBatchRequest, Stream>(this, new Uri("tags/destroy_batch.json", UriKind.Relative));
						
			_requestTagsSuggestionsMethod= new JsonMethod<TagsSuggestionsRequest, Stream>(this, new Uri("tags/suggestions.json", UriKind.Relative));
						
			_requestTagsTagsMethod= new JsonMethod<TagsTagsRequest, Stream>(this, new Uri("tags.json", UriKind.Relative));
						
			_requestTrendsDailyMethod= new JsonMethod<TrendsDailyRequest, Stream>(this, new Uri("trends/daily.json", UriKind.Relative));
						
			_requestTrendsDestroyMethod= new JsonMethod<TrendsDestroyRequest, Stream>(this, new Uri("trends/destroy.json", UriKind.Relative));
						
			_requestTrendsFollowMethod= new JsonMethod<TrendsFollowRequest, Stream>(this, new Uri("trends/follow.json", UriKind.Relative));
						
			_requestTrendsHourlyMethod= new JsonMethod<TrendsHourlyRequest, Stream>(this, new Uri("trends/hourly.json", UriKind.Relative));
						
			_requestTrendsStatusesMethod= new JsonMethod<TrendsStatusesRequest, Stream>(this, new Uri("trends/statuses.json", UriKind.Relative));
						
			_requestTrendsTrendsMethod= new JsonMethod<TrendsTrendsRequest, Stream>(this, new Uri("trends.json", UriKind.Relative));
						
			_requestTrendsWeeklyMethod= new JsonMethod<TrendsWeeklyRequest, Stream>(this, new Uri("trends/weekly.json", UriKind.Relative));
						
			_requestUserFriendsUpdateRemarkMethod= new JsonMethod<UserFriendsUpdateRemarkRequest, Stream>(this, new Uri("user/friends/update_remark.json", UriKind.Relative));
						
			_requestUsersHotMethod= new JsonMethod<UsersHotRequest, Stream>(this, new Uri("users/hot.json", UriKind.Relative));
						
			_requestUsersShowMethod= new JsonMethod<UsersShowRequest, Stream>(this, new Uri("users/show/{id}.json", UriKind.Relative));
						
			_requestUsersSuggestionsMethod= new JsonMethod<UsersSuggestionsRequest, Stream>(this, new Uri("users/suggestions.json", UriKind.Relative));
					}