private void Print(string Lantai) { TableRow r = new TableRow(); TableCell c; c = new TableCell(); c.Text = Lantai; c.CssClass = "lt"; c.Height = 30; c.Width = 70; r.Cells.Add(c); string ParamID = "FormatLantai" + Project; string ParamID2 = "FormatUnit" + Project; string strSql = Db.SingleString("SELECT Value FROM [ISC064_SECURITY].[dbo].[REF_PARAM] WHERE ParamID = '" + ParamID + "'"); string strSql2 = Db.SingleString("SELECT Value FROM [ISC064_SECURITY].[dbo].[REF_PARAM] WHERE ParamID = '" + ParamID2 + "'"); for (int i = 1; i < tb.Rows[0].Cells.Count; i++) { string nounit = tb.Rows[0].Cells[i].Text; c = new TableCell(); string NomorUnit = Lokasi + strSql + Lantai + strSql2 + nounit; string NoStock = Db.SingleString("SELECT ISNULL(NoStock, '') FROM MS_UNIT WHERE NoUnit = '" + NomorUnit + "'"); string type = Db.SingleString("SELECT Jenis FROM MS_UNIT WHERE NoStock = '" + NoStock + "'"); string x = TableStock.Href(NoStock); if (x != "") { c.Text = "<a href='" + x + "'>" + nounit + "</a>"; c.BackColor = TableStock.WarnaUnit(NoStock); c.CssClass = "lt"; c.Attributes.Add("id", NoStock); c.ToolTip = type + "-" + NomorUnit; } else { c.Text = "";// nounit; c.BackColor = TableStock.WarnaUnit(NoStock); c.CssClass = "lt"; } r.Cells.Add(c); } tb.Rows.Add(r); }
private void Print(string Lantai) { TableRow r = new TableRow(); TableCell c; c = new TableCell(); c.Text = Lantai; c.CssClass = "lt"; c.Height = 30; c.Width = 70; r.Cells.Add(c); for (int i = 1; i < tb.Rows[1].Cells.Count; i++) { string nounit = tb.Rows[1].Cells[i].Text; c = new TableCell(); string Project = Db.SingleString("SELECT Project FROM REF_LOKASI WHERE Lokasi ='" + Lokasi + "'"); string ParamID1 = "FormatLantai" + Project; string ParamID2 = "FormatUnit" + Project; string PemisahLantai = Db.SingleString("SELECT Value FROM " + Mi.DbPrefix + "SECURITY..REF_PARAM WHERE ParamID = '" + ParamID1 + "'"); string PemisahUnit = Db.SingleString("SELECT Value FROM " + Mi.DbPrefix + "SECURITY..REF_PARAM WHERE ParamID = '" + ParamID2 + "'"); string NomorUnit = Lokasi + PemisahLantai + Lantai + PemisahUnit + nounit; string NoStock = Db.SingleString("SELECT ISNULL(NoStock, '') FROM MS_UNIT WHERE NoUnit = '" + NomorUnit + "'"); string x = href(NomorUnit); if (x != "") { c.ID = NoStock; c.Text = "<a href='" + x + "'>" + NomorUnit + "</a>"; c.BackColor = TableStock.WarnaUnit(NoStock); c.CssClass = "lt"; c.ToolTip = NomorUnit; } else { c.Text = "";// nounit; c.BackColor = TableStock.WarnaUnit(NoStock); c.CssClass = "lt"; } r.Cells.Add(c); } tb.Rows.Add(r); }
private void Display() { string NamaPeta = Db.SingleString("Select Nama from ms_siteplan where id='" + PetaID + "'"); var Peta = Db.Rs("Select ID,NAMA,PathGambarDasar,PathGambarTransparent from ms_siteplan where id='" + PetaID + "'"); string strSql = "SELECT DISTINCT NoUnit,NoStock,Koordinat FROM MS_UNIT WHERE " + " Peta = '" + NamaPeta + "'"; DataTable rs = Db.Rs(strSql); var siteplan = new SitePlan(1000, 603, "FP/Base/PETA_" + PetaID + ".jpg", "FP/Base/PETA_" + PetaID + ".png"); foreach (DataRow r in rs.Rows) { siteplan.Draw(r[2].ToString(), Color(r["NoStock"].ToString()), TableStock.Href(r["NoStock"].ToString()), "tooltip-url", "TooltipSiteplan.aspx?NoStock=" + r["NoStock"], r["NoStock"].ToString()); } siteplan.Attributes.Add("style", "position:relative;top:50px;left:50px;"); list.Controls.Add(siteplan); }
public string HrefUnit(string NoStock) { return(TableStock.Href(NoStock)); }
public string WarnaUnit(string NoStock) { Color Warna = TableStock.WarnaUnit(NoStock); return(ColorTranslator.ToHtml(Warna)); }