Exemplo n.º 1
0
    /// ****************************************************************************
    /// /// <summary>
    /// 初始化

    /// </summary>
    /// ****************************************************************************
    protected void InitPage()
    {
        if (!this.user.HasRight("210502"))
        {
            Response.Redirect("../RejectAccess.aspx");
            Response.End();
        }

        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.BiddingCode    = cBiddingMessage.BiddingCode;

            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>");

            string StateName = cBiddingMessage.State == "0"?"已审":"未审";
            this.tdState.InnerHtml = "&nbsp;&nbsp;&nbsp;&nbsp;" + StateName;
            switch (cBiddingMessage.State)
            {
            case "0":
                this.btnMessage.Visible = false;
                break;
            }
        }
        else
        {
            Response.Write(JavaScript.ScriptStart);
            Response.Write("window.alert('中标通知书不存在!');");
            Response.Write("window.opener=null;window.close();");
            Response.Write(JavaScript.ScriptEnd);

            return;
        }

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


        this.btnMessage.Attributes["onclick"] = "javascript:BiddingMessage('" + this.ApplicationCode + "');return false;";
    }
Exemplo n.º 2
0
    public string SubmitBiddingMessage()
    {
        try
        {
            string ErrMsg = "";



            RmsPM.BLL.Bidding bidding = new RmsPM.BLL.Bidding();
            bidding.dao         = this.dao;
            bidding.BiddingCode = this.BiddingCode;
            DataTable dt = bidding.GetBiddingReturnNoMessage();

            int i = 0;

            foreach (DataRow drsupplier in dt.Select())
            {
                string BiddingReturnCode = "";
                string BiddingDtlCode    = "";

                BiddingReturnCode = "'" + drsupplier["BiddingReturnCode"].ToString() + "',";
                BiddingDtlCode    = "'" + drsupplier["BiddingDtlCode"].ToString() + "',";

                RmsPM.BLL.BiddingMessage cBiddingMessage = new RmsPM.BLL.BiddingMessage();
                cBiddingMessage.BiddingMessageCode = "";
                cBiddingMessage.BiddingCode        = bidding.BiddingCode;
                cBiddingMessage.ProjectCode        = bidding.ProjectCode;
                cBiddingMessage.ContractNember     = this.tdContractNemberTop.InnerText + i.ToString();
                cBiddingMessage.ContractName       = bidding.Title;
                cBiddingMessage.ContractType       = bidding.Type;
                cBiddingMessage.Supplier           = drsupplier["SupplierCode"].ToString();
                cBiddingMessage.ContractDate       = DateTime.Now.ToShortDateString();
                cBiddingMessage.Remark             = "";
                cBiddingMessage.CreateDate         = DateTime.Now.ToShortDateString();
                cBiddingMessage.CreateUser         = "";
                cBiddingMessage.AttachUser         = "";
                cBiddingMessage.State             = "0";
                cBiddingMessage.Flag              = "0";
                cBiddingMessage.BiddingReturnCode = BiddingReturnCode;
                cBiddingMessage.BiddingDtlCode    = BiddingDtlCode;
                cBiddingMessage.dao = this.dao;
                cBiddingMessage.BiddingMessageSubmit();
                i++;
            }



            return(ErrMsg);
        }
        catch (Exception ex)
        {
            ApplicationLog.WriteLog(this.ToString(), ex, "");
            Response.Write(Rms.Web.JavaScript.Alert(true, "保存出错:" + ex.Message));
            throw ex;
        }
    }
Exemplo n.º 3
0
    /// <summary>
    /// 业务审核
    /// </summary>
    public override bool Audit(string pm_sOpinionConfirm)
    {
        base.Audit(pm_sOpinionConfirm);

        try
        {
            string ErrMsg = "";

            if (pm_sOpinionConfirm != "")
            {
                switch (pm_sOpinionConfirm)
                {
                case "Approve":
                    RmsPM.BLL.BiddingMessage cBiddingMessage = new RmsPM.BLL.BiddingMessage();
                    cBiddingMessage.BiddingMessageCode = this.ApplicationCode;
                    cBiddingMessage.State = "0";
                    cBiddingMessage.dao   = this.dao;
                    cBiddingMessage.BiddingMessageSubmit();
                    RmsPM.BLL.BiddingSystem.Set_BiddingState("42", this.BiddingCode);
                    break;

                case "Reject":
                    RmsPM.BLL.BiddingMessage cBiddingMessage1 = new RmsPM.BLL.BiddingMessage();
                    cBiddingMessage1.BiddingMessageCode = this.ApplicationCode;
                    cBiddingMessage1.State = "1";
                    cBiddingMessage1.dao   = this.dao;
                    cBiddingMessage1.BiddingMessageSubmit();
                    break;

                case "Unknow":
                    ErrMsg = "请选择评审结果!";
                    break;

                default:
                    ErrMsg = "请选择评审结果!";
                    break;
                }


                if (ErrMsg != "")
                {
                    Response.Write(Rms.Web.JavaScript.Alert(true, ErrMsg));
                    return(false);
                }
            }


            return(true);
        }
        catch (Exception ex)
        {
            Response.Write(Rms.Web.JavaScript.Alert(true, "业务审核出错:" + ex.Message));
            throw ex;
        }
    }
