Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public string HrefUnit(string NoStock)
 {
     return(TableStock.Href(NoStock));
 }