Ejemplo n.º 1
0
        /// <summary>
        /// 绑定项目
        /// </summary>
        private void BindItem()
        {
            DataRow contract;

            using (ContractProvider contProvider = new ContractProvider())
            {
                var table = contProvider.GetContractHeadInfo(this.CurrentID);
                if (table != null && table.Rows.Count == 1)
                {
                    contract = table.Rows[0];
                }
                else
                {
                    contract = null;
                }

                //合同明细
                var detailList = contProvider.GetContractDetailInfo(this.CurrentID);
                ViewState["ViewDT"] = detailList;
                BindTempData();
            }

            ORDNO.Text                = contract["ORDNO"].ToString().Trim();
            ORDNAME.Text              = contract["ORDNAME"].ToString().Trim();
            CURR.SelectedValue        = contract["CURR"].ToString().Trim();
            SIGNDATE.Text             = contract["SIGNDATE"].ToString().Trim();
            CUSTNO.Text               = contract["CUSTNO"].ToString().Trim();
            CUSTNAME.Text             = contract["CUSTNAME"].ToString().Trim();
            ORDAMT.Text               = contract["ORDAMT"].ToString().Trim();
            DELIVERYDATE.Text         = contract["DELIVERYDATE"].ToString().Trim();
            SCH_YF.Text               = contract["SCH_YF"].ToString().Trim();
            SCH_JD.Text               = contract["SCH_JD"].ToString().Trim();
            SCH_TH.Text               = contract["SCH_TH"].ToString().Trim();
            SCH_ZB.Text               = contract["SCH_ZB"].ToString().Trim();
            PROTECTTERM.SelectedValue = contract["PROTECTTERM"].ToString().Trim();
            Remark.Text               = contract["Remark"].ToString();
        }