示例#1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        TeModel       tm  = new TeModel();
        SqlDataReader sdr = tm.findTisaneAll();



        this.FlexGrid1.InitConfig(
            new string[] {
            "title=员工工作量统计",        //标题
            "striped=true",         //是否显示行交替色
            "selectedonclick=true", //是否点击行自动选中checkbox
            "usepager=false",       //使用分页器
            "showcheckbox=true",    //显示复选框
            "height=300",           //高度,可为auto或具体px值
            "width=814"             //宽度,可为auto或具体px值
        },
            // 序号、委托单号、医院编号、医院名称、处方号、煎药方式、姓名、性别、年龄、电话、地址、科室、病区号、
            //病房号、病床号、诊断结果、剂数、服用方式、次数、包装量、服用方法、煎药方案、一煎时间、二煎时间、
            //浸泡加水量、浸泡时间、标签数量、备注信息、医生、医生脚注、取药时间、取药序号、下单时间、当前状态、
            //操作时间、操作人员、配送公司、配送地址、联系电话、快件类型

            new dotNetFlexGrid.FieldConfig[] {
            new dotNetFlexGrid.FieldConfig("workman", "员工姓名", 90, true, dotNetFlexGrid.FieldConfigAlign.Center),
            new dotNetFlexGrid.FieldConfig("workmannum", "员工工号", 170, false, dotNetFlexGrid.FieldConfigAlign.Center),
            new dotNetFlexGrid.FieldConfig("workdate", "日期", 90, true, dotNetFlexGrid.FieldConfigAlign.Center),
            new dotNetFlexGrid.FieldConfig("workcontent", "工作内容", 170, false, dotNetFlexGrid.FieldConfigAlign.Center),
            new dotNetFlexGrid.FieldConfig("workload", "工作量", 120, false, dotNetFlexGrid.FieldConfigAlign.Center),
        },
            null
            ,
            null
            );
        this.FlexGrid1.DataHandler = new dotNetFlexGrid.DataHandlerDelegate(DotNetFlexGrid1DataHandler);
        TeModel   tml = new TeModel();
        DataTable dt  = tml.EmployeeInfoCountAll("0", "0", "0", "0", "0");

        this.chartData.Value = DataTableToJson.ToJson(dt);
    }
示例#2
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);
    }