コード例 #1
0
        public bool UsersInsertRecei(ReceivingInfo rec)
        {
            string sql = string.Format(@"insert ReceivingInfo(Zip_code,Receiving_Province,Receiving_City,Receiving_Phone,Receiving_Name,Detailed_address,Accounts)
                                        values ({0},'{1}','{2}','{3}','{4}','{5}','{6}')"
                                       , rec.Zip_code, rec.Receiving_Province, rec.Receiving_City, rec.Receiving_Phone, rec.Receiving_Name, rec.Detailed_address, rec.Accounts);

            return(DBHelper.Update(sql));
        }
コード例 #2
0
        //添加收件信息
        protected void Unnamed2_Click(object sender, EventArgs e)
        {
            Accounts = Request.Cookies["userName"].Value;
            PersonalAddBLL uir = new PersonalAddBLL();
            ReceivingInfo  rec = new ReceivingInfo();

            rec.Zip_code           = int.Parse(this.Zip_code.Text);
            rec.Receiving_Province = this.ddlProvince.Text;
            rec.Receiving_City     = this.ddlCity.Text;
            rec.Receiving_Phone    = this.Receiving_Phone.Text;
            rec.Receiving_Name     = this.Receiving_Name.Text;
            rec.Detailed_address   = this.Detailed_address.Text;
            rec.Accounts           = Accounts;
            if (uir.UsersInsertRecei(rec))
            {
                ClientScript.RegisterStartupScript(this.GetType(), "zixunSucess", "<script>alert('添加成功!');</script> ");
            }
            else
            {
                ClientScript.RegisterStartupScript(this.GetType(), "zixunSucess", "<script>alert('添加失败!');</script> ");
            }
        }
コード例 #3
0
        public bool UsersInsertRecei(ReceivingInfo rec)
        {
            PersonalAddDAL uir = new PersonalAddDAL();

            return(uir.UsersInsertRecei(rec));
        }