Esempio n. 1
0
        private string GetBiddingDtlListStr(string BiddingReturnCodeStr, string SupplierCode)
        {
            string returnstr = "";

            BLL.Bidding bidding = new BLL.Bidding();
            bidding.BiddingCode = this.BiddingCode;
            DataTable dt = bidding.GetBiddingReturn();

            foreach (DataRow dr in dt.Select("BiddingReturnCode in (" + BiddingReturnCodeStr + "'') and flag='1' and SupplierCode='" + SupplierCode + "'"))
            {
                BLL.BiddingReturn br = new BLL.BiddingReturn();
                br.BiddingReturnCode = dr["BiddingReturnCode"].ToString();
                if (this.MoneyState == ModuleState.Eyeable)
                {
                    returnstr += "&nbsp;&nbsp;&nbsp;&nbsp;" + BLL.BiddingDtl.GetBiddingDtlNameByCode(br.BiddingDtlCode) + " 报价:" + br.Money + "<br />";
                }
                else
                {
                    returnstr += "&nbsp;&nbsp;&nbsp;&nbsp;" + BLL.BiddingDtl.GetBiddingDtlNameByCode(br.BiddingDtlCode) + "<br />";
                }
            }
            if (returnstr == "")
            {
                returnstr = "&nbsp;";
            }
            return(returnstr);
        }
