Ejemplo n.º 1
0
        private void SetTemplate()
        {
            PrintKMTemplate uc = (PrintKMTemplate)Page.LoadControl("PrintKMTemplate.ascx");

            uc.NoVoucher = NoVoucher;
            list.Controls.Add(uc);
        }
Ejemplo n.º 2
0
        private void Print(int NoVoucher)
        {
            //increment
            Db.Execute("UPDATE MS_KASMASUK SET PrintKM = PrintKM + 1 WHERE NoVoucher = " + NoVoucher);

            //Logfile
            DataTable rs = Db.Rs("SELECT "
                                 + " NoVoucher AS [No. Voucher]"
                                 + ",CONVERT(varchar,Tgl,106) AS Tgl"
                                 + ",Acc AS [No. Account]"
                                 + ",CaraBayar AS [Cara Bayar]"
                                 + ",AlatBayar AS [Alat Bayar]"
                                 + ",DiterimaDari AS [Diterima Dari]"
                                 + ",Keterangan"
                                 + ",Nilai"
                                 + " FROM MS_KASMASUK WHERE NoVoucher = " + NoVoucher);

            Db.Execute("EXEC spLogKasMasuk"
                       + " 'P-KM'"
                       + ",'" + Act.UserID + "'"
                       + ",'" + Act.IP + "'"
                       + ",'" + Cf.LogCapture(rs) + "'"
                       + ",'" + NoVoucher.ToString().PadLeft(5, '0') + "'"
                       );

            //Template
            PrintKMTemplate uc = (PrintKMTemplate)Page.LoadControl("PrintKMTemplate.ascx");

            uc.NoVoucher = NoVoucher.ToString();
            list.Controls.Add(uc);
        }