Пример #1
0
        /// <summary>
        /// DataGrid 事件
        /// </summary>
        /// <param name="source"></param>
        /// <param name="e"></param>
        public void dgList_ItemCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
        {
            try
            {
                if ("Delete" == e.CommandName)
                {
                    string strCode = e.Item.Cells[0].Text.Trim();

                    if ("" == strCode)
                    {
                        return;
                    }

                    BLL.BiddingSupplier cbs = new RmsPM.BLL.BiddingSupplier();
                    cbs.BiddingSupplierCode = strCode;
                    cbs.BiddingSupplierDelete();

                    this.LoadData();
                }
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
            }
        }
Пример #2
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, "");
            }
        }
Пример #3
0
        /// <summary>
        /// 保存数据(状态修改)
        /// </summary>
        public void SaveData()
        {
            try
            {
                string[]  chkCodes = {};
                ArrayList chkAL    = new ArrayList();
                //string strchkSelect = "";
                for (int i = 0; i < dgList.Items.Count; i++)
                {
                    if (((HtmlInputCheckBox)dgList.Items[i].FindControl("chkSelect")).Checked)
                    {
                        chkAL.Add(dgList.Items[i].Cells[0].Text.Trim());
                    }
                }

                BLL.BiddingSupplier cbs = new RmsPM.BLL.BiddingSupplier();
                cbs.BiddingPrejudicationCode = this.BiddingPrejudicationCode;
                cbs.dao = dao;
                DataTable myDT    = cbs.GetBiddingSuppliers();
                int       dtCount = myDT.Rows.Count;
                for (int r = 0; r < dtCount; r++)
                {
                    string strCode = myDT.Rows[r]["BiddingSupplierCode"].ToString();

                    cbs.BiddingSupplierCode = strCode;
                    if (chkAL.Contains(strCode))
                    {
                        cbs.Flag = "1";
                    }
                    else
                    {
                        cbs.Flag = "0";
                    }

                    cbs.BiddingSupplierUpdate();
                }
                myDT.Dispose();
                UpdateDepartMentSelect();
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
            }
        }
Пример #4
0
 /// <summary>
 ///删除投标单位
 /// </summary>
 public void DeleteAll(StandardEntityDAO dao)
 {
     try
     {
         ArrayList           saveIdChecked = new ArrayList();
         BLL.BiddingSupplier cbs           = new RmsPM.BLL.BiddingSupplier();
         cbs.dao = dao;
         //遍历每一行
         foreach (DataGridItem dataItem in this.dgList.Items)
         {
             string idChecked = dataItem.Cells[0].Text;
             cbs.BiddingSupplierCode = idChecked;
             cbs.BiddingSupplierDelete();
         }
     }
     catch (Exception ex)
     {
         ApplicationLog.WriteLog(this.ToString(), ex, "");
     }
 }