Exemple #1
0
 public string _UpdateUserProfit(string jsonData)
 {
     // String s = (new System.IO.StreamReader(HttpContext.Current.Request.InputStream)).ReadToEnd();
     UserProfitBll ob = new UserProfitBll();
     List<UserProfit> we = JsonConvert.DeserializeObject(jsonData, typeof(List<UserProfit>)) as List<UserProfit>;
     string Flag = "success";
     foreach (UserProfit wd in we)
     {
         bool SuccessFlag = ob.Update(wd);
         if (!SuccessFlag)
         {
             Flag = "error";
         }
     }
     return Flag;
 }
Exemple #2
0
    public string _UserProfitList(string sqlwhere)
    {
        if (string.IsNullOrEmpty(sqlwhere))
        {
            sqlwhere += "1=1";
        }
        else sqlwhere += " and 1=1";
        sqlwhere += " and id in (select id from custom_user where rid=10) ";
        UserProfitBll ob = new UserProfitBll();
        List<UserProfit> orderList = new List<UserProfit>();
        orderList = ob.GetModelList(sqlwhere);

        int rows = ob.GetRecordCount(sqlwhere);
        string output = JsonConvert.SerializeObject(orderList);
        string json = @"{""Rows"":" + output + @",""Total"":""" + rows + @"""}";
        return json;
    }
Exemple #3
0
 public bool _DelUserProfit(string jsonData)
 {
     UserProfitBll ob = new UserProfitBll();
     List<UserProfit> we = JsonConvert.DeserializeObject(jsonData, typeof(List<UserProfit>)) as List<UserProfit>;
     return ob.DeleteList(we);
 }