コード例 #1
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());
        }
コード例 #2
0
        //隐藏“填写工时”按钮
        public bool HideLinkOrNot()
        {
            BLL.job_order   bll1   = new BLL.job_order();
            Model.job_order model1 = bll1.GetModel(this.id);

            if (DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")) > DateTime.Parse(model1.job_order_endtime.ToString("yyyy-MM-dd")))
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }
コード例 #3
0
ファイル: my_list.aspx.cs プロジェクト: songmingshun/whms
 //批量删除
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     //ChkAdminLevel("sys_manager", DTEnums.ActionEnum.Delete.ToString()); //检查权限
     BLL.job_order bll = new BLL.job_order();
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int      id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
         //if (cb.Checked && GetAdminInfo().id != id)
         if (cb.Checked && bll.GetModel(id).job_order_status != "同意")
         {
             bll.Delete(id);
         }
     }
     JscriptMsg("批量删除成功啦!", Utils.CombUrlTxt("my_list.aspx", "keywords={0}", this.keywords), "Success");
 }
コード例 #4
0
        private void ShowInfo(string _action, int _id)
        {
            BLL.job_order   bll   = new BLL.job_order();
            Model.job_order model = bll.GetModel(_id);

            BLL.manager  tmpmanager = new BLL.manager();
            BLL.customer customer   = new BLL.customer();

            txtJobOrderName.Text          = model.job_order_name;
            ddlJobOrderType.SelectedIndex = model.job_order_type;
            txtJobOrderDescript.Text      = model.job_order_discripe;
            txtContractId.Text            = model.contract_id;
            txtSalesman.Text       = tmpmanager.GetRealName(model.salesman_id);
            txtBeginDate.Text      = model.job_order_begintime.ToString();
            txtEndDate.Text        = model.job_order_endtime.ToString();;
            txtTechnicalResId.Text = tmpmanager.GetRealName(model.technical_respon_id);
            txtReviewerId.Text     = tmpmanager.GetRealName(model.job_order_reviewer_id);
            txtCreateTime.Text     = model.job_order_create_time.ToString();
            txtCreator.Text        = tmpmanager.GetRealName(model.job_order_creator_id);
            txtReviewAdvice.Text   = model.job_order_advice;
            txtStatus.Text         = model.job_order_status;

            txtCustomer.Text = customer.GetName(model.customer_id);

            string strRelevantIdList   = string.Empty;
            string strRelevantNameList = string.Empty;

            if (!object.Equals(model.job_order_relevant, null))
            {
                for (int i = 0; i < model.job_order_relevant.Count; i++)
                {
                    if (strRelevantIdList.Equals(string.Empty))
                    {
                        strRelevantIdList   = model.job_order_relevant[i].relevant_id;
                        strRelevantNameList = tmpmanager.GetRealName(model.job_order_relevant[i].relevant_id);
                    }
                    else
                    {
                        strRelevantIdList   = strRelevantIdList + ";" + model.job_order_relevant[i].relevant_id;
                        strRelevantNameList = strRelevantNameList + ";" + tmpmanager.GetRealName(model.job_order_relevant[i].relevant_id);
                    }
                }
            }
            //hidRelevant.Value = strRelevantIdList;
            txtRelevant.Text = strRelevantNameList;

            txtJobOrderName.Enabled     = false;
            ddlJobOrderType.Enabled     = false;
            txtJobOrderDescript.Enabled = false;
            txtContractId.Enabled       = false;
            txtSalesman.Enabled         = false;
            txtBeginDate.Enabled        = false;
            txtEndDate.Enabled          = false;
            txtTechnicalResId.Enabled   = false;
            txtReviewerId.Enabled       = false;
            txtCreateTime.Enabled       = false;
            txtCreator.Enabled          = false;
            txtRelevant.Enabled         = false;
            //txtReviewAdvice.Enabled = false;
            txtStatus.Enabled = false;

            txtRelevant.Enabled = false;
            txtCustomer.Enabled = false;

            if (txtStatus.Text != "未审核")
            {
                txtReviewAdvice.Enabled   = false;
                rblReviewOrReject.Enabled = false;
                btnSubmit.Visible         = false;
            }

            ////工时列表绑定
            //BLL.working_hour working_hour = new BLL.working_hour();

            //rptList.DataSource = working_hour.GetJobOrderWorkingHourList(model.job_order_id);
            //rptList.DataBind();
        }