Ejemplo n.º 1
0
    //批量删除
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        int        sucCount   = 0; //成功数量
        int        errorCount = 0; //失败数量
        tbl_liuyan bll        = new tbl_liuyan();

        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)
            {
                if (bll.Delete(id))
                {
                    sucCount++;
                }
                else
                {
                    errorCount++;
                }
            }
        }
        //mym.AddAdminLog("删除", "删除用户操作日志成功" + sucCount + "条,失败" + errorCount + "条"); //记录日志
        mym.JscriptMsg(this.Page, " 删除用户操作日志成功" + sucCount + "条,失败" + errorCount + "条", Utils.CombUrlTxt("in_box.aspx", "keywords={0}&page={1}", this.keywords, this.page.ToString()), "Success");
    }
Ejemplo n.º 2
0
    private bool DoEdit(int _id)
    {
        bool result = false;

        tbl_liuyan model = new tbl_liuyan();


        model.liuyan_title   = txttitle.Text.Trim();
        model.liuyan_memo    = txtContent.Value;
        model.liuyan_date    = DateTime.Now;
        model.liuyan_bianhao = "A00000000";
        model.liuyan_name    = "公司";
        model.liuyan_to      = txt_bianhao.Text.Trim();
        tbl_huiyuan model_hui = new tbl_huiyuan();

        model_hui.GetModel_hui_bianhao(txt_bianhao.Text.Trim());
        model.liuyan_to_name = model_hui.huiyuan_name;


        int click = 2;

        model.UpdateField(_id, "kan_flag=" + click);
        if (model.Add() > 0)
        {
            result = true;
        }

        return(result);
    }
Ejemplo n.º 3
0
    private void RptBind(string _strWhere, string _orderby)
    {
        this.page        = AXRequest.GetQueryInt("page", 1);
        txtKeywords.Text = this.keywords;
        tbl_liuyan bll = new tbl_liuyan();

        this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
        this.rptList.DataBind();

        //绑定页码
        txtPageNum.Text = this.pageSize.ToString();
        string pageUrl = Utils.CombUrlTxt("out_box.aspx", "keywords={0}&page={1}", this.keywords, "__id__");

        PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
    }
Ejemplo n.º 4
0
    private void ShowInfo(int _id)
    {
        tbl_liuyan model = new tbl_liuyan();

        model.GetModel(_id);
        Littitle.Text   = model.liuyan_title;
        LitContent.Text = model.liuyan_memo;
        LitAddTime.Text = Convert.ToDateTime(model.liuyan_date).ToString("yyyy-MM-dd HH:mm:ss");


        //更新
        if (model.kan_flag == 0)
        {
            int click = 1;
            model.UpdateField(id, "kan_flag=" + click);
        }
    }
Ejemplo n.º 5
0
    private bool DoAdd()
    {
        tbl_liuyan model = new tbl_liuyan();

        model.liuyan_title   = txttitle.Text.Trim();
        model.liuyan_memo    = txtContent.Value;
        model.liuyan_date    = DateTime.Now;
        model.liuyan_bianhao = "A00000000";
        model.liuyan_name    = "公司";
        model.liuyan_to      = txt_bianhao.Text.Trim();

        tbl_huiyuan model_hui = new tbl_huiyuan();

        model_hui.GetModel_hui_bianhao(txt_bianhao.Text.Trim());
        model.liuyan_to_name = model_hui.huiyuan_name;
        if (model.Add() > 0)
        {
            return(true);
        }

        return(false);
    }
Ejemplo n.º 6
0
    private void ShowInfo()
    {
        count             = DbHelperSQL.GetDataRow("select aa=count(*) from tbl_huiyuan where huiyuan_id<>'A00000000' and net_hege=1 and datediff(day,huiyuan_add_time,getdate())=0")["aa"].ToString();
        shouru_z          = DbHelperSQL.GetDataRow("select aa=isnull(sum(xiaofei_money),0) from tbl_xiaofei where zhuce_flag=1 and datediff(day,xiaofei_qr_date,getdate())=0")["aa"].ToString();
        Litreal_name.Text = Session["hy_bianhao"].ToString();
        tbl_login model = new tbl_login();

        model.GetModel_last(Session["hy_bianhao"].ToString());
        Literal_time.Text = model.login_date.ToString();
        tbl_liuyan liuyan = new tbl_liuyan();

        Literal1.Text = "<font color=red>" + liuyan.GetTitleSum(" kan_flag=0 and liuyan_to='A00000000'") + "</font>";

        string  sql  = " SELECT ISNULL(SUM(jiesuan_jiangjin), 0) AS jiangjin FROM tbl_bochu";
        DataSet ds   = DbHelperSQL.Query(sql);
        double  sa   = double.Parse(ds.Tables[0].Rows[0]["jiangjin"].ToString());
        string  sql2 = " SELECT ISNULL(SUM(jiesuan_yeji), 0) AS yeji FROM tbl_bochu";
        DataSet ds2  = DbHelperSQL.Query(sql2);
        double  sb   = double.Parse(ds2.Tables[0].Rows[0]["yeji"].ToString());
        double  c    = sa / sb;

        if (c > 0)
        {
            //Literal2.Text = (decimal.Parse(c.ToString()) * 100m).ToString("0.00");
        }
        string  jsql  = "SELECT ISNULL(SUM(jiesuan_jiangjin), 0) AS jiangjin, CONVERT(char(11), jiesuan_date, 120) AS date FROM tbl_bochu       GROUP BY CONVERT(char(11), jiesuan_date, 120) ORDER BY CONVERT(char(11), jiesuan_date, 120) DESC";
        DataSet jds   = DbHelperSQL.Query(jsql);
        double  jsa   = double.Parse(ds.Tables[0].Rows[0]["jiangjin"].ToString());
        string  jsql2 = " SELECT ISNULL(SUM(jiesuan_yeji), 0) AS yeji, CONVERT(char(11), jiesuan_date, 120) AS date FROM tbl_bochu       GROUP BY CONVERT(char(11), jiesuan_date, 120) ORDER BY CONVERT(char(11), jiesuan_date, 120) DESC";
        DataSet jds2  = DbHelperSQL.Query(jsql2);
        double  jsb   = double.Parse(ds2.Tables[0].Rows[0]["yeji"].ToString());
        double  d     = jsa / jsb;

        if (d > 0)
        {
            //Literal3.Text = (decimal.Parse(d.ToString()) * 100m).ToString("0.00");
        }
    }