예제 #1
0
파일: MyService.cs 프로젝트: jxb505/FbCRM2
 public string _UpdateOrder(string jsonData)
 {
     // String s = (new System.IO.StreamReader(HttpContext.Current.Request.InputStream)).ReadToEnd();
     OrderBll ob = new OrderBll();
     List<Order> we = JsonConvert.DeserializeObject(jsonData, typeof(List<Order>)) as List<Order>;
     string Flag = "success";
     foreach (Order wd in we)
     {
         bool SuccessFlag = ob.Update(wd);
         if (!SuccessFlag)
         {
             Flag = "error";
         }
     }
     return Flag;
 }
예제 #2
0
파일: MyService.cs 프로젝트: jxb505/FbCRM2
 public bool _DelOrder(string jsonData)
 {
     OrderBll ob = new OrderBll();
     List<Order> we = JsonConvert.DeserializeObject(jsonData, typeof(List<Order>)) as List<Order>;
     return ob.DeleteList(we);
 }
예제 #3
0
파일: MyService.cs 프로젝트: jxb505/FbCRM2
    public string _OrderList(string sqlwhere)
    {
        if (string.IsNullOrEmpty(sqlwhere))
        {
            sqlwhere += "1=1";
        }
        else sqlwhere += " and 1=1";
        OrderBll ob = new OrderBll();
        List<Order> orderList = new List<Order>();
        orderList = ob.GetModelList(sqlwhere);

        int rows = ob.GetRecordCount(sqlwhere);
        string output = JsonConvert.SerializeObject(orderList);
        string json = @"{""Rows"":" + output + @",""Total"":""" + rows + @"""}";
        return json;
    }
예제 #4
0
파일: MyService.cs 프로젝트: jxb505/FbCRM2
 public string _AddOrder(string jsonData)
 {
     // String s = (new System.IO.StreamReader(HttpContext.Current.Request.InputStream)).ReadToEnd();
     OrderBll ob = new OrderBll();
     List<Order> we = JsonConvert.DeserializeObject(jsonData, typeof(List<Order>)) as List<Order>;
     string Flag = "success";
     foreach (Order wd in we)
     {
         wd.eg4 = DateTime.Now.ToString();
         int SuccessFlag = ob.Add(wd);
         if (SuccessFlag <= 0)
         {
             Flag = "error";
         }
     }
     return Flag;
 }