Beispiel #1
0
        protected void btnshenhe_Click(object sender, EventArgs e)
        {
            int    i     = 0;
            string sysID = string.Empty;

            foreach (RepeaterItem row in this.rep.Items)
            {
                if (row.ItemType == ListItemType.Item || row.ItemType == ListItemType.AlternatingItem)
                {
                    CheckBox chk  = (CheckBox)row.FindControl("cbx");
                    Label    lbid = (Label)row.FindControl("lbid");
                    if (chk.Checked)
                    {
                        i++;
                        sysID = lbid.Text;
                    }
                }
            }
            if (i == 0)
            {
                MessageBox.Show(this, "请选择需要竞标的项目!");
            }
            else if (i > 1)
            {
                MessageBox.Show(this, "只能选择一项进行设置");
            }
            else
            {
                NCPEP.Model.T_JBTWO model = new NCPEP.Model.T_JBTWO();
                NCPEP.Bll.T_JBTWO   bll   = new NCPEP.Bll.T_JBTWO();
                model      = bll.GetModel(int.Parse(sysID));
                model.zbzt = "1";
                bll.Update(model);
                NCPEP.Model.T_BidTrans modelt = new NCPEP.Model.T_BidTrans();
                NCPEP.Bll.T_BidTrans   bllt   = new NCPEP.Bll.T_BidTrans();
                DataTable dt = bllt.GetList(" FK_BidId='" + Request.QueryString["id"] + "' and FK_LiceTranId='" + model.tid + "'").Tables[0];
                if (dt.Rows.Count > 0)
                {
                    modelt = bllt.GetModel(int.Parse(dt.Rows[0]["id"].ToString()));
                    modelt.TradingStatus = 1;
                    bllt.Update(modelt);
                }
                NCPEP.Bll.T_Bid   bllb   = new NCPEP.Bll.T_Bid();
                NCPEP.Model.T_Bid modelb = new NCPEP.Model.T_Bid();
                modelb      = bllb.GetModel(int.Parse(Request.QueryString["id"]));
                modelb.Jbzt = "2";
                bllb.Update(modelb);
                MessageBox.ShowAndRedirect(this, "一次竞标完成", "jbtwo.aspx");
            }
        }
Beispiel #2
0
        //二次竞价开始设置
        protected void btnerci_Click(object sender, EventArgs e)
        {
            int    i     = 0;
            string sysID = string.Empty;

            foreach (RepeaterItem row in this.rep.Items)
            {
                if (row.ItemType == ListItemType.Item || row.ItemType == ListItemType.AlternatingItem)
                {
                    CheckBox chk  = (CheckBox)row.FindControl("cbx");
                    Label    lbid = (Label)row.FindControl("lbid");
                    if (chk.Checked)
                    {
                        i++;
                        sysID = lbid.Text;
                    }
                }
            }
            if (i == 0)
            {
                MessageBox.Show(this, "请选择需要竞标的项目!");
            }
            else if (i > 1)
            {
                MessageBox.Show(this, "只能选择一项进行竞标设置");
            }
            else
            {
                NCPEP.Model.T_Bid model = new NCPEP.Model.T_Bid();
                NCPEP.Bll.T_Bid   bll   = new NCPEP.Bll.T_Bid();
                model = bll.GetModel(int.Parse(sysID));
                if (model != null)
                {
                    if (model.Jbzt == "1")
                    {
                        MessageBox.Show(this, "一次竞标已经开始不用重复设置!");
                        return;
                    }
                }
                Response.Redirect("jbtwo-addtwo.aspx?id=" + sysID + "");
            }
        }
 //保存
 protected void Button1_Click(object sender, EventArgs e)
 {
     if (Request.QueryString["id"] != null)
     {
         NCPEP.Model.T_Bid model = new NCPEP.Model.T_Bid();
         NCPEP.Dal.T_Bid   dal   = new NCPEP.Dal.T_Bid();
         model        = dal.GetModel(int.Parse(Request.QueryString["id"]));
         model.Jbjzsj = System.DateTime.Now.AddMinutes(double.Parse(this.ddljjsj.SelectedValue)).ToString();
         model.Jbqbj  = this.txtjjdj.Text;
         model.Jbzt   = "3";
         if (dal.Update(model))
         {
             MessageBox.ShowAndRedirect(this, "设置成功", "jbtwo.aspx");
         }
         else
         {
             MessageBox.Show(this, "设置失败");
         }
     }
 }
Beispiel #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Request.QueryString["id"] != null)
         {
             NCPEP.Model.T_XMGG model = new NCPEP.Model.T_XMGG();
             NCPEP.Bll.T_XMGG   bll   = new NCPEP.Bll.T_XMGG();
             model = bll.GetModel(int.Parse(Request.QueryString["id"]));
             if (model != null)
             {
                 this.lbxmmc.Text = model.bid.ToString();
                 NCPEP.Model.T_Bid modelb = new NCPEP.Model.T_Bid();
                 NCPEP.Bll.T_Bid   bllb   = new NCPEP.Bll.T_Bid();
                 modelb                 = bllb.GetModel(model.bid);
                 this.lbxmmc.Text       = modelb.BidName;
                 this.txtNewsTitle.Text = model.xmtitle;
                 this.txtsj.Text        = model.xmsj;
                 this.lbconten.Text     = model.xmneirong;
             }
         }
     }
 }