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

        // int rows = ob.GetRecordCount(sqlwhere);
        int rows = orderList.Count;
        string output = JsonConvert.SerializeObject(orderList);
        string json = @"{""Rows"":" + output + @",""Total"":""" + rows + @"""}";
        return json;
    }
예제 #4
0
파일: MyService.cs 프로젝트: jxb505/FbCRM2
 public string _AddMaintainRegTB(string jsonData)
 {
     MaintainRegTBBll ob = new MaintainRegTBBll();
     List<MaintainRegTB> we = JsonConvert.DeserializeObject(jsonData, typeof(List<MaintainRegTB>)) as List<MaintainRegTB>;
     string Flag = "success";
     foreach (MaintainRegTB wd in we)
     {
         int SuccessFlag = ob.Add(wd);
         if (SuccessFlag <= 0)
         {
             Flag = "error";
         }
     }
     return Flag;
 }