Esempio n. 2
0
        private void BoundBiddingDtl(string BiddingReturnCodeStr)
        {
            this.CheckBoxList1.Items.Clear();
            BLL.Bidding bidding = new BLL.Bidding();
            bidding.BiddingCode = this.BiddingCode;
            DataTable dt = bidding.GetBiddingReturnNoMessage();

            foreach (DataRow dr in dt.Select("SupplierCode='" + DropSupplier.SelectedValue + "'"))
            {
                ListItem li = new ListItem(BLL.BiddingDtl.GetBiddingDtlNameByCode(dr["BiddingDtlCode"].ToString()), dr["BiddingReturnCode"].ToString());
                if (this.MoneyState == ModuleState.Eyeable)
                {
                    li.Text += " 报价:" + dr["Money"].ToString();
                }
                this.CheckBoxList1.Items.Add(li);
            }
            dt = bidding.GetBiddingReturn();
            foreach (DataRow dr in dt.Select("BiddingReturnCode in (" + BiddingReturnCodeStr + "'') and flag='1' and SupplierCode='" + DropSupplier.SelectedValue + "'"))
            {
                BLL.BiddingReturn br = new BLL.BiddingReturn();
                br.BiddingReturnCode = dr["BiddingReturnCode"].ToString();
                ListItem li = new ListItem(BLL.BiddingDtl.GetBiddingDtlNameByCode(br.BiddingDtlCode), dr["BiddingReturnCode"].ToString());
                if (this.MoneyState == ModuleState.Eyeable)
                {
                    li.Text += " 报价:" + dr["Money"].ToString();
                }
                li.Selected = true;
                this.CheckBoxList1.Items.Add(li);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// 调整
        /// </summary>
        public void SubmitData()
        {
            bool isEmitDtl = false;

            BLL.Bidding bd = new BLL.Bidding();
            bd.BiddingCode = this.ApplicationCode;
            DataTable dtselect = bd.GetBiddingReturn();
            DataTable dt       = GetSourceTable();

            for (int i = 0; i < dtselect.Rows.Count; i++)
            {
                if (dt.Select("BiddingDtlCode='" + dtselect.Rows[i]["BiddingDtlCode"].ToString() + "'").Length > 0)
                {
                    isEmitDtl = true;
                }
            }
            if (isEmitDtl)
            {
                _SubmitData(false);
            }
            else
            {
                _SubmitData(true);
            }
        }
        public void SubmitBiddingState()
        {
            BLL.BiddingPrejudication cBiddingPrejudication = new BLL.BiddingPrejudication();
            cBiddingPrejudication.BiddingPrejudicationCode = this.ApplicationCode;
            cBiddingPrejudication.dao = this.dao;

            BLL.Bidding bidding = new BLL.Bidding();
            bidding.dao         = this.dao;
            bidding.BiddingCode = cBiddingPrejudication.BiddingCode;
            bidding.State       = "1";
            bidding.BiddingSubmit();
        }
Esempio n. 5
0
        /// ****************************************************************************
        /// <summary>
        /// 提交数据
        /// </summary>
        /// ****************************************************************************
        public void SubmitData()
        {
            string  BiddingReturnCode = "";
            string  BiddingDtlCode    = "";
            decimal tempMoney         = 0;

            foreach (ListItem li in this.CheckBoxList1.Items)
            {
                if (li.Selected)
                {
                    BLL.BiddingReturn br = new BLL.BiddingReturn();
                    br.BiddingReturnCode = li.Value;
                    BiddingReturnCode   += "'" + br.BiddingReturnCode + "',";
                    BiddingDtlCode      += "'" + br.BiddingDtlCode + "',";

                    if (System.Convert.ToDecimal(br.Money) > tempMoney)
                    {
                        this.ViewState["MaxMoney"] = br.Money;
                        tempMoney = System.Convert.ToDecimal(br.Money);
                    }
                }
            }

            BLL.Bidding bidding = new BLL.Bidding();
            bidding.dao         = this.dao;
            bidding.BiddingCode = this.BiddingCode;

            BLL.BiddingMessage cBiddingMessage = new BLL.BiddingMessage();
            cBiddingMessage.BiddingMessageCode = this.ApplicationCode;
            cBiddingMessage.BiddingCode        = this.BiddingCode;
            cBiddingMessage.ProjectCode        = this.ProjectCode;
            cBiddingMessage.ContractNember     = this.txtContractNember.Value;
            cBiddingMessage.ContractName       = this.txtContractName.Value;
            cBiddingMessage.ContractType       = bidding.Type;
            cBiddingMessage.Supplier           = this.DropSupplier.SelectedValue;
            cBiddingMessage.ContractDate       = this.txtContractDate.Value;
            cBiddingMessage.Remark             = this.txtRemark.Value;
            cBiddingMessage.CreateDate         = DateTime.Now.ToShortDateString();
            cBiddingMessage.CreateUser         = "";
            cBiddingMessage.State             = "0";
            cBiddingMessage.Flag              = "0";
            cBiddingMessage.BiddingReturnCode = BiddingReturnCode;
            cBiddingMessage.BiddingDtlCode    = BiddingDtlCode;
            cBiddingMessage.dao = this.dao;
            cBiddingMessage.BiddingMessageSubmit();

            if (this.ApplicationCode == "")
            {
                this.ApplicationCode = cBiddingMessage.BiddingMessageCode;
            }
        }
Esempio n. 6
0
        public void InitControl()
        {
            BLL.Bidding cBidding = new BLL.Bidding();
            cBidding.BiddingCode = this.BiddingCode;
            string LinkUrl = "<a onclick=OpenLargeWindow('biddingmodify.aspx?BiddingCode=" + this.BiddingCode + "&State=edit&ProjectCode=" + cBidding.ProjectCode + "')>" + cBidding.Title + "</a>";

            //this.tdBiddingTitle.InnerHtml = cBidding.Title;
            this.tdBiddingTitle.InnerHtml = LinkUrl;
            this.tdProjectName.InnerHtml  = BLL.ProjectRule.GetProjectName(cBidding.ProjectCode);

            this.ViewState["Money"]       = cBidding.Money;
            this.ViewState["mostly"]      = cBidding.Accessory;
            this.ViewState["BiddingType"] = cBidding.Type;
        }
Esempio n. 7
0
        /// ****************************************************************************
        /// <summary>
        /// 提交数据
        /// </summary>
        /// ****************************************************************************
        public void SubmitData()
        {
            BLL.BiddingEmit cBiddingEmit = new BLL.BiddingEmit();
            cBiddingEmit.BiddingEmitCode = this.ApplicationCode;
            cBiddingEmit.BiddingCode     = this.BiddingCode;
            cBiddingEmit.EmitNumber      = this.txtEmitNumber.Value;
            if (this.txtEmitDate.Value != "")
            {
                cBiddingEmit.EmitDate = this.txtEmitDate.Value;
            }
            if (this.txtEndDate.Value != "")
            {
                cBiddingEmit.EndDate = this.txtEndDate.Value;
            }
            if (this.txtPrejudicationDate.Value != "")
            {
                cBiddingEmit.PrejudicationDate = this.txtPrejudicationDate.Value;
            }
            cBiddingEmit.CreatUser = ((User)Session["user"]).UserCode;
            cBiddingEmit.CreatDate = DateTime.Now.ToString();
            cBiddingEmit.dao       = this.dao;
            cBiddingEmit.BiddingEmitSubmit();

            BLL.Bidding bidding = new BLL.Bidding();
            bidding.BiddingCode = cBiddingEmit.BiddingCode;
            bidding.State       = NowState;
            bidding.dao         = dao;
            bidding.BiddingSubmit();

            if (this.ApplicationCode == "")
            {
                this.ApplicationCode = cBiddingEmit.BiddingEmitCode;
            }

            /*BLL.BiddingDtl bd = new BLL.BiddingDtl();
             * bd.BiddingCode = this.BiddingCode;
             * bd.flag = "1";
             * DataTable dt = bd.GetBiddingDtls();
             * for (int i = 0; i < dt.Rows.Count; i++)
             * {
             *  BLL.BiddingEmitDtl bed = new BLL.BiddingEmitDtl();
             *  bed.BiddingDtlCode = dt.Rows[i]["BiddingDtlCode"].ToString();
             *  bed.BiddingEmitCode = this.ApplicationCode;
             *  bed.BiddingEmitDtlSubmit();
             * }*/
        }
Esempio n. 8
0
        private int ContractLoad(DataTable dtRemind, string ProjectCode)
        {
            BLL.Bidding bidding = new BLL.Bidding();
            ArrayList   ar      = new ArrayList();

            ar.Add("1900-1-1");
            ar.Add(DateTime.Now.ToShortDateString());
            bidding.ConfirmDateEx = ar;
            bidding.State         = "4";
            bidding.ProjectCode   = ProjectCode;

            if (bidding.GetBiddings().Rows.Count != 0)
            {
                DataRow drRemind = dtRemind.NewRow();
                drRemind["Type"]  = "&nbsp;&nbsp;[合同签约到期]";
                drRemind["Url"]   = "BiddingManage/BiddingQuery.aspx?State=4&ProjectCode=" + ProjectCode;
                drRemind["Title"] = bidding.GetBiddings().Rows.Count.ToString() + "个";
                dtRemind.Rows.Add(drRemind);
            }
            return(bidding.GetBiddings().Rows.Count);
        }
Esempio n. 9
0
        /// ****************************************************************************
        /// <summary>
        /// 提交数据
        /// </summary>
        /// ****************************************************************************
        public void SubmitData()
        {
            DAL.QueryStrategy.BiddingReturnStrategyBuilder sb = new RmsPM.DAL.QueryStrategy.BiddingReturnStrategyBuilder();
            sb.AddStrategy(new Strategy(DAL.QueryStrategy.BiddingReturnStrategyName.BiddingEmitCode, this.ApplicationCode));

            string sql = sb.BuildMainQueryString();

            EntityData entity = new EntityData("BiddingReturn");

            dao.FillEntity(sql, entity);

            for (int i = 0; i < this.Repeater1.Items.Count; i++)
            {
                string _BiddingReturnCode = ((HtmlInputText)this.Repeater1.Items[i].FindControl("txtBiddingReturnCode")).Value.Trim();
                string _Design            = ((RadioButtonList)this.Repeater1.Items[i].FindControl("RadioDesign")).SelectedValue;
                string _Project           = ((RadioButtonList)this.Repeater1.Items[i].FindControl("RadioProject")).SelectedValue;
                string _Consultant        = ((RadioButtonList)this.Repeater1.Items[i].FindControl("RadioConsultant")).SelectedValue;
                string _State             = ((HtmlGenericControl)this.Repeater1.Items[i].FindControl("txtState")).InnerText.Trim();
                string _Flag = "0";

                if (((HtmlInputCheckBox)this.Repeater1.Items[i].FindControl("chkAuditing")).Checked)
                {
                    _Flag = "1";
                    //string flag="1";
                    try
                    {
                        string          supplier = ((HtmlInputText)this.Repeater1.Items[i].FindControl("hiddenSupplierCode")).Value.Trim();
                        BLL.BiddingEmit bemit    = new RmsPM.BLL.BiddingEmit();
                        bemit.IsLowOfPriceByBiddingCode(_BiddingReturnCode);
                    }
                    catch (Exception ex)
                    {
                        Response.Write(Rms.Web.JavaScript.Alert(true, ex.Message));
                    }
                }

                DataRow[] dr = entity.CurrentTable.Select("BiddingReturnCode=" + _BiddingReturnCode);
                if (_Design != "" && this.State1 == ModuleState.Operable)
                {
                    dr[0]["Design"] = _Design;
                }
                if (_Project != "" && this.State2 == ModuleState.Operable)
                {
                    dr[0]["Project"] = _Project;
                }
                if (_Consultant != "" && this.State3 == ModuleState.Operable)
                {
                    dr[0]["Consultant"] = _Consultant;
                }
                if (_State != "" && this.State4 == ModuleState.Operable)
                {
                    dr[0]["State"] = _State;
                }
                if (this.State == ModuleState.Operable)
                {
                    dr[0]["Flag"] = _Flag;
                }
            }

            dao.SubmitEntity(entity);
            if (this.MainState == ModuleState.Operable)
            {
                this.AttachMentAdd1.SaveAttachMent(this.ApplicationCode);
            }
            if (this.State == ModuleState.Operable)
            {
                BLL.Bidding bidding = new BLL.Bidding();
                bidding.BiddingCode = this.BiddingCode;
                bidding.dao         = this.dao;
                bidding.State       = "4";
                bidding.BiddingSubmit();
            }
        }
Esempio n. 10
0
        /// ****************************************************************************
        /// <summary>
        /// 提交数据
        /// </summary>
        /// ****************************************************************************
        public void SubmitData()
        {
            if (this.ApplicationCode != "")
            {
                DAL.QueryStrategy.BiddingReturnStrategyBuilder sb = new RmsPM.DAL.QueryStrategy.BiddingReturnStrategyBuilder();
                sb.AddStrategy(new Strategy(DAL.QueryStrategy.BiddingReturnStrategyName.BiddingCode, this.BiddingCode));

                string sql = sb.BuildMainQueryString();

                EntityData entity = new EntityData("BiddingReturn");
                dao.FillEntity(sql, entity);
                //删除原有排名
                BLL.BiddingSystem.DelHistoryPlace(this.BiddingCode);
                //产生一张新表
                DataTable dt = new DataTable();
                dt.Columns.Add("BiddingReturnCode", System.Type.GetType("System.String"));
                dt.Columns.Add("Money", System.Type.GetType("System.Decimal"));
                dt.Columns.Add("Remark", System.Type.GetType("System.String"));
                dt.Columns.Add("ReturnDate", System.Type.GetType("System.String"));
                dt.Columns.Add("State", System.Type.GetType("System.String"));
                dt.Columns.Add("BiddingDtlCode", System.Type.GetType("System.String"));
                DataRow dr;
                //读取表中信息,并产生排名
                for (int i = 0; i < this.dgListEdit.Items.Count; i++)
                {
                    dr = dt.NewRow();
                    dr["BiddingReturnCode"] = this.dgListEdit.Items[i].Cells[0].Text.Trim();
                    dr["Money"]             = this.GetControl(i).TotalMoney;
                    dr["Remark"]            = ((HtmlTextArea)this.dgListEdit.Items[i].FindControl("txtRemark")).Value.Trim();
                    dr["ReturnDate"]        = ((AspWebControl.Calendar) this.dgListEdit.Items[i].FindControl("txtReturnDate")).Value;
                    dr["BiddingDtlCode"]    = this.dgListEdit.Items[i].Cells[8].Text.Trim();
                    //dr["State"]=i+1;
                    dt.Rows.Add(dr);
                }
                BLL.Bidding bd = new BLL.Bidding();
                bd.BiddingCode = this.BiddingCode;
                BLL.BiddingReturn br = new BLL.BiddingReturn();
                br.BiddingEmitCode = bd.BiddingLastEmit;
                DataTable dtreturn = br.GetBiddingReturns();
                foreach (DataRow drr in dtreturn.Rows)
                {
                    if (dt.Select("BiddingReturnCode ='" + drr["BiddingReturnCode"].ToString() + "'").Length == 0)
                    {
                        dr = dt.NewRow();
                        dr["BiddingReturnCode"] = drr["BiddingReturnCode"];
                        dr["BiddingDtlCode"]    = drr["BiddingDtlCode"];
                        dr["Money"]             = drr["Money"];
                        dr["Remark"]            = drr["Remark"];
                        dr["ReturnDate"]        = drr["ReturnDate"];
                        //dr.ItemArray.CopyTo(drr.ItemArray, 0);
                        dt.Rows.Add(dr);
                    }
                }


                DataView dv = new DataView(dt);

                dv.Sort = "BiddingDtlCode,Money";
                //for(int i=0;i<dv.Rows.Count;i++)
                int     j            = 0;
                string  tempBDtlCode = "";
                decimal tempMoney    = 0;

                foreach (DataRowView dr2 in dv)
                {
                    if (tempBDtlCode != dr2["BiddingDtlCode"].ToString())
                    {
                        tempBDtlCode = dr2["BiddingDtlCode"].ToString();
                        j            = 0;
                        tempMoney    = 0;
                    }


                    DataRow[] dr1 = entity.CurrentTable.Select("BiddingReturnCode='" + dr2["BiddingReturnCode"].ToString() + "' and " + "BiddingDtlCode='" + dr2["BiddingDtlCode"].ToString() + "'");

                    if (dr1.Length > 0)
                    {
                        dr1[0]["Money"]      = dr2["Money"];
                        dr1[0]["Remark"]     = dr2["Remark"];
                        dr1[0]["ReturnDate"] = dr2["ReturnDate"];
                        //State字段中存放商务标排名,规则为:如果回标金额为0或者为空时不参与商务标排名;金额一样的单位,名次一样。
                        if (!dr2["Money"].ToString().Equals("0") && !dr2["Money"].ToString().Equals(""))
                        {
                            if (tempMoney != System.Convert.ToDecimal(dr2["Money"]))
                            {
                                j++;
                            }
                            dr1[0]["State"] = j;
                        }
                        else
                        {
                            dr1[0]["State"] = "";
                        }
                        tempMoney = System.Convert.ToDecimal(dr2["Money"]);
                    }
                }

                dao.SubmitEntity(entity);
                BLL.Bidding bidding = new BLL.Bidding();
                bidding.BiddingCode = this.BiddingCode;
                bidding.State       = NowState;
                bidding.dao         = dao;
                bidding.BiddingSubmit();
                //更新备注
                BLL.BiddingEmit addRemark = new RmsPM.BLL.BiddingEmit();
                addRemark.BiddingEmitCode = this.BiddingEmitCode;
                addRemark.TotalRemark     = this.txtTotalRemark.Text;
                addRemark.dao             = dao;
                addRemark.BiddingEmitUpdate();
            }
            else
            {
                //删除历史排序记录
                BLL.BiddingSystem.DelHistoryPlace(this.BiddingCode);
                DataTable           dt   = (DataTable)ViewState["dt"];
                BLL.BiddingSupplier BSup = new RmsPM.BLL.BiddingSupplier();

                DAL.QueryStrategy.BiddingReturnStrategyBuilder sb = new RmsPM.DAL.QueryStrategy.BiddingReturnStrategyBuilder();
                sb.AddStrategy(new Strategy(DAL.QueryStrategy.BiddingReturnStrategyName.BiddingEmitCode, this.BiddingEmitCode));

                string sql = sb.BuildMainQueryString();

                EntityData entity = new EntityData("BiddingReturn");
                dao.FillEntity(sql, entity);

                if (dt.Rows.Count > 0)
                {
                    dao.DeleteAllRow(entity);
                    dao.SubmitEntity(entity);
                    string stat = "0";
                    string tempsuppliercodestr = "";
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        if (((CheckBox)dgListView.Items[i].FindControl("CheckBox1")).Checked == true)
                        {
                            DataRow dr = entity.GetNewRecord();
                            dr["BiddingReturnCode"] = dt.Rows[i]["BiddingReturnCode"].ToString();
                            dr["BiddingDtlCode"]    = dt.Rows[i]["BiddingDtlCode"].ToString();
                            dr["SupplierCode"]      = dt.Rows[i]["SupplierCode"].ToString();
                            dr["OrderCode"]         = dt.Rows[i]["OrderCode"].ToString();
                            dr["BiddingEmitCode"]   = this.BiddingEmitCode;
                            dr["Abnegate"]          = 0;
                            entity.AddNewRecord(dr);
                            //更新供应商表
                            stat = "1";


                            //添加评分信息
                            RmsPM.BLL.BiddingGradeMessage cbiddingGradeMessage = new RmsPM.BLL.BiddingGradeMessage();

                            cbiddingGradeMessage.ApplicationCode      = dt.Rows[i]["BiddingReturnCode"].ToString();
                            cbiddingGradeMessage.BiddingGradeTypeCode = "100002";
                            if (cbiddingGradeMessage.GetBiddings().Rows.Count == 0)
                            {
                                cbiddingGradeMessage.BiddingGradeMessageCode = "";
                                cbiddingGradeMessage.ProjectManage           = "";
                                cbiddingGradeMessage.State = "1";
                                cbiddingGradeMessage.dao   = dao;
                                cbiddingGradeMessage.BiddingGradeMessageAdd();
                            }

                            ////////////////网上招投标数据产生////////////////////
                            if (tempsuppliercodestr.IndexOf(dt.Rows[i]["SupplierCode"].ToString()) == -1 && this.CheckBox2.Checked)
                            {
                                tempsuppliercodestr += "," + dt.Rows[i]["SupplierCode"].ToString();
                                EmitToInsert(dt.Rows[i]["SupplierCode"].ToString(), this.BiddingEmitCode);
                            }
                            ///////////////////////////////////////////////////////
                        }
                        //更新供应商列表

                        BSup.BiddingSupplierCode = this.dgListView.DataKeys[i].ToString();
                        BSup.State = stat;
                        BSup.dao   = dao;
                        BSup.BiddingSupplierUpdate();



                        //BSup.BiddingSupplierUpdate();
                    }
                    dao.SubmitEntity(entity);
                    entity.Dispose();
                }

                //保存开标人
                if (this.CheckBox2.Checked)
                {
                    BiddingBFL.Emit_SendMail(this.BiddingEmitCode, Server.MapPath(ConfigurationManager.AppSettings["VirtualDirectory"].ToString()) + @"\EmailTemplate.xml");
                    foreach (ListItem opener in chkOpener.Items)
                    {
                        if (opener.Selected)
                        {
                            BiddingBFL.InsertBiddingOpener(this.BiddingEmitCode, opener.Value);
                        }
                    }
                }
            }
        }
        /// ****************************************************************************
        /// <summary>
        /// 数据加载
        /// </summary>
        /// ****************************************************************************
        private void LoadData(bool Flag)
        {
            if (this.State1 == ModuleState.Operable)
            {
                SelectState = true;
            }

            if (this.ApplicationCode != "")
            {
                BLL.BiddingPrejudication cBiddingPrejudication = new BLL.BiddingPrejudication();
                cBiddingPrejudication.BiddingPrejudicationCode = this.ApplicationCode;
                BLL.Bidding cBidding = new BLL.Bidding();
                cBidding.BiddingCode = cBiddingPrejudication.BiddingCode;

                if (Flag)
                {
                    this.txtProjectName.InnerHtml = BLL.ProjectRule.GetProjectName(cBidding.ProjectCode) + "&nbsp; ";
                    string LinkUrl = "<a onclick=OpenLargeWindow('biddingmodify.aspx?BiddingCode=" + cBidding.BiddingCode + "&State=edit&ProjectCode=" + cBidding.ProjectCode + "')>" + cBidding.Title + "</a>";
                    //this.txtBiddingTitle.InnerHtml = cBidding.Title+"&nbsp; ";
                    this.txtBiddingTitle.InnerHtml = LinkUrl;
                    this.txtEmitDate.InnerHtml     = cBidding.EmitDate + "&nbsp; ";

                    this.txtNumber.Value = cBiddingPrejudication.Number;
                    this.BiddingCode     = cBiddingPrejudication.BiddingCode;
                    //this.EditSupplier.InnerHtml = "<a href=\"#\" onclick=\"javascript:BiddingPrejudicationOpenSupplierPage('"+this.ApplicationCode+"','edit','"+SelectState+"');return false\">参加资格预审的单位名单</a>";
                    this.EditState = true;
                    this.ViewState["BiddingTitle"] = cBidding.Title;
                    this.DepartMentCode            = cBidding.BiddingRemark1;
                }
                else
                {
                    this.tdProjectName.InnerHtml = BLL.ProjectRule.GetProjectName(cBidding.ProjectCode) + "&nbsp; ";
                    string LinkUrl = "<a onclick=OpenLargeWindow('biddingmodify.aspx?BiddingCode=" + cBidding.BiddingCode + "&State=edit&ProjectCode=" + cBidding.ProjectCode + "')>" + cBidding.Title + "</a>";
                    //this.tdBiddingTitle.InnerHtml = cBidding.Title+"&nbsp; ";
                    this.tdBiddingTitle.InnerHtml = LinkUrl;
                    this.tdEmitDate.InnerHtml     = cBidding.EmitDate + "&nbsp; ";

                    this.tdNumber.InnerHtml = cBiddingPrejudication.Number + "&nbsp; ";
                    this.BiddingCode        = cBiddingPrejudication.BiddingCode;
                    //this.ViewSupplier.InnerHtml = "<a href=\"#\" onclick=\"javascript:BiddingPrejudicationOpenSupplierPage('"+this.ApplicationCode+"','view','"+SelectState+"');return false\">参加资格预审的单位名单</a>";
                    this.EditState = false;
                    this.ViewState["BiddingTitle"] = cBidding.Title;
                    this.DepartMentCode            = cBidding.BiddingRemark1;
                }
            }
            else
            {
                if (Flag)
                {
                    BLL.Bidding cBidding = new BLL.Bidding();
                    cBidding.BiddingCode          = this.BiddingCode;
                    this.txtProjectName.InnerHtml = BLL.ProjectRule.GetProjectName(cBidding.ProjectCode) + "&nbsp; ";
                    string LinkUrl = "<a onclick=OpenLargeWindow('biddingmodify.aspx?BiddingCode=" + this.BiddingCode + "&State=edit&ProjectCode=" + cBidding.ProjectCode + "')>" + cBidding.Title + "</a>";
                    //this.txtBiddingTitle.InnerHtml = cBidding.Title+"&nbsp; ";
                    this.txtBiddingTitle.InnerHtml = LinkUrl;
                    this.txtEmitDate.InnerHtml     = cBidding.EmitDate + "&nbsp; ";
                    this.ViewState["BiddingTitle"] = cBidding.Title;
                    this.EditState = true;
                }
                this.ViewState["tempCode"] = this.UserCode + DateTime.Now.ToString();
            }
            BLL.Bidding ccBidding = new BLL.Bidding();
            ccBidding.BiddingCode         = this.BiddingCode;
            this.ViewState["Money"]       = ccBidding.Money;
            this.ViewState["mostly"]      = ccBidding.Accessory;
            this.ViewState["BiddingType"] = ccBidding.Type;
            this.ProjectCode = ccBidding.ProjectCode;
            //this.ViewSupplier.InnerHtml = "<a href=\"#\" onclick=\"javascript:BiddingPrejudicationOpenSupplierPage('"+this.ViewState["tempCode"].ToString()+"','view','"+SelectState+"');return false\">参加资格预审的单位名单</a>";
            //this.EditSupplier.InnerHtml = "<a href=\"#\" onclick=\"javascript:BiddingPrejudicationOpenSupplierPage('"+this.ViewState["tempCode"].ToString()+"','edit','"+SelectState+"');return false\">参加资格预审的单位名单</a>";
        }
Esempio n. 12
0
        /// ****************************************************************************
        /// <summary>
        /// 初始化
        /// </summary>
        /// ****************************************************************************
        private void InitPage()
        {
            if (Request["ApplicationCode"] != null)
            {
                this.ApplicationCode = Request["ApplicationCode"] + "";
            }
            else if (Request["BiddingCode"] != null)
            {
                this.ApplicationCode = Request["BiddingCode"] + "";
            }
            if (Request["ProjectCode"] != null)
            {
                this.ProjectCode = Request["ProjectCode"].ToString();
            }


            //  //--//特殊要求
            string company = this.up_sPMName.ToLower();

            switch (company)
            {
            case "disaipm":
                this.workflowmsg.Visible   = false;
                this.WorkFlowList1.Visible = false;
                this.WorkFlowDiv.Visible   = false;
                break;

            case "tangchenpm":

                this.btnNewSupply.Value = "招标执行";
                break;


            case "gaokepm":


                this.Bt_ReturnOfPrice.Style["display"] = "none";

                break;

                //this.PrejudicationListdiv.Visible = true;
                //this.ReturnListdiv.Visible = true;
                //this.BiddingPrejudicationList1.BiddingCode = this.ApplicationCode;
                //this.BiddingPrejudicationList1.DataBound();
            }
            //
            //修改


            if (this.user.HasRight("2106"))
            {
                BiddingDtlModify1.PriceState = WorkFlowControl.ModuleState.Operable;
                Bidding1.PriceState          = WorkFlowControl.ModuleState.Operable;
            }
            else if (this.user.HasRight("2107"))//查看
            {
                BiddingDtlModify1.PriceState = WorkFlowControl.ModuleState.Eyeable;
                Bidding1.PriceState          = WorkFlowControl.ModuleState.Eyeable;
            }


            if (!this.user.HasRight("210904"))//招标文件新增
            {
                this.Bidding1.BiddingFileState = ModuleState.Unbeknown;
            }
            else
            {
                this.Bidding1.BiddingFileState = ModuleState.Operable;
            }



            Bidding1.ApplicationCode          = this.ApplicationCode;
            Bidding1.ProjectCode              = this.ProjectCode;
            Bidding1.UserCode                 = this.user.UserCode;
            BiddingDtlModify1.ApplicationCode = Bidding1.ApplicationCode;
            BiddingDtlModify1.ProjectCode     = this.ProjectCode;

            BLL.BiddingEmit   cBiddingEmit = new BLL.BiddingEmit();
            BLL.BiddingManage bm           = new BLL.BiddingManage();
            bm.BiddingCode = this.ApplicationCode;

            if (this.ApplicationCode == "")
            {
                Bidding1.State = WorkFlowControl.ModuleState.Operable;
                Bidding1.InitControl();

                this.BiddingConditionFileInfo1.State = ModuleState.Unbeknown;

                BiddingDtlModify1.State = WorkFlowControl.ModuleState.Operable;
                BiddingDtlModify1.InitControl();

                this.btnSave.Visible          = true;
                this.btnAddDtl.Visible        = true;
                this.btnModify.Visible        = false;
                this.btnDel.Visible           = false;
                this.btnNewSupply.Visible     = false;
                this.btnEmit.Visible          = false;
                this.btnReturn.Visible        = false;
                this.btnAuditing.Visible      = false;
                this.btnMessage.Visible       = false;
                this.btnContract.Visible      = false;
                this.Bt_LowOfPrice.Visible    = false;
                this.Bt_ReturnOfPrice.Visible = false;

                //this.btnAddMoney.Visible = false;
                this.btnCheckBiddingDiscuss.Visible    = false;
                this.btnOldCheckBiddingDiscuss.Visible = false;
                this.btnCheckDiscuss.Visible           = false;

                //隐藏若干选项卡
                this.BiddingCondition.Style["display"]     = "none";
                this.BiddingContidionFile.Style["display"] = "none";
                this.trPrejudication.Style["display"]      = "none";
                this.Tr1.Style["display"]               = "none";
                this.trZBGC.Style["display"]            = "none";
                this.BiddingProcessDiv.Style["display"] = "none";
                this.trHBGC.Style["display"]            = "none";
                this.BiddingEmitDiv.Style["display"]    = "none";
                this.tdBiddingMessage.Style["display"]  = "none";
                this.BiddingMessageDiv.Style["display"] = "none";
                this.workflowmsg.Style["display"]       = "none";
                this.WorkFlowDiv.Style["display"]       = "none";
            }
            else
            {
                this.BiddingConditionFileInfo1.State = ModuleState.Operable;
                this.btnModify.Visible = true;
                this.btnSave.Visible   = false;
                this.btnAddDtl.Visible = false;
                this.btnDel.Visible    = false;
                Bidding1.State         = WorkFlowControl.ModuleState.Eyeable;
                Bidding1.InitControl();
                BiddingDtlModify1.State = WorkFlowControl.ModuleState.Eyeable;
                BiddingDtlModify1.InitControl();
                if (Bidding1.BiddingState == "0")//只有招标计划信息
                {
                    this.btnNewSupply.Visible     = true;
                    this.btnEmit.Visible          = false;
                    this.btnReturn.Visible        = false;
                    this.btnAuditing.Visible      = false;
                    this.btnMessage.Visible       = false;
                    this.btnContract.Visible      = false;
                    this.Bt_LowOfPrice.Visible    = false;
                    this.Bt_ReturnOfPrice.Visible = false;
                    this.btnDel.Visible           = true;
                    //this.btnAddMoney.Visible = false;
                    //LB_BiddingState.Text="";
                }
                if (Bidding1.BiddingState == "1")//有预审投标单位
                {
                    this.btnNewSupply.Visible     = true;
                    this.btnEmit.Visible          = true;
                    this.btnReturn.Visible        = false;
                    this.btnAuditing.Visible      = false;
                    this.btnMessage.Visible       = false;
                    this.btnContract.Visible      = false;
                    this.Bt_LowOfPrice.Visible    = false;
                    this.Bt_ReturnOfPrice.Visible = false;
                    //this.btnAddMoney.Visible = false;
                    this.btnCheckBiddingDiscuss.Visible    = false;
                    this.btnOldCheckBiddingDiscuss.Visible = false;
                    this.btnCheckDiscuss.Visible           = false;
                }
                if (Bidding1.BiddingState == "2")//已经发标
                {
                    this.btnNewSupply.Visible     = true;
                    this.btnEmit.Visible          = false;
                    this.btnReturn.Visible        = GetShowInfoForbtnReturn();
                    this.btnAuditing.Visible      = false;
                    this.btnMessage.Visible       = false;
                    this.btnContract.Visible      = false;
                    this.Bt_LowOfPrice.Visible    = false;
                    this.Bt_ReturnOfPrice.Visible = false;
                    IsShow_Control_BiddingEmitHistory(true);
                    // this.btnAddMoney.Visible = false;
                    this.btnCheckBiddingDiscuss.Visible    = false;
                    this.btnOldCheckBiddingDiscuss.Visible = false;
                    this.btnCheckDiscuss.Visible           = false;
                }
                if (Bidding1.BiddingState == "3")//已经回标
                {
                    this.btnNewSupply.Visible     = true;
                    this.btnEmit.Visible          = true;
                    this.btnReturn.Visible        = GetShowInfoForbtnReturn();
                    this.btnAuditing.Visible      = true;
                    this.btnMessage.Visible       = false;
                    this.btnContract.Visible      = false;
                    this.Bt_LowOfPrice.Visible    = false;
                    this.Bt_ReturnOfPrice.Visible = false;
                    IsShow_Control_BiddingEmitHistory(true);
                    this.btnCheckDiscuss.Visible           = false;
                    this.btnCheckBiddingDiscuss.Visible    = false;
                    this.btnOldCheckBiddingDiscuss.Visible = false;
                }
                if (Bidding1.BiddingState == "5")//已经开始评标,处于压价状态
                {
                    this.btnNewSupply.Visible     = false;
                    this.btnEmit.Visible          = false;
                    this.btnReturn.Visible        = false;
                    this.btnAuditing.Visible      = false;
                    this.btnMessage.Visible       = false;
                    this.btnContract.Visible      = false;
                    this.Bt_LowOfPrice.Visible    = true;
                    this.Bt_ReturnOfPrice.Visible = false;
                    IsShow_Control_BiddingEmitHistory(true);
                    this.btnCheckDiscuss.Visible = false;
                    //this.btnAddMoney.Visible = false;
                    this.btnCheckBiddingDiscuss.Visible    = false;
                    this.btnOldCheckBiddingDiscuss.Visible = false;
                }
                if (Bidding1.BiddingState == "6")//已经开始评标,处于压价状态
                {
                    this.btnNewSupply.Visible     = false;
                    this.btnEmit.Visible          = false;
                    this.btnReturn.Visible        = false;
                    this.btnAuditing.Visible      = false;
                    this.btnMessage.Visible       = false;
                    this.btnContract.Visible      = false;
                    this.Bt_LowOfPrice.Visible    = true;
                    this.Bt_ReturnOfPrice.Visible = true;
                    IsShow_Control_BiddingEmitHistory(true);
                    this.btnCheckDiscuss.Visible = false;
                    //this.btnAddMoney.Visible = false;
                    this.btnCheckBiddingDiscuss.Visible    = false;
                    this.btnOldCheckBiddingDiscuss.Visible = false;
                }
                if (Bidding1.BiddingState == "4")//评审完毕
                {
                    this.btnNewSupply.Visible = false;
                    this.btnEmit.Visible      = false;
                    this.btnReturn.Visible    = false;
                    this.btnAuditing.Visible  = false;
                    this.btnModify.Visible    = false;
                    this.btnMessage.Visible   = true;
                    //this.btnMessage.Visible=user.HasOperationRight("2106");
                    this.btnContract.Visible      = false;
                    this.Bt_LowOfPrice.Visible    = false;
                    this.Bt_ReturnOfPrice.Visible = false;
                    IsShow_Control_BiddingEmitHistory(true);
                    if (ConfigurationSettings.AppSettings["IsBiddingMessage"] == "0")
                    {
                        btnMessage.Visible       = false;
                        this.btnContract.Visible = true;
                    }
                    this.btnCheckDiscuss.Visible = false;
                    //this.btnAddMoney.Visible = false;
                    this.btnCheckBiddingDiscuss.Visible    = false;
                    this.btnOldCheckBiddingDiscuss.Visible = false;
                }
                if (Bidding1.BiddingState == "41")//中标通知书评审中
                {
                    this.btnNewSupply.Visible = false;
                    this.btnEmit.Visible      = false;
                    this.btnReturn.Visible    = false;
                    this.btnAuditing.Visible  = false;
                    this.btnModify.Visible    = false;
                    //this.btnAddMoney.Visible = false;
                    this.btnCheckBiddingDiscuss.Visible    = false;
                    this.btnOldCheckBiddingDiscuss.Visible = false;
                    this.btnCheckDiscuss.Visible           = false;

                    BLL.Bidding bd = new BLL.Bidding();
                    bd.BiddingCode = Bidding1.ApplicationCode;
                    if (bd.GetBiddingReturnNoMessage().Rows.Count > 0)
                    {
                        this.btnMessage.Visible = true;
                    }
                    else
                    {
                        this.btnMessage.Visible = false;
                    }

                    BLL.BiddingMessage bms = new BLL.BiddingMessage();
                    bms.BiddingCode = Bidding1.ApplicationCode;
                    DataTable dtbms = bms.GetBiddingMessages();
                    bool      ContractCreateFlag = false;
                    foreach (DataRow dr in dtbms.Select())
                    {
                        if (BLL.ContractRule.GetContractCountByContractDefaultValueCode(dr["BiddingMessageCode"].ToString()) == 0)
                        {
                            ContractCreateFlag = true;
                        }
                    }

                    this.btnContract.Visible = ContractCreateFlag;

                    this.Bt_LowOfPrice.Visible    = false;
                    this.Bt_ReturnOfPrice.Visible = false;
                    IsShow_Control_BiddingEmitHistory(true);
                }
                if (Bidding1.BiddingState == "42")//中标通知书已评审
                {
                    this.btnNewSupply.Visible = false;
                    this.btnEmit.Visible      = false;
                    this.btnReturn.Visible    = false;
                    this.btnAuditing.Visible  = false;
                    this.btnModify.Visible    = false;
                    //this.btnAddMoney.Visible = false;
                    this.btnCheckBiddingDiscuss.Visible    = false;
                    this.btnOldCheckBiddingDiscuss.Visible = false;
                    this.btnCheckDiscuss.Visible           = false;

                    BLL.Bidding bd = new BLL.Bidding();
                    bd.BiddingCode = Bidding1.ApplicationCode;
                    if (bd.GetBiddingReturnNoMessage().Rows.Count > 0)
                    {
                        this.btnMessage.Visible = true;
                    }
                    else
                    {
                        this.btnMessage.Visible = false;
                    }

                    BLL.BiddingMessage bms = new BLL.BiddingMessage();
                    bms.BiddingCode = Bidding1.ApplicationCode;
                    DataTable dtbms = bms.GetBiddingMessages();
                    bool      ContractCreateFlag = false;
                    foreach (DataRow dr in dtbms.Select())
                    {
                        if (BLL.ContractRule.GetContractCountByContractDefaultValueCode(dr["BiddingMessageCode"].ToString()) == 0)
                        {
                            ContractCreateFlag = true;
                        }
                    }


                    this.btnContract.Visible      = ContractCreateFlag;
                    this.Bt_LowOfPrice.Visible    = false;
                    this.Bt_ReturnOfPrice.Visible = false;
                    IsShow_Control_BiddingEmitHistory(true);
                }
                if (Bidding1.BiddingState == "43")//评审完毕
                {
                    this.btnNewSupply.Visible     = false;
                    this.btnEmit.Visible          = false;
                    this.btnReturn.Visible        = false;
                    this.btnAuditing.Visible      = false;
                    this.btnModify.Visible        = false;
                    this.btnMessage.Visible       = false;
                    this.btnContract.Visible      = false;
                    this.Bt_LowOfPrice.Visible    = false;
                    this.Bt_ReturnOfPrice.Visible = false;
                    IsShow_Control_BiddingEmitHistory(true);
                    //this.btnAddMoney.Visible = false;
                    this.btnCheckDiscuss.Visible           = false;
                    this.btnCheckBiddingDiscuss.Visible    = false;
                    this.btnOldCheckBiddingDiscuss.Visible = false;
                }

                if (Bidding1.BiddingState == "7")//招标执行
                {
                    this.btnNewSupply.Visible = false;
                    this.btnEmit.Visible      = false;
                    this.btnReturn.Visible    = false;
                    this.btnAuditing.Visible  = false;
                    this.btnModify.Visible    = false;

                    //this.btnAddMoney.Visible = false;
                    this.btnCheckDiscuss.Visible           = false;
                    this.btnCheckBiddingDiscuss.Visible    = false;
                    this.btnOldCheckBiddingDiscuss.Visible = false;

                    this.btnMessage.Visible = false;

                    BLL.BiddingMessage bms = new BLL.BiddingMessage();
                    bms.BiddingCode = Bidding1.ApplicationCode;
                    bms.State       = "0";
                    DataTable dtbms = bms.GetBiddingMessages();
                    bool      ContractCreateFlag = false;
                    foreach (DataRow dr in dtbms.Select())
                    {
                        if (BLL.ContractRule.GetContractCountByContractDefaultValueCode(dr["BiddingMessageCode"].ToString()) == 0)
                        {
                            ContractCreateFlag = true;
                        }
                    }

                    RmsPM.BLL.BiddingPrejudication cbiddingPrejudicationtemp = new RmsPM.BLL.BiddingPrejudication();
                    cbiddingPrejudicationtemp.BiddingPrejudicationCode = cbiddingPrejudicationtemp.GetPrimaryKeyByBiddingCode(this.ApplicationCode);
                    if (cbiddingPrejudicationtemp.State != "0")
                    {
                        this.btnBiddingStart.Visible = true;
                    }
                    this.btnContract.Visible      = ContractCreateFlag;
                    this.Bt_LowOfPrice.Visible    = false;
                    this.Bt_ReturnOfPrice.Visible = false;
                    IsShow_Control_BiddingEmitHistory(true);
                }

                RmsPM.BLL.Bidding cbidding = new RmsPM.BLL.Bidding();
                cbidding.BiddingCode = this.ApplicationCode;
                //议标
                if (cbidding.BiddingType == "0" && cbidding.Status == "0")
                {
                    this.btnSave.Visible      = false;
                    this.btnAddDtl.Visible    = false;
                    this.btnModify.Visible    = false;
                    this.btnDel.Visible       = false;
                    this.btnNewSupply.Visible = false;
                    this.btnEmit.Visible      = false;
                    this.btnReturn.Visible    = false;
                    this.btnAuditing.Visible  = false;
                    this.btnMessage.Visible   = false;

                    this.Bt_LowOfPrice.Visible    = false;
                    this.Bt_ReturnOfPrice.Visible = false;

                    //this.btnAddMoney.Visible = false;
                    this.btnCheckBiddingDiscuss.Visible    = false;
                    this.btnOldCheckBiddingDiscuss.Visible = false;
                }
                else if (cbidding.BiddingType == "1" && cbidding.Status == "0")//招标
                {
                    this.btnCheckBiddingDiscuss.Visible    = false;
                    this.btnOldCheckBiddingDiscuss.Visible = false;
                    this.btnCheckDiscuss.Visible           = false;
                }
                else
                {
                    this.btnCheckDiscuss.Visible = false;
                    //检查是否存在招标议标数据
                    RmsPM.BLL.BiddingAuditing cbiddingAuditing = new RmsPM.BLL.BiddingAuditing();
                    cbiddingAuditing.BiddingCode = this.ApplicationCode;
                    DataTable dtBiddingAuditing = cbiddingAuditing.GetBiddingAuditings();
                    if (dtBiddingAuditing != null)
                    {
                        if (dtBiddingAuditing.Rows.Count != 0)
                        {
                            this.btnCheckBiddingDiscuss.Visible = false;
                        }
                    }
                }
            }

            RmsPM.BLL.BiddingPrejudication cbiddingPrejudication = new RmsPM.BLL.BiddingPrejudication();
            //议标评审
            this.btnCheckDiscuss.Attributes["OnClick"] = "javascript:OpenDiscuss('" + this.ApplicationCode + "','" + cbiddingPrejudication.GetPrimaryKeyByBiddingCode(this.ApplicationCode) + "','" + this.ProjectCode + "');return false;";
            //招标议标评审
            this.btnCheckBiddingDiscuss.Attributes["OnClick"] = "javascript:OpenBiddingDiscuss('" + this.ApplicationCode + "','" + this.ProjectCode + "');return false;";
            //招标议标单步审核
            this.btnOldCheckBiddingDiscuss.Attributes["OnClick"] = "javascript:OpenBiddingType('" + this.ApplicationCode + "');return false;";
            ////增资评审
            //this.btnAddMoney.Attributes["OnClick"] = "javascript:OpenBiddingDtlAddMoney('" + this.ApplicationCode + "','" + this.ProjectCode + "');return false;";
            this.btnNewSupply.Attributes["OnClick"] = "javascript:OpenNewSupply('" + this.ApplicationCode + "','" + this.ProjectCode + "');return false;";

            this.btnBiddingStart.Attributes["OnClick"]  = "javascript:OpenBiddingStart('" + cbiddingPrejudication.GetPrimaryKeyByBiddingCode(this.ApplicationCode) + "','" + this.ProjectCode + "');return false;";
            this.btnEmit.Attributes["OnClick"]          = "javascript:OpenNewEmit('" + this.ApplicationCode + "','" + this.ProjectCode + "');return false;";
            this.Bt_LowOfPrice.Attributes["OnClick"]    = "javascript:OpenLowOfPrice('" + this.ApplicationCode + "','" + this.ProjectCode + "');return false;";
            this.Bt_ReturnOfPrice.Attributes["OnClick"] = "javascript:ReturnLowOfPrice('" + bm.GetLastBiddingEmitCode() + "" + "','" + this.ProjectCode + "');return false;";
            this.btnReturn.Attributes["OnClick"]        = "javascript:BiddingEmitListReturnModify('" + bm.GetLastBiddingEmitCode() + "" + "','" + this.ProjectCode + "');return false;";
            this.btnAuditing.Attributes["OnClick"]      = "javascript:OpenAuditing('" + this.ApplicationCode + "','" + this.ProjectCode + "');return false;";
            this.btnMessage.Attributes["OnClick"]       = "javascript:BiddingMessage('" + this.ApplicationCode + "','" + this.ProjectCode + "');return false;";
            this.btnContract.Attributes["OnClick"]      = "javascript:BiddingContract('" + this.ApplicationCode + "','" + this.ProjectCode + "');return false;";

            BiddingProcess1.InitControl(Bidding1.ApplicationCode);

            if (!this.user.HasRight("210802"))//招标文件新增
            {
                this.BiddingCondition.Visible              = false;
                this.BiddingContidionFile.Visible          = false;
                this.BiddingDtl.Attributes["onclick"]      = "EventClickTab(0);";
                this.trPrejudication.Attributes["onclick"] = "EventClickTab(1);";
                this.trZBGC.Attributes["onclick"]          = "EventClickTab(2);";

                this.trHBGC.Attributes["onclick"]           = "EventClickTab(3);";
                this.tdBiddingMessage.Attributes["onclick"] = "EventClickTab(4);";
                this.workflowmsg.Attributes["onclick"]      = "EventClickTab(5);";

                this.BiddingConditionFileInfo1.Visible = false;
            }
            else
            {
                this.BiddingConditionFileInfo1.BiddingCode = Bidding1.ApplicationCode;
                this.BiddingConditionFileInfo1.ProjectCode = this.ProjectCode;
                this.BiddingConditionFileInfo1.InitControl();
            }

            if (company == "tangchenpm")//招标文件新增
            {
                //取消招标技术条件选项卡
                this.BiddingCondition.Visible     = false;
                this.BiddingContidionFile.Visible = false;
                //取消投标预审单位选项卡
                this.trPrejudication.Visible = false;
                this.Tr1.Visible             = false;
                //招标过程
                this.trZBGC.Visible            = false;
                this.BiddingProcessDiv.Visible = false;
                //中标通知书
                this.tdBiddingMessage.Visible    = false;
                this.BiddingMessageList1.Visible = false;

                //回标过程
                this.trHBGC.Visible         = false;
                this.BiddingEmitDiv.Visible = false;

                //this.BiddingCondition.Visible = false;
                //this.BiddingContidionFile.Visible = false;
                this.BiddingDtl.Attributes["onclick"] = "EventClickTab(0);";
                //this.trPrejudication.Attributes["onclick"] = "EventClickTab(1);";
                //this.trZBGC.Attributes["onclick"] = "EventClickTab(2);";

                //this.trHBGC.Attributes["onclick"] = "EventClickTab(3);";
                this.workflowmsg.Attributes["onclick"] = "EventClickTab(1);";

                //this.BiddingConditionFileInfo1.Visible = false;
            }


            //this.BiddingPrejudicationSupplierList1.BiddingCode = Bidding1.ApplicationCode;
            //this.BiddingPrejudicationSupplierList1.InitControl();

            if (!this.user.HasRight("2110"))
            {
                this.Bt_LowOfPrice.Visible    = false;
                this.Bt_ReturnOfPrice.Visible = false;
            }

            if (!this.user.HasRight("211301"))
            {
                this.btnOldCheckBiddingDiscuss.Visible = false;
            }
            if (!this.user.HasRight("211302"))
            {
                this.btnCheckBiddingDiscuss.Visible = false;
            }
            if (!this.user.HasRight("211303"))
            {
                this.btnCheckDiscuss.Visible = false;
            }


            this.WorkFlowList1.ProcedureNameAndApplicationCodeList = GetWorkFlowListString();
            this.WorkFlowList1.DataBound();

            //是否存在预审单位
            if (this.WorkFlowList1.WorkFlowCount != 0)
            {
                this.btnDel.Visible = false;
            }

            //添加中标通知书列表
            this.LoadBiddingMessageList(this.ApplicationCode);
        }
Esempio n. 13
0
        /// ****************************************************************************
        /// <summary>
        /// 数据加载
        /// </summary>
        /// ****************************************************************************
        private void LoadData(bool Flag)
        {
            this.ViewState["BiddingReturnCodeStr"] = "";
            if (this.ApplicationCode != "")
            {
                BLL.BiddingMessage cBiddingMessage = new BLL.BiddingMessage();
                cBiddingMessage.BiddingMessageCode = this.ApplicationCode;
                this.BiddingCode  = cBiddingMessage.BiddingCode;
                this.ProjectCode  = cBiddingMessage.ProjectCode;
                this.SupplierCode = cBiddingMessage.Supplier;
                this.ProjectCode  = cBiddingMessage.ProjectCode;

                BLL.Bidding bidding = new BLL.Bidding();
                bidding.BiddingCode           = cBiddingMessage.BiddingCode;
                this.ViewState["Money"]       = bidding.Money;
                this.ViewState["mostly"]      = bidding.Accessory;
                this.ViewState["BiddingType"] = bidding.Type;

                if (Flag)
                {
                    this.txtProjectCode.InnerHtml  = "&nbsp;&nbsp;&nbsp;&nbsp;" + BLL.ProjectRule.GetProjectName(cBiddingMessage.ProjectCode);
                    this.txtContractNember.Value   = cBiddingMessage.ContractNember;
                    this.txtContractName.Value     = cBiddingMessage.ContractName;
                    this.txtContractType.InnerHtml = "&nbsp;&nbsp;&nbsp;&nbsp;" + BLL.ContractRule.GetContractTypeName(cBiddingMessage.ContractType);
                    //this.txtSupplier.InnerHtml = "&nbsp;&nbsp;&nbsp;&nbsp;"+BLL.ProjectRule.GetSupplierName(cBiddingMessage.Supplier);
                    this.txtContractDate.Value = cBiddingMessage.ContractDate;
                    this.txtRemark.Value       = cBiddingMessage.Remark;


                    DataTable dt = bidding.GetBiddingReturnNoMessage();
                    foreach (DataRow dr in dt.Select())
                    {
                        ListItem li = new ListItem(BLL.ProjectRule.GetSupplierName(dr["SupplierCode"].ToString()), dr["SupplierCode"].ToString());
                        if (!DropSupplier.Items.Contains(li))
                        {
                            this.DropSupplier.Items.Add(li);
                        }
                    }
                    ListItem lis = new ListItem(BLL.ProjectRule.GetSupplierName(cBiddingMessage.Supplier), cBiddingMessage.Supplier);
                    this.DropSupplier.Items.Add(lis);
                    this.DropSupplier.SelectedIndex = this.DropSupplier.Items.IndexOf(this.DropSupplier.Items.FindByValue(cBiddingMessage.Supplier));
                    BoundBiddingDtl(cBiddingMessage.BiddingReturnCode);
                    this.ViewState["BiddingReturnCodeStr"] = cBiddingMessage.BiddingReturnCode;
                }
                else
                {
                    this.tdProjectCode.InnerHtml    = "&nbsp;&nbsp;&nbsp;&nbsp;" + BLL.ProjectRule.GetProjectName(cBiddingMessage.ProjectCode);
                    this.tdContractNember.InnerHtml = "&nbsp;&nbsp;&nbsp;&nbsp;" + cBiddingMessage.ContractNember;
                    this.tdContractName.InnerHtml   = "&nbsp;&nbsp;&nbsp;&nbsp;" + cBiddingMessage.ContractName;
                    this.tdContractType.InnerHtml   = "&nbsp;&nbsp;&nbsp;&nbsp;" + BLL.ContractRule.GetContractTypeName(cBiddingMessage.ContractType);
                    this.tdSupplier.InnerHtml       = "&nbsp;&nbsp;&nbsp;&nbsp;" + BLL.ProjectRule.GetSupplierName(cBiddingMessage.Supplier);
                    this.tdBiddingDtl.InnerHtml     = this.GetBiddingDtlListStr(cBiddingMessage.BiddingReturnCode, cBiddingMessage.Supplier);
                    this.tdContractDate.InnerHtml   = "&nbsp;&nbsp;&nbsp;&nbsp;" + cBiddingMessage.ContractDate;
                    this.tdRemark.InnerHtml         = "&nbsp;&nbsp;&nbsp;&nbsp;" + cBiddingMessage.Remark.Replace("\n", "<br>");
                }
            }
            else
            {
                BLL.Bidding bidding = new BLL.Bidding();
                bidding.BiddingCode            = this.BiddingCode;
                this.ViewState["Money"]        = bidding.Money;
                this.ViewState["mostly"]       = bidding.Accessory;
                this.ViewState["BiddingType"]  = bidding.Type;
                this.txtProjectCode.InnerHtml  = "&nbsp;&nbsp;&nbsp;&nbsp;" + BLL.ProjectRule.GetProjectName(bidding.ProjectCode);
                this.txtContractType.InnerHtml = "&nbsp;&nbsp;&nbsp;&nbsp;" + BLL.ContractRule.GetContractTypeName(bidding.Type);
                this.ProjectCode = bidding.ProjectCode;
                DataTable dt = bidding.GetBiddingReturnNoMessage();
                foreach (DataRow dr in dt.Select())
                {
                    ListItem li = new ListItem(BLL.ProjectRule.GetSupplierName(dr["SupplierCode"].ToString()), dr["SupplierCode"].ToString());
                    if (!DropSupplier.Items.Contains(li))
                    {
                        this.DropSupplier.Items.Add(li);
                    }
                }
                BoundBiddingDtl("");

                this.txtContractName.Value = bidding.Title;
            }
            //构建编号
            BLL.BiddingMessage biddingMessage = new BLL.BiddingMessage();
            biddingMessage.BiddingCode = this.BiddingCode;
            System.Data.DataTable BiddingMessagedt = biddingMessage.GetBiddingMessages() as System.Data.DataTable;
            string CNnum = "0";

            if (BiddingMessagedt != null)
            {
                CNnum = BiddingMessagedt.Rows.Count.ToString();
            }

            BLL.BiddingPrejudication bp = new BLL.BiddingPrejudication();
            bp.BiddingCode = this.BiddingCode;
            DataTable dtp = bp.GetBiddingPrejudications();

            DataRow[] drw = dtp.Select("", "CreateDate desc");
            if (drw.Length > 0)
            {
                this.ContractNember = drw[0]["Number"].ToString() + "-" + CNnum;
            }
        }
        private void LoadData()
        {
            try
            {
                if ((this.txtCostBudgetSetCode.Value == "") || (this.txtCostCode.Value == "") || (this.txtContractCode.Value == "") || (this.txtRelationType.Value == ""))
                {
                    Response.Write(Rms.Web.JavaScript.Alert(true, "未传入预算设置表编号、费用项编号、合同编号或相关记录类型"));
                    Response.Write(Rms.Web.JavaScript.WinClose(true));
                    return;
                }

                //取预算设置表
                EntityData entity = DAL.EntityDAO.CostBudgetDAO.GetCostBudgetSetByCode(this.txtCostBudgetSetCode.Value);
                if (entity.HasRecord())
                {
                    this.txtProjectCode.Value = entity.GetString("ProjectCode");
                }
                else
                {
                    Response.Write(Rms.Web.JavaScript.Alert(true, string.Format("预算设置表{0}不存在", this.txtCostBudgetSetCode.Value)));
                    Response.Write(Rms.Web.JavaScript.WinClose(true));
                    return;
                }
                entity.Dispose();

                //取费用项信息
                EntityData entityCBS = DAL.EntityDAO.CBSDAO.GetCBSByCode(this.txtCostCode.Value);
                if (entityCBS.HasRecord())
                {
                    this.lblSortID.Text   = entityCBS.GetString("SortID");
                    this.lblCostName.Text = entityCBS.GetString("CostName");
                }
                else
                {
                    Response.Write(Rms.Web.JavaScript.Alert(true, string.Format("费用项{0}不存在", this.txtCostCode.Value)));
                    Response.Write(Rms.Web.JavaScript.WinClose(true));
                    return;
                }
                entityCBS.Dispose();

                if (this.txtRelationType.Value.ToLower() == "Contract".ToLower())
                {
                    //取合同信息
                    EntityData entityContract = DAL.EntityDAO.ContractDAO.GetContractByCode(this.txtContractCode.Value);
                    if (entityContract.HasRecord())
                    {
                        this.lblContractName.Text = entityContract.GetString("ContractName");
                    }
                    else
                    {
                        Response.Write(Rms.Web.JavaScript.Alert(true, string.Format("合同{0}不存在", this.txtContractCode.Value)));
                        Response.Write(Rms.Web.JavaScript.WinClose(true));
                        return;
                    }
                    entityContract.Dispose();
                }
                else if (this.txtRelationType.Value.ToLower() == "Bidding".ToLower())
                {
                    //取招标计划
                    BLL.Bidding bidding = new BLL.Bidding();
                    bidding.BiddingCode       = this.txtContractCode.Value;
                    this.lblContractName.Text = bidding.Title;
                }
                else
                {
                    Response.Write(Rms.Web.JavaScript.Alert(true, string.Format("未知的相关记录类型“{0}”", this.txtRelationType.Value)));
                    Response.Write(Rms.Web.JavaScript.WinClose(true));
                }

                //合同预算
                decimal BudgetMoney = 0;

                //取合同预算
                entity = DAL.EntityDAO.CostBudgetDAO.GetCostBudgetContractByContractCode(this.txtCostBudgetSetCode.Value, this.txtCostCode.Value, this.txtContractCode.Value, this.txtRelationType.Value);
                if (entity.HasRecord())
                {
                    BudgetMoney = entity.GetDecimal("BudgetMoney");
                    this.txtDescription.Value = entity.GetString("Description");
                }
                entity.Dispose();

                this.txtMoney.Value = BLL.CostBudgetPageRule.GetMoneyShowString(BudgetMoney);
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "");
                Response.Write(Rms.Web.JavaScript.Alert(true, "初始化页面出错:" + ex.Message));
            }
        }
