Пример #1
0
        /// <summary>
        /// 编辑数据
        /// </summary>
        public void ModifyData()
        {
            try
            {
                BiddingSupplier cbiddingSupplier = new BiddingSupplier();
                cbiddingSupplier.dao = this.dao;
                cbiddingSupplier.BiddingPrejudicationCode = this.BiddingForwardPrejudicationCode;
                cbiddingSupplier.Flag = "1";
                EntityData entitydata = cbiddingSupplier._GetBiddingSuppliers();

                foreach (DataRow dr in entitydata.CurrentTable.Select())
                {
                    dr["flag"] = "0";
                }

                if (dao != null)
                {
                    dao.SubmitEntity(entitydata);
                }
                else
                {
                    using (dao = new StandardEntityDAO("BiddingSupplier"))
                    {
                        dao.SubmitEntity(entitydata);
                    }
                }


                int iCount = this.dgList.Items.Count;
                for (int i = 0; i < iCount; i++)
                {
                    string strCode  = this.dgList.Items[i].Cells[0].Text.Trim();
                    string strValue = ((HtmlInputText)this.dgList.Items[i].Cells[11].FindControl("txtNominateUser")).Value.Trim();

                    //if( ""==strValue )
                    //{
                    //    Response.Write( Rms.Web.JavaScript.Alert(true,"请填写提名人!") );
                    //    return;
                    //}

                    BLL.BiddingSupplier cbs = new RmsPM.BLL.BiddingSupplier();
                    cbs.dao = dao;
                    cbs.BiddingSupplierCode = strCode;
                    cbs.NominateUser        = strValue;
                    cbs.BiddingSupplierUpdate();
                }
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
            }
        }
Пример #2
0
    /// <summary>
    /// 保存数据,产生一条


    /// </summary>
    private void SaveBiddingSupplier()
    {
        try
        {
            string BiddingPrejudicationCode = "";

            BiddingPrejudication prejud = new BiddingPrejudication();
            BiddingPrejudicationCode = prejud.GetLastPrejudicationCodeByBiddingCode(this.BiddingCode);
            if (BiddingPrejudicationCode == "" || BiddingPrejudicationCode == null)
            {
                prejud.BiddingCode = this.BiddingCode;
                prejud.CreateDate  = DateTime.Today.ToString();
                prejud.Flag        = "";
                prejud.Remark      = "";
                prejud.UserCode    = ((User)Session["User"]).UserCode;
                prejud.BiddingPrejudicationAdd();
                BiddingPrejudicationCode = prejud.BiddingPrejudicationCode;
            }

            BiddingSupplier cBiddingSupplier = new BiddingSupplier();

            string strOrderCode = "1";

            cBiddingSupplier.BiddingPrejudicationCode = BiddingPrejudicationCode;
            cBiddingSupplier.SupplierCode             = this.HideSupplierCode.Value;
            cBiddingSupplier.NominateUser             = "";
            cBiddingSupplier.NominateDate             = DateTime.Today.ToString();
            cBiddingSupplier.UserCode  = ((User)Session["User"]).UserCode;
            cBiddingSupplier.OrderCode = strOrderCode;
            cBiddingSupplier.State     = "";
            cBiddingSupplier.Flag      = "";
            cBiddingSupplier.BiddingSupplierAdd();
            HideSupplierCode.Value = "";
        }
        catch (Exception ex)
        {
            Response.Write(Rms.Web.JavaScript.Alert(true, ex.Message));
            ApplicationLog.WriteLog(this.ToString(), ex, "");
        }
    }
Пример #3
0
    protected void btnRemove_Click(object sender, EventArgs e)
    {
        foreach (GridViewRow row in GridView1.Rows)
        {
            CheckBox    isSelected            = (CheckBox)row.FindControl("isSelected");
            HiddenField hfBiddingSupplierCode = (HiddenField)row.FindControl("BiddingSupplierCode");
            if (isSelected != null && isSelected.Checked)
            {
                string          BiddingSupplierCode = hfBiddingSupplierCode.Value;
                BiddingSupplier cBiddingSupplier    = new BiddingSupplier();
                cBiddingSupplier.BiddingSupplierCode = BiddingSupplierCode;
                cBiddingSupplier.BiddingSupplierDelete();

                //string sql = string.Format("update BiddingSupplier set flag='' where BiddingSupplierCode='{0}'", BiddingSupplierCode);
                //SqlHelper.ExecuteNonQuery(SqlHelper.DBConnString, CommandType.Text, sql, null);
            }
        }
        SqlDataSource1.SelectParameters["BiddingCode"].DefaultValue = "-1";
        SqlDataSource1.DataBind();
        SqlDataSource1.SelectParameters["BiddingCode"].DefaultValue = this.BiddingCode;
        SqlDataSource1.DataBind();
    }
Пример #4
0
        /// <summary>
        /// 将上一次的投标预审通过的单位移到当前单位预审中
        /// </summary>
        /// <returns></returns>
        public void MovePassByPrejudication()
        {
            try
            {
                BiddingSupplier cbiddingSupplier = new BiddingSupplier();
                cbiddingSupplier.BiddingPrejudicationCode = this.BiddingForwardPrejudicationCode;
                cbiddingSupplier.Flag = "1";
                EntityData entitydata = cbiddingSupplier._GetBiddingSuppliers();

                foreach (DataRow dr in entitydata.CurrentTable.Select())
                {
                    DataRow newdr = entitydata.GetNewRecord();

                    BLL.ConvertRule.DataRowCopy(dr, newdr, entitydata.CurrentTable, entitydata.CurrentTable);

                    newdr["BiddingSupplierCode"]      = DAL.EntityDAO.SystemManageDAO.GetNewSysCode("BiddingSupplier");
                    newdr["BiddingPrejudicationCode"] = this.BiddingPrejudicationCode;
                    entitydata.CurrentTable.Rows.Add(newdr);
                    BLL.BiddingSystem.InsertDepartMent(newdr["BiddingPrejudicationCode"].ToString(), newdr["BiddingSupplierCode"].ToString());
                }

                if (dao != null)
                {
                    dao.SubmitEntity(entitydata);
                }
                else
                {
                    using (dao = new StandardEntityDAO("BiddingSupplier"))
                    {
                        dao.SubmitEntity(entitydata);
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }