Пример #1
0
    public void InitControl()
    {
        DataTable dt = new DataTable();



        RmsPM.BLL.BiddingPrejudication cBiddingPrejudication = new RmsPM.BLL.BiddingPrejudication();
        cBiddingPrejudication.BiddingCode = this.BiddingCode;
        DataTable dtPrejudication = cBiddingPrejudication.GetBiddingPrejudications();

        for (int i = 0; i < dtPrejudication.Rows.Count; i++)
        {
            RmsPM.BLL.BiddingSupplier cBiddingSupplier = new RmsPM.BLL.BiddingSupplier();
            cBiddingSupplier.BiddingPrejudicationCode = dtPrejudication.Rows[i][0].ToString();

            DataTable dtSupplier = cBiddingSupplier.GetBiddingSuppliers();
            if (i == 0)
            {
                dt = dtSupplier.Clone();
                dt.Columns.Add("Remark", System.Type.GetType("System.String"));
            }
            for (int j = 0; j < dtSupplier.Rows.Count; j++)
            {
                DataRow dr = dt.NewRow();
                dr.ItemArray = dtSupplier.Rows[j].ItemArray;
                dr["Remark"] = dtPrejudication.Rows[i]["Remark"].ToString();
                dt.Rows.Add(dr);
            }
            dtSupplier.Dispose();
        }

        this.dgList.DataSource = dt;
        this.dgList.DataBind();
    }
Пример #2
0
        public static bool IsOnlyNumber(StandardEntityDAO dao, string number)
        {
            BiddingPrejudication prejudication = new BiddingPrejudication();

            prejudication.dao    = dao;
            prejudication.Number = number;
            DataTable biddingPrejudications = prejudication.GetBiddingPrejudications();

            return((biddingPrejudications != null) && (biddingPrejudications.Rows.Count == 0));
        }
Пример #3
0
        public static string GetContractNemberByBiddingCode(string code)
        {
            BiddingPrejudication prejudication = new BiddingPrejudication();

            prejudication.BiddingCode = code;
            DataTable biddingPrejudications = prejudication.GetBiddingPrejudications();

            if (biddingPrejudications != null)
            {
                DataRow[] rowArray = biddingPrejudications.Select();
                int       index    = 0;
                while (index < rowArray.Length)
                {
                    DataRow row = rowArray[index];
                    return(row["Number"].ToString());
                }
            }
            return("");
        }
Пример #4
0
        public DataTable GetBiddingPrejudications()
        {
            DataTable biddingPrejudications;

            try
            {
                if (base.BiddingCode == null)
                {
                    throw new Exception("招投标计划代码未实例化!");
                }
                BiddingPrejudication prejudication = new BiddingPrejudication();
                prejudication.BiddingCode = base.BiddingCode;
                biddingPrejudications     = prejudication.GetBiddingPrejudications();
            }
            catch (Exception exception)
            {
                throw exception;
            }
            return(biddingPrejudications);
        }
Пример #5
0
        public static DataSet GetBiddingForm(string BiddingCode)
        {
            DataSet set2;

            try
            {
                DataSet set = new DataSet();
                BiddingPrejudication prejudication = new BiddingPrejudication();
                prejudication.BiddingCode = BiddingCode;
                set.Tables.Add(prejudication.GetBiddingPrejudications().Copy());
                BiddingEmit emit = new BiddingEmit();
                emit.BiddingCode = BiddingCode;
                set.Tables.Add(emit.GetBiddingEmits().Copy());
                BiddingMessage message = new BiddingMessage();
                message.BiddingCode = BiddingCode;
                set.Tables.Add(message.GetBiddingMessages().Copy());
                set2 = set;
            }
            catch (Exception exception)
            {
                throw exception;
            }
            return(set2);
        }
