예제 #1
0
        private void SetTemplate()
        {
            PrintKKTemplate uc = (PrintKKTemplate)Page.LoadControl("PrintKKTemplate.ascx");

            uc.NoVoucher = NoVoucher;
            list.Controls.Add(uc);
        }
예제 #2
0
        private void Print(int NoVoucher)
        {
            //increment
            Db.Execute("UPDATE MS_KASKELUAR SET PrintKK = PrintKK + 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]"
                                 + ",DibayarKepada AS [Dibayar Kepada]"
                                 + ",Keterangan"
                                 + ",Nilai"
                                 + " FROM MS_KASKELUAR WHERE NoVoucher = " + NoVoucher);

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

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

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