Exemple #1
0
        //显示工时汇总
        public string ShowTimeSum()
        {
            //取得登录系统用户信息
            Model.manager model = GetAdminInfo();
            BLL.manager   bll   = new BLL.manager();

            StringBuilder strReturn = new StringBuilder();
            string        strWhere  = "dept_id=" + "'" + model.dept_id + "' and (role_value>" + bll.GetRoleValue(model.role_id) + " or user_name='" + model.user_name + "')" + CombSqlTxt(this.datebegin, this.dateend, ddlJobOrder.SelectedValue);

            BLL.working_hour bll1 = new BLL.working_hour();
            DataSet          ds   = bll1.GetDeptTimeSum(strWhere);

            if (ds.Tables[0].Rows.Count > 0)
            {
                DataRow dr = ds.Tables[0].Rows[0];

                strReturn.Append("<tr>");
                strReturn.Append("<td colspan=4></td>");
                strReturn.Append("<td style=\"font-weight:bold;color:red\">共计 " + dr["count"] + " 条</td>");
                strReturn.Append("<td style=\"font-weight:bold;color:red\" >合计:</td>");
                strReturn.Append("<td style=\"font-weight:bold;color:red\">" + dr["sum_working"] + "</td>");
                strReturn.Append("<td style=\"font-weight:bold;color:red\">" + dr["sum_journey"] + "</td>");
                strReturn.Append("<td style=\"font-weight:bold;color:red\" colspan=2>" + dr["sum_overtime"] + "</td>");
                strReturn.Append("</tr>");
            }

            return(strReturn.ToString());
        }
Exemple #2
0
        //显示工时汇总
        public string ShowTimeSum()
        {
            //取得登录系统用户信息
            Model.manager model = GetAdminInfo();
            BLL.manager   bll   = new BLL.manager();

            BLL.job_order   bll1   = new BLL.job_order();
            Model.job_order model1 = bll1.GetModel(int.Parse(this.id));

            StringBuilder strReturn = new StringBuilder();
            string        strWhere  = "job_order_id='" + model1.job_order_id + "'";

            BLL.working_hour bll2 = new BLL.working_hour();
            DataSet          ds   = bll2.GetDeptTimeSum(strWhere);

            if (ds.Tables[0].Rows.Count > 0)
            {
                DataRow dr = ds.Tables[0].Rows[0];

                strReturn.Append("<tr>");
                strReturn.Append("<td></td>");
                strReturn.Append("<td></td>");
                strReturn.Append("<td></td>");

                strReturn.Append("<td style=\"font-weight:bold;color:red\">共计 " + dr["count"] + " 条</td>");
                strReturn.Append("<td style=\"font-weight:bold;color:red\">合计:</td>");

                strReturn.Append("<td style=\"font-weight:bold;color:red\">" + dr["sum_working"] + "</td>");
                strReturn.Append("<td style=\"font-weight:bold;color:red\">" + dr["sum_journey"] + "</td>");
                strReturn.Append("<td style=\"font-weight:bold;color:red\">" + dr["sum_overtime"] + "</td>");
                strReturn.Append("</tr>");
            }

            return(strReturn.ToString());
        }