Пример #6
0
    /// ****************************************************************************
    /// <summary>
    /// 数据加载
    /// </summary>
    /// ****************************************************************************
    private void LoadData(bool Flag)
    {
        this.ViewState["BiddingReturnCodeStr"] = "";
        if (this.ApplicationCode != "")
        {
            RmsPM.BLL.BiddingMessage cBiddingMessage = new RmsPM.BLL.BiddingMessage();
            cBiddingMessage.BiddingMessageCode = this.ApplicationCode;
            this.BiddingCode  = cBiddingMessage.BiddingCode;
            this.ProjectCode  = cBiddingMessage.ProjectCode;
            this.SupplierCode = cBiddingMessage.Supplier;
            this.ProjectCode  = cBiddingMessage.ProjectCode;

            RmsPM.BLL.Bidding bidding = new RmsPM.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;" + RmsPM.BLL.ProjectRule.GetProjectName(cBiddingMessage.ProjectCode);
                this.txtContractNember.Value   = cBiddingMessage.ContractNember;
                this.txtContractName.Value     = cBiddingMessage.ContractName;
                this.txtContractType.InnerHtml = "&nbsp;&nbsp;&nbsp;&nbsp;" + RmsPM.BLL.ContractRule.GetContractTypeName(cBiddingMessage.ContractType);

                this.txtContractDate.Value = cBiddingMessage.ContractDate;
                //this.TxtRemark.Value = cBiddingMessage.Remark;
                //this.SelectName.Value = cBiddingMessage.AttachUser;


                DataTable dt = bidding.GetBiddingReturnNoMessage();
                foreach (DataRow dr in dt.Select())
                {
                    ListItem li = new ListItem(RmsPM.BLL.ProjectRule.GetSupplierName(dr["SupplierCode"].ToString()), dr["SupplierCode"].ToString());
                    if (!DropSupplier.Items.Contains(li))
                    {
                        this.DropSupplier.Items.Add(li);
                    }
                }
                ListItem lis = new ListItem(RmsPM.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;" + RmsPM.BLL.ProjectRule.GetProjectName(cBiddingMessage.ProjectCode);
                this.tdContractNember.InnerHtml = "&nbsp;&nbsp;" + cBiddingMessage.ContractNember;
                this.tdContractName.InnerHtml   = "&nbsp;&nbsp;" + cBiddingMessage.ContractName;
                this.tdContractType.InnerHtml   = "&nbsp;&nbsp;" + RmsPM.BLL.ContractRule.GetContractTypeName(cBiddingMessage.ContractType);
                this.tdSupplier.InnerHtml       = "&nbsp;&nbsp;" + RmsPM.BLL.ProjectRule.GetSupplierName(cBiddingMessage.Supplier);
                this.tdBiddingDtl.InnerHtml     = this.GetBiddingDtlListStr(cBiddingMessage.BiddingReturnCode, cBiddingMessage.Supplier);
                this.tdContractDate.InnerHtml   = "&nbsp;&nbsp;" + cBiddingMessage.ContractDate;
                //this.tdUserNames.InnerHtml = "&nbsp;&nbsp;" + cBiddingMessage.AttachUser;
                //this.tdRemark.InnerHtml = "&nbsp;&nbsp;" + cBiddingMessage.Remark.Replace("\n", "<br>");
            }
        }
        else
        {
            RmsPM.BLL.Bidding bidding = new RmsPM.BLL.Bidding();
            bidding.BiddingCode           = this.BiddingCode;
            this.ViewState["Money"]       = bidding.Money;
            this.ViewState["mostly"]      = bidding.Accessory;
            this.ViewState["BiddingType"] = bidding.Type;
            //this.tdbiddingContent.InnerHtml = bidding.Content.Replace("\n", "<br>")+"&nbsp;";
            this.txtProjectCode.InnerHtml  = "&nbsp;&nbsp;&nbsp;&nbsp;" + RmsPM.BLL.ProjectRule.GetProjectName(bidding.ProjectCode);
            this.txtContractType.InnerHtml = "&nbsp;&nbsp;&nbsp;&nbsp;" + RmsPM.BLL.ContractRule.GetContractTypeName(bidding.Type);
            this.ProjectCode = bidding.ProjectCode;
            DataTable dt = bidding.GetBiddingReturnNoMessage();
            foreach (DataRow dr in dt.Select())
            {
                ListItem li = new ListItem(RmsPM.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;
        }
        //构建编号
        RmsPM.BLL.BiddingMessage biddingMessage = new RmsPM.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();
        }

        RmsPM.BLL.BiddingPrejudication bp = new RmsPM.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;
        }

        /****************最后报价*****************/
        RmsPM.BLL.BiddingManage bm             = new RmsPM.BLL.BiddingManage();
        RmsPM.BLL.BiddingReturn cBiddingReturn = new RmsPM.BLL.BiddingReturn();
        bm.BiddingCode = this.BiddingCode;
        string BiddingEmitCode = bm.GetLastBiddingEmitCode();

        cBiddingReturn.BiddingEmitCode = BiddingEmitCode;
        DataTable dtReturn  = cBiddingReturn.GetBiddingReturns();
        decimal   tempMoney = 0;

        foreach (DataRow drReturnSupplier in RmsPM.BLL.ConvertRule.GetDistinct(dtReturn, "BiddingDtlCode", "").Select())
        {
            decimal Money = 0;
            foreach (DataRow drReturnAll in dtReturn.Select())
            {
                if (drReturnSupplier["BiddingDtlCode"].ToString() == drReturnAll["BiddingDtlCode"].ToString())
                {
                    if (System.Convert.ToDecimal(drReturnAll["Money"]) > Money)
                    {
                        Money = System.Convert.ToDecimal(drReturnAll["Money"]);
                    }
                }
            }
            tempMoney += Money;
        }
        this.ViewState["MaxMoney"] = tempMoney;
        /***************************************/
    }
