Exemplo n.º 1
0
        /// <summary>
        /// �ܾ�ͨ�����
        /// </summary>
        /// <param name="descTabName">���ݱ�ʶ</param>
        /// <param name="infoId">��ϢId</param>
        /// <param name="reason">ԭ��</param>
        /// <param name="advice">����</param>
        protected int NotPassAudit(string descTabName, long infoId, string reason, string advice)
        {
            XYECOM.Business.Auditing audBLL = new XYECOM.Business.Auditing();
            XYECOM.Model.AuditingInfo audInfo = new XYECOM.Model.AuditingInfo();

            //�޸����״̬
            int i = audBLL.UpdatesAuditing(infoId, descTabName, XYECOM.Model.AuditingState.NoPass);

            audInfo = audBLL.GetItem(infoId + "", descTabName);

            if (audInfo == null)
            {
                audInfo = new XYECOM.Model.AuditingInfo();
                audInfo.DescTabName = descTabName;
                audInfo.DescTabID = infoId;
            }

            audInfo.A_Advice = reason;
            audInfo.A_Reason = advice;

            audBLL.Update(audInfo);

            return i;
        }
Exemplo n.º 2
0
    protected void GV1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        int iRowNo = Convert.ToInt32(e.CommandArgument);

        long userId = 0;
        int ceId = 0;

        if (e.CommandName == "shenhe")
        {
            ceId = Convert.ToInt32(GV1.DataKeys[iRowNo].Value);

            LinkButton linkBtn = (LinkButton)GV1.Rows[iRowNo].Cells[6].Controls[0];

            if (GV1.DataKeys[Convert.ToInt32(e.CommandArgument)]["U_ID"].ToString() != "")
            {
                userId = Convert.ToInt64(GV1.DataKeys[Convert.ToInt32(e.CommandArgument)]["U_ID"].ToString());
            }

            XYECOM.Business.Auditing audBLL = new Auditing();

            if (linkBtn.Text == "通过审核")
            {
                int t = 0;

                t = audBLL.UpdatesAuditing(ceId, "U_Certificate", XYECOM.Model.AuditingState.NoPass);

                if (t >= 0)new XYECOM.Business.UserReg().UpdateUserPerfectPercent(userId);
            }
            else if (linkBtn.Text == "审核未通过" || linkBtn.Text == "未审核")
            {
                int j = 0;

                j = audBLL.UpdatesAuditing(ceId, "U_Certificate", XYECOM.Model.AuditingState.Passed);

                if (j >= 0) new XYECOM.Business.UserReg().UpdateUserPerfectPercent(userId);
            }
        }

        BindData();
    }
Exemplo n.º 3
0
    protected void gvlist_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        XYECOM.Business.Auditing audBLL = new Auditing();

        int row = Convert.ToInt32(e.CommandArgument);
        Int64 id = Convert.ToInt64(this.gvlist.DataKeys[row][0].ToString());

        LinkButton lb = (LinkButton)this.gvlist.Rows[row].Cells[7].Controls[0];
        LinkButton LB = (LinkButton)this.gvlist.Rows[row].Cells[6].Controls[0];
        XYECOM.Business.News ne = new XYECOM.Business.News();

        if (e.CommandName == "ChangeAuditing")
        {
            if (lb.Text == "通过审核")
            {
                audBLL.UpdatesAuditing(id, "n_news", XYECOM.Model.AuditingState.NoPass);
            }
            else if (lb.Text == "未通过审核")
            {
                audBLL.UpdatesAuditing(id, "n_news", XYECOM.Model.AuditingState.Passed);
            }
        }

        if (e.CommandName == "ChangeCommand")
        {
            if (LB.Text == "推荐")
            {
                ne.UpdateForCommand(id, false);
            }
            else if (LB.Text == "不推荐")
            {
                ne.UpdateForCommand(id, true);
            }
        }
        BindData();
    }
