ucDuyetSP InfoUcDuyet(string id, string maSP, string thoigian) { ucDuyetSP uc = new ucDuyetSP(this); uc.lbID.Text = id; uc.lbMaSP.Text = maSP; uc.lbTG.Text = thoigian; return(uc); }
public void loadDuyetSP() { fpnlItem.Visible = true; fpnlItem.Controls.Clear(); panel2.Controls.Clear(); DataTable data = Data.Instance.GetKiemDuyet(); foreach (DataRow item in data.Rows) { if (item["trangthaikiemduyet"].ToString() == "chua kiem duyet") { ucDuyetSP uc = new ucDuyetSP(this); uc = InfoUcDuyet(item["ID_ngban"].ToString(), item["ma_sp"].ToString(), item["thoigian"].ToString().Remove(10, item["thoigian"].ToString().Length - 10)); fpnlItem.Controls.Add(uc); } } }