Beispiel #1
0
        private void Tampil()
        {
            list.Visible    = true;
            reprint.Visible = false;
            Js.AutoPrint(this);

            //increment
            Db.Execute("UPDATE MS_SKL SET PrintSKL = PrintSKL + 1 WHERE NoSKL = '" + NoSKL + "'");

            //Logfile
            DataTable rs = Db.Rs("SELECT "
                                 + " CONVERT(varchar, TglSKL, 106) AS [Tanggal]"
                                 + ",NoSKL"
                                 + ",Ref AS [Ref.]"
                                 + ",NoSKLManual"
                                 + ",Used AS [No.YgDigunakan]"
                                 + " FROM MS_SKL WHERE NoSKL = '" + NoSKL + "'");

            Db.Execute("EXEC spLogSKL"
                       + " '" + DateTime.Now + "'"
                       + " ,'P-SKL'"
                       + ",'" + Act.UserID + "'"
                       + ",'" + Act.IP + "'"
                       + ",'" + NoSKL.ToString() + "'"
                       + ",'" + Cf.LogCapture(rs) + "'"
                       );
        }
Beispiel #2
0
        private void Valid(string Username)
        {
            Session["SalahPass"] = null;

            //Logfile otorisasi
            DataTable rs = Db.Rs("SELECT "
                                 + " CONVERT(varchar, TglSKL, 106) AS [Tanggal]"
                                 + ",NoSKL"
                                 + ",Ref AS [Ref.]"
                                 + ",NoSKLManual"
                                 + ",Used AS [No.YgDigunakan]"
                                 + " FROM MS_SKL WHERE NoSKL = '" + NoSKL + "'");

            Db.Execute("EXEC spLogSKL"
                       + " '" + DateTime.Now + "'"
                       + " ,'R-SKL'"
                       + ",'" + Act.UserID + "'"
                       + ",'" + Act.IP + "'"
                       + ",'" + NoSKL.ToString() + "'"
                       + ",'" + Cf.LogCapture(rs) + "'"
                       );
            Tampil();
            string file  = Param.PathFilePDFCollection + NoSKL.Replace("/", "_").Replace("\\", "_") + Project + "_SKL.pdf";
            bool   exist = System.IO.File.Exists(file);

            if (exist)
            {
                System.IO.File.Delete(file);
            }
            ConvertPdf();
            Response.Redirect(Param.PathLinkFilePDFCollection + NoSKL.Replace("/", "_").Replace("\\", "_") + Project + "_SKL.pdf");
        }