Exemplo n.º 4
0
    private string GetWorkFlowListString()
    {
        string ListString = "";

        RmsPM.BLL.BiddingMessage bm = new RmsPM.BLL.BiddingMessage();
        bm.BiddingMessageCode = this.ApplicationCode;
        DataTable dtm = bm.GetBiddingMessages();

        if (dtm.Rows.Count != 0)
        {
            ListString += "'中标通知书评审" + this.ApplicationCode + "'";
        }

        return(ListString);
    }
Exemplo n.º 5
0
 protected void btnCancelApprove_Click(object sender, EventArgs e)
 {
     foreach (DataGridItem item in dgList.Items)
     {
         CheckBox isSelected         = (CheckBox)item.FindControl("isSelected");
         string   BiddingMessageCode = item.Cells[1].Text;
         if (isSelected != null && isSelected.Checked)
         {
             RmsPM.BLL.BiddingMessage cbiddingMessage = new RmsPM.BLL.BiddingMessage();
             cbiddingMessage.BiddingMessageCode = BiddingMessageCode;
             cbiddingMessage.State = "1";
             cbiddingMessage.BiddingMessageSubmit();
         }
     }
     this.LoadData();
 }
Exemplo n.º 6
0
    /// ****************************************************************************
    /// <summary>
    /// 提交数据
    /// </summary>
    /// ****************************************************************************
    public void SubmitData()
    {
        string BiddingReturnCode = "";
        string BiddingDtlCode    = "";

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

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

        RmsPM.BLL.BiddingMessage cBiddingMessage = new RmsPM.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;
        }
    }
Exemplo n.º 7
0
    /// ****************************************************************************
    /// <summary>
    /// 数据加载
    /// </summary>
    /// ****************************************************************************
    private void LoadData()
    {
        try
        {
            RmsPM.BLL.BiddingMessage cBiddingMessage = new RmsPM.BLL.BiddingMessage();
            cBiddingMessage.BiddingCode = this.BiddingCode;

            DataTable dt = cBiddingMessage.GetBiddingMessages();
            this.dgList.DataSource = dt;
            this.dgList.DataBind();

            //this.gpControl.RowsCount = dt.Rows.Count.ToString();
            dt.Dispose();
        }
        catch (Exception ex)
        {
            RmsPM.Web.LogHelper.WriteLog(ex.Message);
        }
    }
Exemplo n.º 8
0
    ///// ****************************************************************************
    ///// <summary>
    ///// 分页事件
    ///// </summary>
    ///// <param name="sender"></param>
    ///// <param name="e"></param>
    ///// ****************************************************************************
    //private void gpControl_PageIndexChange(object sender, System.EventArgs e)
    //{
    //    LoadData();
    //}



    protected void btnRemove_Click(object sender, EventArgs e)
    {
        foreach (DataGridItem item in dgList.Items)
        {
            CheckBox isSelected         = (CheckBox)item.FindControl("isSelected");
            string   BiddingMessageCode = item.Cells[1].Text;
            if (isSelected != null && isSelected.Checked)
            {
                RmsPM.BLL.BiddingMessage cbiddingMessage = new RmsPM.BLL.BiddingMessage();
                cbiddingMessage.BiddingMessageCode = BiddingMessageCode;

                cbiddingMessage.BiddingMessageDelete();
            }
        }
        this.LoadData();
        Response.Write(JavaScript.ScriptStart);
        Response.Write("window.Opener.location.reload();");
        Response.Write(JavaScript.ScriptEnd);
    }
Exemplo n.º 9
0
        public DataTable GetBiddingReturnNoMessage()
        {
            int           index;
            BiddingReturn return2 = new BiddingReturn();

            return2.dao             = this.dao;
            return2.BiddingEmitCode = "";
            DataTable   biddingReturns = return2.GetBiddingReturns();
            BiddingEmit emit           = new BiddingEmit();

            emit.dao         = this.dao;
            emit.BiddingCode = this.BiddingCode;
            DataTable biddingEmits = emit.GetBiddingEmits();

            for (index = 0; index < biddingEmits.Rows.Count; index++)
            {
                BiddingReturn return3 = new BiddingReturn();
                return3.dao             = this.dao;
                return3.BiddingEmitCode = biddingEmits.Rows[index]["BiddingEmitCode"].ToString();
                return3.Flag            = "1";
                biddingReturns.Merge(return3.GetBiddingReturns(), true);
            }
            BiddingMessage message = new BiddingMessage();

            message.dao         = this.dao;
            message.BiddingCode = this.BiddingCode;
            DataTable biddingMessages = message.GetBiddingMessages();

            foreach (DataRow row in biddingMessages.Select())
            {
                DataRow[] rowArray = biddingReturns.Select("BiddingReturnCode in (" + row["BiddingReturnCode"].ToString() + "'')");
                for (index = 0; index < rowArray.Length; index++)
                {
                    biddingReturns.Rows.Remove(rowArray[index]);
                }
            }
            return(biddingReturns);
        }
