예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            NCBJDataContext dbcontext = new NCBJDataContext();

            TransGV.DataSource = dbcontext.nwc_Transaction_logs;
            TransGV.DataBind();
        }
예제 #2
0
        public static int get_lime_balance(int userid)
        {
            NCBJDataContext ncb = new NCBJDataContext();

            int Acct_balance = (from cust in ncb.nwc_Accounts
                                where cust.Cust_num == userid
                                select cust.Balance).FirstOrDefault <int>();

            return(Acct_balance);
        }
예제 #3
0
 public static void Recieve_Payments(int cust_id, int acct_num, Decimal Pay_amt, Decimal Acct_balance, DateTime Payment_date, String trans_type)
 {
     using (NCBJDataContext ncb = new NCBJDataContext())
     {
         try
         {
             //calling stored procedure
             ncb.Recieve_Payment(cust_id, acct_num, Pay_amt, Acct_balance, Payment_date, trans_type);
         }catch (FormatException e)
         {
             Console.WriteLine(e.Message);
         }
     }
 }
예제 #4
0
        static ScotiaBankDataContext scotiaB = new ScotiaBankDataContext();// I have to keep this contaxt open in order to return table for bill view

        /*These are for nwc*/
        public static void Generate_bill(int customer_id, String name, DateTime Statement_date, DateTime Due_date, Decimal Bill_amt)//the generate bill stored procedure needs
        {
            using (NCBJDataContext ncb = new NCBJDataContext())
            {
                try
                {
                    //Calling stored procedure
                    ncb.Generate_Bill(customer_id, name, Statement_date, Due_date, Bill_amt);
                }
                catch (FormatException e)
                {
                    Console.WriteLine(e.Message);
                }
            }
        }