Пример #7
0
    /// ****************************************************************************
    /// <summary>
    /// 数据加载
    /// </summary>
    /// ****************************************************************************
    private void LoadData(bool Flag)
    {
        this.ViewState["BiddingReturnCodeStr"] = "";
        if (this.ApplicationCode != "")
        {
            RmsPM.BLL.BiddingMessage cBiddingMessage = new RmsPM.BLL.BiddingMessage();
            cBiddingMessage.BiddingMessageCode = this.ApplicationCode;
            this.BiddingCode  = cBiddingMessage.BiddingCode;
            this.ProjectCode  = cBiddingMessage.ProjectCode;
            this.SupplierCode = cBiddingMessage.Supplier;
            this.ProjectCode  = cBiddingMessage.ProjectCode;

            RmsPM.BLL.Bidding bidding = new RmsPM.BLL.Bidding();
            bidding.BiddingCode             = cBiddingMessage.BiddingCode;
            this.ViewState["Money"]         = bidding.Money;
            this.ViewState["mostly"]        = bidding.Accessory;
            this.ViewState["BiddingType"]   = bidding.Type;
            this.tdbiddingContent.InnerHtml = bidding.Content.Replace("\n", "<br>");



            if (Flag)
            {
                this.txtProjectCode.InnerHtml  = "&nbsp;&nbsp;&nbsp;&nbsp;" + RmsPM.BLL.ProjectRule.GetProjectName(cBiddingMessage.ProjectCode);
                this.txtContractNember.Value   = cBiddingMessage.ContractNember;
                this.txtContractName.Value     = cBiddingMessage.ContractName;
                this.txtContractType.InnerHtml = "&nbsp;&nbsp;&nbsp;&nbsp;" + RmsPM.BLL.ContractRule.GetContractTypeName(cBiddingMessage.ContractType);
                //this.txtSupplier.InnerHtml = "&nbsp;&nbsp;&nbsp;&nbsp;"+RmsPM.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(RmsPM.BLL.ProjectRule.GetSupplierName(dr["SupplierCode"].ToString()), dr["SupplierCode"].ToString());
                    if (!DropSupplier.Items.Contains(li))
                    {
                        this.DropSupplier.Items.Add(li);
                    }
                }
                ListItem lis = new ListItem(RmsPM.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;" + RmsPM.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;" + RmsPM.BLL.ContractRule.GetContractTypeName(cBiddingMessage.ContractType);
                this.tdSupplier.InnerHtml       = "&nbsp;&nbsp;&nbsp;&nbsp;" + RmsPM.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
        {
            RmsPM.BLL.Bidding bidding = new RmsPM.BLL.Bidding();
            bidding.BiddingCode             = this.BiddingCode;
            this.ViewState["Money"]         = bidding.Money;
            this.ViewState["mostly"]        = bidding.Accessory;
            this.ViewState["BiddingType"]   = bidding.Type;
            this.tdbiddingContent.InnerHtml = bidding.Content.Replace("\n", "<br>");
            this.txtProjectCode.InnerHtml   = "&nbsp;&nbsp;&nbsp;&nbsp;" + RmsPM.BLL.ProjectRule.GetProjectName(bidding.ProjectCode);
            this.txtContractType.InnerHtml  = "&nbsp;&nbsp;&nbsp;&nbsp;" + RmsPM.BLL.ContractRule.GetContractTypeName(bidding.Type);
            this.ProjectCode = bidding.ProjectCode;
            DataTable dt = bidding.GetBiddingReturnNoMessage();
            foreach (DataRow dr in dt.Select())
            {
                ListItem li = new ListItem(RmsPM.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;
        }
        //构建编号
        RmsPM.BLL.BiddingMessage biddingMessage = new RmsPM.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();
        }

        RmsPM.BLL.BiddingPrejudication bp = new RmsPM.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;
        }
    }
    /// ****************************************************************************
    /// /// <summary>
    /// 初始化
    /// </summary>
    /// ****************************************************************************
    protected void InitPage()
    {
        this.ViewState["BiddingReturnCodeStr"] = "";
        string BiddingMessageCode = Request["BiddingMessageCode"] + "";
        this.BiddingCode = Request["BiddingCode"] + "";

        this.ApplicationCode = BiddingMessageCode;

        if (BiddingMessageCode != "")
        {
            RmsPM.BLL.BiddingMessage cBiddingMessage = new RmsPM.BLL.BiddingMessage();
            cBiddingMessage.BiddingMessageCode = BiddingMessageCode;

            RmsPM.BLL.Bidding bidding = new RmsPM.BLL.Bidding();
            bidding.BiddingCode = cBiddingMessage.BiddingCode;

            this.txtProjectCode.InnerHtml = "&nbsp;&nbsp;&nbsp;&nbsp;" + RmsPM.BLL.ProjectRule.GetProjectName(cBiddingMessage.ProjectCode);
            this.ProjectCode = cBiddingMessage.ProjectCode;
            this.txtContractNember.Value = cBiddingMessage.ContractNember;
            this.txtContractName.Value = cBiddingMessage.ContractName;
            this.txtContractType.InnerHtml = "&nbsp;&nbsp;&nbsp;&nbsp;" + RmsPM.BLL.ContractRule.GetContractTypeName(cBiddingMessage.ContractType);

            this.txtContractDate.Value = cBiddingMessage.ContractDate;
            this.txtRemark.Value = cBiddingMessage.Remark;

            DataTable dt = bidding.GetBiddingReturnNoMessage();
            foreach (DataRow dr in dt.Select())
            {
                ListItem li = new ListItem(RmsPM.BLL.ProjectRule.GetSupplierName(dr["SupplierCode"].ToString()), dr["SupplierCode"].ToString());
                if (!DropSupplier.Items.Contains(li))
                    this.DropSupplier.Items.Add(li);
            }
            ListItem lis = new ListItem(RmsPM.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 if (BiddingCode != "")
        {
            RmsPM.BLL.Bidding bidding = new RmsPM.BLL.Bidding();
            bidding.BiddingCode = BiddingCode;

            this.txtProjectCode.InnerHtml = "&nbsp;&nbsp;&nbsp;&nbsp;" + RmsPM.BLL.ProjectRule.GetProjectName(bidding.ProjectCode);
            this.ProjectCode = bidding.ProjectCode;
            this.txtContractType.InnerHtml = "&nbsp;&nbsp;&nbsp;&nbsp;" + RmsPM.BLL.ContractRule.GetContractTypeName(bidding.Type);
            this.ProjectCode = bidding.ProjectCode;
            DataTable dt = bidding.GetBiddingReturnNoMessage();
            foreach (DataRow dr in dt.Select())
            {
                ListItem li = new ListItem(RmsPM.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;

            //构建编号
            RmsPM.BLL.BiddingMessage biddingMessage = new RmsPM.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();

            RmsPM.BLL.BiddingPrejudication bp = new RmsPM.BLL.BiddingPrejudication();
            bp.BiddingCode = this.BiddingCode;
            DataTable dtp = bp.GetBiddingPrejudications();
            DataRow[] drw = dtp.Select("", "CreateDate desc");
            if (drw.Length > 0)
                this.txtContractNember.Value = drw[0]["Number"].ToString() + "-" + CNnum;
        }
        else
        {
            Response.Write(JavaScript.ScriptStart);
            Response.Write("window.alert('招标计划不存在!');");

            Response.Write("window.opener=null;window.close();");
            Response.Write(JavaScript.ScriptEnd);

            return;
        }
    }