Exemplo n.º 10
0
    public override string ChangeStatusWhenSend(StandardEntityDAO dao)
    {
        try
        {
            base.ChangeStatusWhenSend(dao);

            string ErrMsg = "";
            RmsPM.BLL.BiddingMessage cBiddingMessage = new RmsPM.BLL.BiddingMessage();
            cBiddingMessage.BiddingMessageCode = this.ApplicationCode;
            cBiddingMessage.State = "7";
            cBiddingMessage.dao   = this.dao;
            cBiddingMessage.BiddingMessageSubmit();
            //RmsPM.BLL.BiddingSystem.Set_BiddingState("41", this.BiddingCode);


            return(ErrMsg);
        }
        catch (Exception ex)
        {
            Response.Write(Rms.Web.JavaScript.Alert(true, "改变业务数据状态出错:" + ex.Message));
            throw ex;
        }
    }
Exemplo n.º 11
0
    public override string RestoreStatus()
    {
        try
        {
            base.RestoreStatus();

            string ErrMsg = "";

            RmsPM.BLL.BiddingMessage cBiddingMessage = new RmsPM.BLL.BiddingMessage();
            cBiddingMessage.BiddingMessageCode = this.ApplicationCode;
            cBiddingMessage.State = "1";
            cBiddingMessage.dao   = this.dao;
            cBiddingMessage.BiddingMessageSubmit();


            return(ErrMsg);
        }
        catch (Exception ex)
        {
            Response.Write(Rms.Web.JavaScript.Alert(true, "恢复业务数据状态出错:" + ex.Message));
            throw ex;
        }
    }
Exemplo n.º 12
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);
        }
    protected void SaveToolsButton_ServerClick(object sender, EventArgs e)
    {
        string BiddingReturnCode = "";
        string BiddingDtlCode = "";
        decimal tempMoney = 0;
        if (this.DropSupplier.Items.Count <= 0)
        {
            Response.Write(JavaScript.ScriptStart);
            Response.Write("window.alert('不存在签约单位!');");
            Response.Write("window.opener=null;window.close();");
            Response.Write(JavaScript.ScriptEnd);
            return;
        }

        foreach (ListItem li in this.CheckBoxList1.Items)
        {
            if (li.Selected)
            {
                RmsPM.BLL.BiddingReturn br = new RmsPM.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);
                }
            }
        }

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

        bidding.BiddingCode = this.BiddingCode;

        RmsPM.BLL.BiddingMessage cBiddingMessage = new RmsPM.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 = "1";
        cBiddingMessage.Flag = "0";
        cBiddingMessage.BiddingReturnCode = BiddingReturnCode;
        cBiddingMessage.BiddingDtlCode = BiddingDtlCode;

        cBiddingMessage.BiddingMessageSubmit();
        if (this.ApplicationCode == "")
            this.ApplicationCode = cBiddingMessage.BiddingMessageCode;
        //附件
        this.AttachMentAdd1.SaveAttachMent(this.ApplicationCode);

        Response.Write(JavaScript.ScriptStart);
        Response.Write("window.opener.location = window.opener.location;");
        Response.Write("window.close();");
        Response.Write(JavaScript.ScriptEnd);
    }
Exemplo n.º 14
0
        public static bool BiddingMessageStatusChange(string BiddingMessageCode, int gm_iStatus, int?gm_iOriginalStatus, bool gm_bSubmitData)
        {
            BiddingMessage message = new BiddingMessage();

            return(BiddingMessageStatusChange(message.GetBiddingMessageByCode(BiddingMessageCode), BiddingMessageCode, gm_iStatus, gm_iOriginalStatus, gm_bSubmitData));
        }
    /// ****************************************************************************
    /// /// <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;
        }
    }
