Esempio n. 1
0
    public static string EmployeeInfoCount(string employname, string employcode, string starttime, string endtime, string workcontent, string chartType, string chartFlag)
    {
        TeModel tml = new TeModel();

        if (employname == "")
        {
            employname = "0";
        }


        if (employcode == "")
        {
            employcode = "0";
        }


        if (starttime == "")
        {
            starttime = "0";
        }


        if (endtime == "")
        {
            endtime = "0";
        }



        if (workcontent == "")
        {
            workcontent = "0";
        }
        string strJson = "";

        if ("1".Equals(chartFlag))
        {
            //日期
            if ("1".Equals(chartType))
            {
                //总计
                DataTable dt = tml.EmployeeInfoCountAll(employname, employcode, starttime, endtime, workcontent);
                strJson = DataTableToJson.ToJson(dt);
            }
            else if ("2".Equals(chartType))
            {
                //单计
                DataTable dt = tml.EmployeeInfoCount(employname, employcode, starttime, endtime, workcontent);
                strJson = DataTableToJson.ToJson(dt);
            }
        }
        else if ("2".Equals(chartFlag))
        {
            //人员
            if ("1".Equals(chartType))
            {
                //总计
                DataTable dt = tml.EmployeeAllCount(employname, employcode, starttime, endtime, workcontent);
                strJson = DataTableToJson.ToJson(dt);
            }
            else if ("2".Equals(chartType))
            {
                //单计
                DataTable dt = tml.EmployeeInfoSingleCount(employname, employcode, starttime, endtime, workcontent);
                strJson = DataTableToJson.ToJson(dt);
            }
        }



        return(strJson);
    }