public void RenderBrochure() { int iWidth = 587; int iHeight = 800; int iy = 224; panel1.Location = new Point(40, 322); panel1.Height = iHeight; panel1.Width = 750; iy = iy + iHeight; this.Width = 800; this.Height = 1224; pictureEmail.Location = new Point(221, iy + 100); //245, 653 TransactionDB trans = new TransactionDB(); //trans.CreateTransaction(); EbrochureLinqDB brochure = new EbrochureLinqDB(); DataTable dt; dt = brochure.GetDataList("", "", trans.Trans); trans.CommitTransaction(); x = 0; y =0 ; for (int i = 0; i < dt.Rows.Count; ++i) { AddItem(dt.Rows[i]["id"] + "", dt.Rows[i]["name_thai"] + ""); // ++i; } // AddItem(1, "Service"); //AddItem2(1, "count_queue"); //AddItem3(1, "wait_time"); //AddItem4(1, "app_queue"); dt.Dispose(); //FLP.Show(); panel1.Show(); }
public string GetBrochureName(string id) { EbrochureLinqDB brochure = new EbrochureLinqDB(); DataTable dt; dt = brochure.GetDataList("id=" + id, "", null); if (dt.Rows.Count > 0) { return dt.Rows[0]["name_thai"] + ""; } else { return ""; } }