private string getDatalist()
    {
        string json         = "";
        string type         = Request.Form["type"];
        string searchString = Request.Form["searchString"];

        if (type == "hospital")
        {
            DataTable dt = OrganizationInfoManage.GetData(searchString);
            if (dt != null)
            {
                json = JsonHelper.DataTableToJsonForEasyUiDataGridLoadDataMethod(dt.Rows.Count, dt).Trim();
            }
        }
        else if (type == "product")
        {
            DataTable dt = ProductInfoManage.GetInfos(GetUserInfo().companyId.ToString(), searchString);
            if (dt != null)
            {
                json = JsonHelper.DataTableToJsonForEasyUiDataGridLoadDataMethod(dt.Rows.Count, dt).Trim();
            }
        }
        else if (type == "sales" || type == "supervisor" || type == "manager" || type == "director")
        {
            DataTable dt = UserInfoManage.getInfos(GetUserInfo().companyId.ToString(), "", searchString);
            dt.Columns["userId"].ColumnName   = "Id";
            dt.Columns["userName"].ColumnName = "name";
            if (dt != null)
            {
                json = JsonHelper.DataTableToJsonForEasyUiDataGridLoadDataMethod(dt.Rows.Count, dt);
            }
        }

        return(json);
    }
Exemple #2
0
    private string getInfos()
    {
        string    departId     = Request.Form["departmentId"];
        string    searchString = Request.Form["searchString"];
        string    json         = "";
        DataTable dt           = UserInfoManage.getInfos(GetUserInfo().companyId.ToString(), departId, searchString);

        if (dt != null)
        {
            json = JsonHelper.DataTableToJsonForEasyUiDataGridLoadDataMethod(dt.Rows.Count, dt);
        }
        return(json);
    }
    private string getMembers()
    {
        string    json = "";
        UserInfo  user = (UserInfo)Session["user"];
        DataTable dt   = UserInfoManage.getInfos(user.companyId.ToString(), "1", Request.Form["searchString"]);

        if (dt != null)
        {
            json = JsonHelper.DataTableToJsonForEasyUiDataGridLoadDataMethod(dt.Rows.Count, dt);
        }
        //DataSet ds = UserInfoManage.GetMembers(user);
        //json = JsonHelper.DataTableToJsonForEasyUiDataGridLoadDataMethod(ds.Tables[0].Rows.Count, ds.Tables[0]);
        return(json);
    }