protected void btn_result_Click(object sender, EventArgs e)
        {
            Contract         contract = this.AddContract();
            ContractProvider provider = new ContractProvider();

            if (provider.Insert(contract))
            {
                string id = provider.GetSize().ToString();
                Response.Redirect("TrimsSourcing.aspx?id=" + id);
            }
        }
示例#2
0
        protected void btn_Result_Click(object sender, EventArgs e)
        {
            Contract         contract = this.AddContract();
            ContractProvider provider = new ContractProvider();

            if (this.IsSame() == 1)
            {
                this.Alert("合同号已经存在,请重新输入!");
                return;
            }
            if (provider.Insert(contract))
            {
                this.Alert("添加成功!!!");
                this.TextCancel();
            }
        }