Beispiel #1
0
    private void RptBind(string _strWhere, string _orderby)
    {
        this.page = AXRequest.GetQueryInt("page", 1);



        //txtNote_no.Text = this.note_no;
        txtstart_time.Value = this.start_time;
        txtstop_time.Value  = this.stop_time;
        //this.type.SelectedValue = this.cha_type.ToString();
        tbl_Seckill bll = new tbl_Seckill();



        //this.Literal_pa.Text = MyConvert(bll.GetTitleSum(_strWhere + " and  status<>4", "sum(payable_amount)"));

        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("timeList.aspx", "type={0}&status={1}&page={2}&start_time={3}&stop_time={4}", this.cha_type.ToString(), this.status.ToString(), "__id__", this.start_time.ToString(), this.stop_time.ToString());

        PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
    }
Beispiel #2
0
    private void ShowInfo(int _id)
    {
        tbl_Seckill bll = new tbl_Seckill();

        bll.GetModel(_id);
        this.txt_time1.Value   = bll.StartTime.ToString();
        this.txt_time2.Value   = bll.EndTime.ToString();
        this.txttitle.Text     = bll.Name;
        this.pid.SelectedValue = bll.ProductID.ToString();
        this.text_num.Value    = bll.LimitQTY.ToString();
    }
Beispiel #3
0
    private bool DoAdd()
    {
        tbl_Seckill bll = new tbl_Seckill();

        //if (bll.Exists(txttitle.Text.Trim()))
        //{
        //    mym.JscriptMsg(this.Page, "您输入的名称已经存在,请检查!", "", "Error");
        //    return false;
        //}

        bll.StartTime  = Convert.ToDateTime(txt_time1.Value.Trim());
        bll.EndTime    = Convert.ToDateTime(txt_time2.Value.Trim());
        bll.Name       = this.txttitle.Text.Trim();
        bll.Status     = 0;
        bll.CreateTime = DateTime.Now;
        bll.LimitQTY   = Convert.ToInt32(this.text_num.Value.Trim());
        bll.ProductID  = Convert.ToInt32(this.pid.SelectedValue.ToString());
        bll.Add();

        return(true);
    }
Beispiel #4
0
    private bool DoEdit(int _id)
    {
        bool result = false;

        tbl_Seckill bll = new tbl_Seckill();

        bll.GetModel(_id);

        bll.StartTime = Convert.ToDateTime(txt_time1.Value.Trim());
        bll.EndTime   = Convert.ToDateTime(txt_time2.Value.Trim());
        bll.Name      = this.txttitle.Text.Trim();
        bll.LimitQTY  = Convert.ToInt32(this.text_num.Value.Trim());
        bll.ProductID = Convert.ToInt32(this.pid.SelectedValue.ToString());

        if (bll.Update())
        {
            // mym.AddAdminLog("修改", "修改商品类别:" + txttitle.Text); //记录日志
            result = true;
        }

        return(result);
    }