Пример #1
0
    private string getInfos()
    {
        string    json  = "";
        string    sort  = Request.Form["sort"];
        string    order = Request.Form["order"];
        DataTable dt    = SalesTaskInfoManage.getInfos();

        dt = PinYinHelper.SortByPinYin(dt, sort, order);
        if (dt != null)
        {
            json = JsonHelper.DataTableToJsonForEasyUiDataGridLoadDataMethod(dt.Rows.Count, dt).Trim();
        }
        return(json);
    }
Пример #2
0
    private string Import()
    {
        string res  = "F";
        string json = Request.Form["json"];

        if (string.IsNullOrEmpty(json))
        {
            return("");
        }
        Dictionary <string, string> dict = JsonHelper.DeserializeJsonToObject <Dictionary <string, string> >(json);

        if (!dict["状态"].Contains("已导入"))
        {
            dict = SalesTaskInfoManage.ImportInfos(dict);
            res  = JsonHelper.SerializeObject(dict);
        }
        else
        {
            res = json;
        }

        return(res);
    }