Exemplo n.º 16
0
        public static ContractDefaultValue GetContractDefaultValue(string Code)
        {
            ContractDefaultValue value2  = new ContractDefaultValue();
            BiddingMessage       message = new BiddingMessage();

            message.BiddingMessageCode = Code;
            value2.BiddingCode         = message.BiddingCode;
            value2.ContractName        = message.ContractName;
            value2.ContractNumber      = message.ContractNember;
            value2.ContractRemark      = message.Remark;
            value2.ContractType        = message.ContractType;
            value2.SupplierCode        = message.Supplier;
            Bidding bidding = new Bidding();

            bidding.BiddingCode  = message.BiddingCode;
            value2.Mostly        = bidding.Accessory == "1";
            value2.ObligateMoney = bidding.ObligateMoney;
            value2.ProjectCode   = bidding.ProjectCode;
            value2.UnitCode      = bidding.BiddingRemark1;
            DataRow[]      rowArray   = bidding.GetBiddingReturn().Select("BiddingReturnCode in (" + message.BiddingReturnCode + "'')");
            BiddingMoney[] moneyArray = new BiddingMoney[rowArray.Length];
            int            index      = 0;
            decimal        num2       = 0M;

            foreach (DataRow row in rowArray)
            {
                BiddingDtl dtl = new BiddingDtl();
                dtl.BiddingDtlCode = row["BiddingDtlCode"].ToString();
                BiddingMoney money = new BiddingMoney();
                money.CostCode          = dtl.CostCode;
                money.CostBudgetSetCode = dtl.CostBudgetSetCode;
                money.PBSCode           = dtl.PBSCode;
                money.PBSType           = dtl.PBSType;
                string       text     = "";
                Cash_Message message2 = new Cash_Message();
                message2.CashMessageType     = "回标";
                message2.CashMessageTypeCode = row["BiddingReturnCode"].ToString();
                DataTable table2 = message2.GetCash_Messages();
                if (table2.Rows.Count > 0)
                {
                    text = table2.Rows[table2.Rows.Count - 1]["CashMessageCode"].ToString();
                }
                Cash_Detail detail = new Cash_Detail();
                detail.Cash_MessageCode = text;
                DataTable   table3      = detail.GetCash_Details();
                CashMoney[] moneyArray2 = new CashMoney[table3.Rows.Count];
                int         num3        = 0;
                decimal     num4        = 0M;
                foreach (DataRow row2 in table3.Select())
                {
                    CashMoney money2 = new CashMoney();
                    money2.MoneyCash    = row2["Cash"].ToString();
                    money2.MoneyType    = row2["MoneyType"].ToString();
                    money2.ExchangeRate = row2["ExchangeRate"].ToString();
                    money2.RMBTypeCash  = row2["RMB"].ToString();
                    moneyArray2[num3]   = money2;
                    num4 += ConvertRule.ToDecimal(money2.RMBTypeCash);
                    num3++;
                }
                money.CashMoneys   = moneyArray2;
                money.SumCashMoney = num4;
                moneyArray[index]  = money;
                num2 += money.SumCashMoney;
                index++;
            }
            value2.BiddingMoneys = moneyArray;
            value2.ContractMoney = num2;
            return(value2);
        }
Exemplo n.º 17
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;
        }
    }
Exemplo n.º 18
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;
        /***************************************/
    }
Exemplo n.º 19
0
    /// ****************************************************************************
    /// <summary>
    /// 提交数据
    /// </summary>
    /// ****************************************************************************
    override public string SubmitData()
    {
        try
        {
            string ErrMsg = "";

            decimal tempMoney         = 0;
            string  BiddingReturnCode = "";
            string  BiddingDtlCode    = "";
            ///* 取所选标段金额总和 */
            //foreach (ListItem li in this.CheckBoxList1.Items)
            //{
            //    if (li.Selected)
            //    {
            //        RmsPM.BLL.BiddingReturn br = new RmsPM.BLL.BiddingReturn();
            //        br.BiddingReturnCode = li.Value;
            //        BiddingReturnCode += "'" + br.BiddingReturnCode + "',";
            //        BiddingDtlCode += "'" + br.BiddingDtlCode + "',";
            //        tempMoney += System.Convert.ToDecimal(br.Money);
            //    }
            //}
            //this.ViewState["MaxMoney"] = tempMoney;

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

            RmsPM.BLL.BiddingMessage cBiddingMessage = new RmsPM.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.AttachUser = this.SelectName.Value;
            cBiddingMessage.State             = "1";
            cBiddingMessage.Flag              = "0";
            cBiddingMessage.BiddingReturnCode = BiddingReturnCode;
            cBiddingMessage.BiddingDtlCode    = BiddingDtlCode;
            cBiddingMessage.dao = this.dao;
            cBiddingMessage.BiddingMessageSubmit();

            this.ApplicationTitle = this.txtContractName.Value;

            if (this.ApplicationCode == "")
            {
                this.ApplicationCode = cBiddingMessage.BiddingMessageCode;
            }

            return(ErrMsg);
        }
        catch (Exception ex)
        {
            Response.Write(Rms.Web.JavaScript.Alert(true, "保存出错:" + ex.Message));
            throw ex;
        }
    }