Esempio n. 15
0
        /// ****************************************************************************
        /// <summary>
        /// 提交数据
        /// </summary>
        /// <param name="flag">是否修改(true为修改,false为新增)</param>
        /// ****************************************************************************
        private void _SubmitData(bool flag)
        {
            BLL.BiddingDtl bd = new BLL.BiddingDtl();
            bd.BiddingCode = this.ApplicationCode;
            bd.flag        = "1";
            EntityData entity = bd.GetBiddingDtlEntity();

            foreach (DataRow dr in entity.CurrentTable.Rows)
            {
                dr["Flag"] = "0";
            }
            bd.SubmitDtlEntity(entity);

            decimal TeamMoneyTemp = 0;

            foreach (DataGridItem dgItem in dgListEdit.Items)
            {
                BLL.BiddingDtl cBiddingDtl = new BLL.BiddingDtl();
                cBiddingDtl.BiddingDtlCode = dgItem.Cells[0].Text;
                cBiddingDtl.Title          = ((TextBox)dgItem.FindControl("txtTitle")).Text;
                cBiddingDtl.remark         = ((TextBox)dgItem.FindControl("txtRemark")).Text;
                cBiddingDtl.Money          = ((WebNumericEdit)dgItem.FindControl("TxtTemMoney")).Value.ToString();
                //增加特殊需求

                string companyName = System.Configuration.ConfigurationManager.AppSettings["PMName"].ToString().ToLower();
                switch (companyName)
                {
                case "gaokepm":
                    cBiddingDtl.OtherMoney = ((WebNumericEdit)dgItem.FindControl("TxtOtherMoney")).Value.ToString();

                    break;

                default:
                    cBiddingDtl.OtherMoney = "0";
                    break;
                }

                RmsPM.Web.UserControls.InputCostBudgetDtl cb = ((RmsPM.Web.UserControls.InputCostBudgetDtl)dgItem.FindControl("Inputcostbudgetdtl1"));
                cBiddingDtl.CostCode          = cb.CostCode;
                cBiddingDtl.CostBudgetSetCode = cb.CostBudgetSetCode;
                cBiddingDtl.PBSCode           = cb.PBSCode;
                cBiddingDtl.PBSType           = cb.PBSType;
                cBiddingDtl.flag = "1";
                if (flag)
                {
                    cBiddingDtl.BiddingCode = this.ApplicationCode;
                    cBiddingDtl.BiddingDtlSubmit();
                }
                else
                {
                    cBiddingDtl.BiddingCode = this.ApplicationCode;
                    cBiddingDtl.BiddingDtlAdd();
                }
                TeamMoneyTemp += decimal.Parse(((WebNumericEdit)dgItem.FindControl("TxtTemMoney")).Value.ToString());
            }
            BLL.Bidding b = new BLL.Bidding();
            b.BiddingCode = this.ApplicationCode;
            b.Money       = TeamMoneyTemp.ToString();
            b.BiddingSubmit();
            this.TeamMoney = TeamMoneyTemp.ToString();
        }