protected void btnAdd_Click(object sender, EventArgs e) { string username = Request.Cookies["userLoginSystem"].Value; tbl_TransportCompany receivePlaceNew = new tbl_TransportCompany(); receivePlaceNew.ID = Convert.ToInt32(this.hdfID.Value); receivePlaceNew.CompanyName = this.txtCompanyName.Text; receivePlaceNew.CompanyPhone = this.txtCompanyPhone.Text; receivePlaceNew.CompanyAddress = this.txtCompanyAddress.Text; receivePlaceNew.ShipTo = this.txtShipTo.Text; receivePlaceNew.Address = this.txtAddress.Text; receivePlaceNew.Prepay = Convert.ToBoolean(this.rdbPrepay.SelectedValue); receivePlaceNew.COD = Convert.ToBoolean(this.rdbCOD.SelectedValue); receivePlaceNew.Note = this.pNote.Text; receivePlaceNew.CreatedBy = username; TransportCompanyController.InsertReceivePlace(receivePlaceNew); Response.Redirect(String.Format("/chi-tiet-nha-xe/?id={0}", this.hdfID.Value)); }