示例#1
0
 public void itmtoexcel(pswift.IItem itm, int rowidx, Excel._Worksheet osheet)
 {
     if (rowidx > 36)
     {
         osheet.Cells[rowidx, 1].EntireRow.Insert(System.Reflection.Missing.Value);
     }
     osheet.Cells[rowidx, 1].value = itm.GetPropertyResultAsString("Qty", "");
     osheet.Cells[rowidx, 2].value = itm.GetProperty("Qty").Units;
     osheet.Cells[rowidx, 3].value = itm.GetPropertyResultAsString("Item #", "");
     osheet.Cells[rowidx, 4].value = itm.Name;
     osheet.Cells[rowidx, 5].value = itm.GetPropertyResultAsString("Price Each", "");
     osheet.Cells[rowidx, 6].value = itm.GetPropertyResultAsString("Price Total", "");
 }
示例#2
0
 public void itmtoword(pswift.IItem itm, Word.Table tbl, int rowidx, string tp)
 {
     if (rowidx > 20)
     {
         tbl.Rows.Add(System.Reflection.Missing.Value);
     }
     if (tp == "Digitizer")
     {
         tbl.Cell(rowidx, 1).Range.Font.Bold   = 1;
         tbl.Cell(rowidx, 1).Range.Font.Italic = 0;
     }
     else
     {
         tbl.Cell(rowidx, 1).Range.Font.Bold   = 0;
         tbl.Cell(rowidx, 1).Range.Font.Italic = 1;
     }
     tbl.Cell(rowidx, 1).Range.Text = itm.Name;
     tbl.Cell(rowidx, 2).Range.Text = itm.GetPropertyResultAsString("Qty", "");
     tbl.Cell(rowidx, 3).Range.Text = itm.GetProperty("Qty").Units;
     tbl.Cell(rowidx, 4).Range.Text = itm.GetPropertyResultAsString("Price Each", "");
     tbl.Cell(rowidx, 5).Range.Text = itm.GetPropertyResultAsString("Price Total", "");
 }
示例#3
0
        public string createMailBody(string RT)
        {
            char   quo  = (char)34;
            string body = "<body>";

            body = body + "<h1>Report Type: " + RT + "</h1>" + "\r\n";
            body = body + "<table style=" + quo + "width:auto; font-weight:Bold; font-family:Tahoma; font-size:14px;" + quo + ">" + "\r\n";
            body = body + "<tr>" + "\r\n";
            body = body + "<td style=" + quo + "width:200px; font-weight:Bold; font-family:Tahoma; font-size:14px;" + quo + ">";
            body = body + "Name";
            body = body + "</td>" + "\r\n";
            body = body + "<td style=" + quo + "width:100px; font-weight:Bold; font-family:Tahoma; font-size:14px;" + quo + ">";
            body = body + "Qty";
            body = body + "</td>" + "\r\n";
            body = body + "<td style=" + quo + "width:100px; font-weight:Bold; font-family:Tahoma; font-size:14px;" + quo + ">";
            body = body + "Price Each";
            body = body + "</td>" + "\r\n";
            body = body + "<td style=" + quo + "width:100px; font-weight:Bold; font-family:Tahoma;font-size:14px;" + quo + ">";
            body = body + "Price Total";
            body = body + "</td>" + "\r\n";
            body = body + "</tr>" + "\r\n";
            if (RT == "Digitizer Items Only")
            {
                for (int idx = 0; idx <= TGlobal.tlst.Count - 1; idx++)
                {
                    pswift.IItem itm = TGlobal.ps.GetItem(TGlobal.tlst[idx]);
                    if (itm.GetPropertyResultAsBoolean("isPart", false) == false)
                    {
                        body = body + "<tr><td style=" + quo + "font-size:12px; font-weight:normal;" + quo + ">" + itm.Name + "</td>";
                        body = body + "<td style=" + quo + "font-size:12px; font-weight:normal;" + quo + ">" + itm.GetPropertyResultAsString("Qty", "") + "</td>";
                        body = body + "<td style=" + quo + "font-size:12px; font-weight:normal;" + quo + ">" + itm.GetPropertyResultAsString("Price Each", "") + "</td>";
                        body = body + "<td style=" + quo + "font-size:12px; font-weight:normal;" + quo + ">" + itm.GetPropertyResultAsString("Price Total", "") + "</td>";
                        body = body + "</tr>";
                    }
                }
            }
            if (RT == "Parts Only")
            {
                for (int idx = 0; idx <= TGlobal.tlst.Count - 1; idx++)
                {
                    pswift.IItem itm = TGlobal.ps.GetItem(TGlobal.tlst[idx]);
                    if (itm.GetPropertyResultAsBoolean("isPart", false) == true)
                    {
                        body = body + "<tr><td style=" + quo + "font-size:12px; font-weight:normal;" + quo + ">" + itm.Name + "</td>";
                        body = body + "<td style=" + quo + "font-size:12px; font-weight:normal;" + quo + ">" + itm.GetPropertyResultAsString("Qty", "") + "</td>";
                        body = body + "<td style=" + quo + "font-size:12px; font-weight:normal;" + quo + ">" + itm.GetPropertyResultAsString("Price Each", "") + "</td>";
                        body = body + "<td style=" + quo + "font-size:12px; font-weight:normal;" + quo + ">" + itm.GetPropertyResultAsString("Price Total", "") + "</td>";
                        body = body + "</tr>";
                    }
                }
            }
            if (RT == "Digitizer Items w/Parts")
            {
                for (int idx = 0; idx <= TGlobal.tlst.Count - 1; idx++)
                {
                    pswift.IItem itm = TGlobal.ps.GetItem(TGlobal.tlst[idx]);
                    if (itm.GetPropertyResultAsBoolean("isPart", false) == false)
                    {
                        body = body + "<tr><td style=" + quo + "font-size:12px; font-weight:normal; color:#007dc3;" + quo + ">" + itm.Name + "</td>";
                        body = body + "<td style=" + quo + "font-size:12px; font-weight:normal; color:#007dc3;" + quo + ">" + itm.GetPropertyResultAsString("Qty", "") + "</td>";
                        body = body + "<td style=" + quo + "font-size:12px; font-weight:normal; color:#007dc3;" + quo + ">" + itm.GetPropertyResultAsString("Price Each", "") + "</td>";
                        body = body + "<td style=" + quo + "font-size:12px; font-weight:normal; color:#007dc3;" + quo + ">" + itm.GetPropertyResultAsString("Price Total", "") + "</td>";
                        body = body + "</tr>";
                    }
                    if (itm.GetPropertyResultAsBoolean("isPart", false) == true)
                    {
                        body = body + "<tr><td style=" + quo + "font-size:12px; font-weight:normal; color:#0000FF;" + quo + ">" + itm.Name + "</td>";
                        body = body + "<td style=" + quo + "font-size:12px; font-weight:normal; color:#0000FF;" + quo + ">" + itm.GetPropertyResultAsString("Qty", "") + "</td>";
                        body = body + "<td style=" + quo + "font-size:12px; font-weight:normal; color:#0000FF;" + quo + ">" + itm.GetPropertyResultAsString("Price Each", "") + "</td>";
                        body = body + "<td style=" + quo + "font-size:12px; font-weight:normal; color:#0000FF;" + quo + ">" + itm.GetPropertyResultAsString("Price Total", "") + "</td>";
                        body = body + "</tr>";
                    }
                }
            }
            return(body);
        }