/// <summary> /// Constructor /// </summary> /// <param name="index">index of comment</param> /// <param name="comment">comment</param> /// <param name="currentUser">current user</param> /// <param name="customer">person comment</param> /// <param name="item">product comment</param> /// <param name="parent">parent layout</param> public CommentDetail(int index, CommentDTO comment, UserDTO currentUser, InitPage parent, Connection conn) { ItemDTO item = new QuanLySanPhamBUS().GetItemByID(conn, comment.productID); this.comment = comment; CustomerDTO customer = new QuanLyKhachHangBUS().loadKhachHangByID(conn, comment.customerID); this.parent = parent; this.itemIndex = index; this.InitializeComponent(); this.txtID.Text = comment.ID.ToString(); this.txtSPName.Text = item.name; this.txtCustomerName.Text = customer.name; this.textBoxEmail.Text = customer.email; this.textBoxAddress.Text = customer.address; this.cbStatus.Text = DTO.Helper.EnumHelper.StringValueOf((DTO.Helper.MyEnum.TypeComment)comment.status); this.txtComment.Text = comment.detail; statusBefore = comment.status; currentCustomer = customer; verifyButton(); }
private void frmQuanLyKhachHang_Load(object sender, EventArgs e) { bus = new QuanLyKhachHangBUS(); }