示例#1
0
    private string getDataList()
    {
        int       year         = Int32.Parse(Request.Form["year"]);
        int       month        = Int32.Parse(Request.Form["month"]);
        string    sort         = Request.Form["sort"];
        string    order        = Request.Form["order"];
        string    searchString = Request.Form["searchString"];
        string    hospital     = Request.Form["hospital"];
        string    product      = Request.Form["product"];
        string    json         = "";
        DataTable dt           = FlowInfoManage.GetMobileInfos(year, month, searchString, hospital, product);

        if (dt != null)
        {
            dt   = PinYinHelper.SortByPinYin(dt, sort, order);
            json = JsonHelper.DataTable2Json(dt);
        }
        //JObject res = new JObject();
        //res.Add("DataIsArchived", DataIsArchived);
        //res["Data"] = JsonHelper.DeserializeJsonToObject<JObject>(json);
        //res.Add("Data", JsonHelper.DeserializeJsonToObject<object>(json));
        //Dictionary<string, object> resDict = new Dictionary<string, object>();
        //resDict.Add("DataIsArchived", DataIsArchived);
        //resDict.Add("Data", json);
        //json = JsonHelper.SerializeObject(resDict);
        return(json.ToString());
    }
示例#2
0
    private string getInfos()
    {
        string  date           = Request.Form["date"];
        string  sort           = Request.Form["sort"];
        string  order          = Request.Form["order"];
        string  json           = "";
        bool    DataIsArchived = false;
        DataSet ds             = FlowInfoManage.GetInfos(date, ref DataIsArchived);

        if (ds != null)
        {
            DataTable dt = PinYinHelper.SortByPinYin(ds.Tables[0], sort, order);
            json = JsonHelper.DataTableToJsonForEasyUiDataGridLoadDataMethod(dt, ds.Tables[1]);
        }
        JObject res = new JObject();

        res.Add("DataIsArchived", DataIsArchived);
        res["Data"] = JsonHelper.DeserializeJsonToObject <JObject>(json);
        //res.Add("Data", JsonHelper.DeserializeJsonToObject<object>(json));
        //Dictionary<string, object> resDict = new Dictionary<string, object>();
        //resDict.Add("DataIsArchived", DataIsArchived);
        //resDict.Add("Data", json);
        //json = JsonHelper.SerializeObject(resDict);
        return(res.ToString());
    }
示例#3
0
    private string archive()
    {
        string date     = Request.Form["date"];
        string jsonData = Request.Form["dataJson"];

        return(FlowInfoManage.ArchiveData(date, jsonData));
    }
示例#4
0
    private string Import()
    {
        string res        = "F";
        string json       = Request.Form["json"];
        string dateString = Request.Form["dateString"];

        if (string.IsNullOrEmpty(dateString))
        {
            return("请选择正确的归档日期");
        }

        Dictionary <string, string> dict = JsonHelper.DeserializeJsonToObject <Dictionary <string, string> >(json);

        if (!dict["状态"].Contains("已导入"))
        {
            dict = FlowInfoManage.ImportInfos(dict, dateString);
        }
        res = JsonHelper.SerializeObject(dict);
        return(res);
    }
示例#5
0
    private string getDetailData()
    {
        UserInfo user        = (UserInfo)Session["user"];
        Boolean  isPrivilege = Privilege.checkPrivilege(user);

        string  sort  = Request.Form["sort"];
        string  order = Request.Form["order"];
        string  id    = Request.Params["id"];
        DataSet ds    = FlowInfoManage.GetMobileDetail(id);
        string  json  = "";

        if (ds != null)
        {
            DataTable dt = PinYinHelper.SortByPinYin(ds.Tables[0], sort, order);
            json = JsonHelper.DataTable2Json(dt);
            JObject jObject = new JObject();
            jObject.Add("data", json);
            jObject.Add("privilege", isPrivilege);
            return(jObject.ToString());
        }
        return(json.ToString());
    }