Exemple #1
0
 /// <summary>
 /// 绑定
 /// </summary>
 public void Binds()
 {
     Hi.Model.DIS_Suggest OrderModel = OrderBll.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
     this.lblAuditUserID.InnerText = Common.GetUserName(this.UserID);
     this.hidAuditUserID.Value     = this.UserID.ToString();
     this.lblContent.InnerText     = OrderModel.Remark;
 }
Exemple #2
0
 protected void AddMessAge(object sender, EventArgs e)
 {
     Hi.Model.DIS_Suggest    suggest = new Hi.Model.DIS_Suggest();
     Hi.Model.BD_Distributor dis     = new Hi.BLL.BD_Distributor().GetModel(DisID);
     if (dis != null)
     {
         suggest.Title      = Common.NoHTML(txtTitle.Value);
         suggest.DisUserID  = this.UserID;
         suggest.Remark     = Common.NoHTML(txtRemark.Value);
         suggest.CreateDate = DateTime.Now;
         suggest.CompID     = this.CompID;
         suggest.Stype      = 0;
         suggest.DisID      = this.DisID;
         suggest.IsAnswer   = 0;
         suggest.ts         = DateTime.Now;
         suggest.dr         = 0;
         suggest.modifyuser = this.UserID;
         if (new Hi.BLL.DIS_Suggest().Add(suggest) > 0)
         {
             Response.Redirect("MessAgeList.aspx");
         }
         else
         {
             JScript.AlertMsgOne(this, "添加失败!", JScript.IconOption.错误);
         }
     }
 }
Exemple #3
0
    //public Hi.Model.SYS_Users user = null;
    protected void Page_Load(object sender, EventArgs e)
    {
        //user = LoginModel.IsLogined(this);
        string MessAgeID = Request["id"].ToString();

        if (!string.IsNullOrEmpty(MessAgeID))
        {
            if (!Common.PageDisOperable("Message", Convert.ToInt32(MessAgeID), this.DisID))
            {
                Response.Redirect("~/NoOperable.aspx");
                return;
            }
            suggest = new Hi.BLL.DIS_Suggest().GetModel(int.Parse(MessAgeID));
            if (suggest.IsAnswer != 0)
            {
                compuser = new Hi.BLL.SYS_Users().GetModel(suggest.CompUserID);
                if (suggest.IsAnswer == 1)
                {
                    suggest.IsAnswer   = 2;
                    suggest.modifyuser = this.DisID;
                    suggest.ts         = DateTime.Now;
                    new Hi.BLL.DIS_Suggest().Update(suggest);
                }
            }
            else
            {
                reply.Visible = false;
            }
        }
    }
Exemple #4
0
    /// <summary>
    /// 绑定
    /// </summary>
    public void Bind()
    {
        Hi.Model.DIS_Suggest model = OrderBll.GetModel(int.Parse(Request.QueryString["ID"].ToString()));

        this.lblDisName.InnerText    = Common.GetDis(model.DisID, "DisName");
        this.lblCreateUser.InnerText = Common.GetUserName(model.DisUserID);
        this.lblState.InnerText      = model.IsAnswer == 1 ? "已回复" : "未回复";
        this.lblCreateDate.InnerText = model.CreateDate.ToString("yyyy-MM-dd");
        this.lblTitle.InnerText      = model.Title;
        this.lblContent.InnerText    = model.Remark;
        this.lblCompRemark.InnerText = model.CompRemark;
        this.lblCompUser.InnerText   = Common.GetUserName(model.CompUserID);
        this.lblReplyDate.InnerText  = model.ReplyDate.ToString("yyyy-MM-dd");

        if (model.IsAnswer == 0)
        {
            this.CompRemark.Visible  = false;
            this.lblCompUser.Visible = false;
            this.CompRepk.Visible    = false;
        }
        else
        {
            this.libtnEdit.Attributes.Add("style", "display:none;");
        }
    }
Exemple #5
0
    /// <summary>
    /// 保存
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSave_Click(object sender, EventArgs e)
    {
        Hi.Model.DIS_Suggest OrderModel = OrderBll.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
        string AuditRemark = string.Empty;

        if (!string.IsNullOrEmpty(this.txtRemark.Value.Trim().ToString()))
        {
            AuditRemark = Common.NoHTML(this.txtRemark.Value.Trim().ToString());
        }
        else
        {
            JScript.AlertMsgOne(this, "回复内容不能为空!", JScript.IconOption.错误);
            return;
        }

        if (OrderModel != null)
        {
            if (OrderModel.IsAnswer == 0)
            {
                OrderModel.IsAnswer   = 1;
                OrderModel.CompUserID = this.UserID;
                OrderModel.ReplyDate  = DateTime.Now;
                OrderModel.CompRemark = AuditRemark;
                OrderModel.ts         = DateTime.Now;
                OrderModel.modifyuser = this.UserID;

                if (OrderBll.Update(OrderModel))
                {
                    Response.Write("<script language=\"javascript\">window.parent.Suggest(" + OrderModel.ID + ");</script>");
                }
            }
        }
        else
        {
            JScript.AlertMsgOne(this, "数据不存在!", JScript.IconOption.错误);
        }
    }
Exemple #6
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Hi.Model.DIS_Suggest model)
 {
     return(dal.Update(model));
 }
Exemple #7
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(Hi.Model.DIS_Suggest model)
 {
     return(dal.Add(model));
 }