Exemplo n.º 4
0
    /// <summary>
    /// 批量审核
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnAuditing_Click(object sender, EventArgs e)
    {
        long newsId = 0;
        XYECOM.Business.Auditing audBLL = new Auditing();

        foreach (GridViewRow GR in this.gvlist.Rows)
        {
            if (((CheckBox)(GR.FindControl("chkExport"))).Checked == true)
            {
                newsId = XYECOM.Core.MyConvert.GetInt64(gvlist.DataKeys[GR.DataItemIndex].Value.ToString());

                if (newsId <= 0) continue;

                audBLL.UpdatesAuditing(newsId, "n_news", XYECOM.Model.AuditingState.Passed);
            }
        }

        BindData();
    }
Exemplo n.º 5
0
    protected void Button5_Click(object sender, EventArgs e)
    {
        XYECOM.Business.Auditing auditingBLL = new XYECOM.Business.Auditing();

        int i = auditingBLL.UpdatesAuditing(Convert.ToInt64(this.U_ID.Value), "u_user", XYECOM.Model.AuditingState.Passed);

        if (i > 0)
        {
            if (this.U_ID.Value != "")
            {
                new XYECOM.Business.UserReg().UpdateUserPerfectPercent(XYECOM.Core.MyConvert.GetInt64(this.U_ID.Value));
            }
            Alert("审核成功!", Request.Url.PathAndQuery);
        }
        else
        {
            Alert("审核失败!", Request.Url.PathAndQuery);
        }
    }
Exemplo n.º 6
0
    protected void gvlist_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        int u_id = 0;

        int iRowNo = Convert.ToInt32(e.CommandArgument);
        u_id = Convert.ToInt32(this.gvlist.DataKeys[iRowNo].Value);

        string U_Name = this.gvlist.DataKeys[Convert.ToInt32(e.CommandArgument)]["U_Name"].ToString();
        long U_ID = 0;
        string Email = "";
        string title = "";

        if (gvlist.DataKeys[Convert.ToInt32(e.CommandArgument)]["U_ID"].ToString() != "")
        {
            U_ID = Convert.ToInt64(gvlist.DataKeys[Convert.ToInt32(e.CommandArgument)]["U_ID"].ToString());
        }
        if (gvlist.DataKeys[Convert.ToInt32(e.CommandArgument)]["U_Email"].ToString() != "")
        {
            Email = gvlist.DataKeys[Convert.ToInt32(e.CommandArgument)]["U_Email"].ToString();
        }
        if (gvlist.DataKeys[Convert.ToInt32(e.CommandArgument)]["UI_Name"].ToString() != "")
        {
            title = gvlist.DataKeys[Convert.ToInt32(e.CommandArgument)]["UI_Name"].ToString();
        }

        #region 审核
        if (e.CommandName == "shenhe")
        {
            //获取该行的主键
            LinkButton LB = (LinkButton)this.gvlist.Rows[iRowNo].Cells[7].Controls[0];
            XYECOM.Business.Auditing audBLL = new XYECOM.Business.Auditing();

            string aa = LB.Text;
            if (U_ID.ToString() != "")
            {
                if (LB.Text == "通过审核")
                {
                    int j = audBLL.UpdatesAuditing(U_ID, "u_user", XYECOM.Model.AuditingState.NoPass);
                    if (j >= 0)
                    {
                        //给用户留言
                        if (U_ID.ToString() != "")
                        {
                            SendMessage(U_ID);
                        }
                        //给用户发短信
                        if (Email.ToString() != "")
                        {
                            SendEmail(title, Email);
                        }
                    }
                }
                else if (LB.Text == "审核未通过" || LB.Text == "未审核")
                {
                    int j = audBLL.UpdatesAuditing(U_ID, "u_user", XYECOM.Model.AuditingState.Passed);
                }
            }

            BindData();
        }
        #endregion

        this.DataBind();
    }