コード例 #1
0
 partial void DeleteSMS_TransferFundReport(SMS_TransferFundReport instance);
コード例 #2
0
 partial void InsertSMS_TransferFundReport(SMS_TransferFundReport instance);
コード例 #3
0
 partial void UpdateSMS_TransferFundReport(SMS_TransferFundReport instance);
コード例 #4
0
        static void report(string type, string amount = "")
        {
            if (type == "sender")
            {
                SMS_TransferFundReport tf = new SMS_TransferFundReport();
                tf.ReferenceNo = ReferenceNo;
                tf.Sender = Sender;
                tf.Receiver = "N/A";
                tf.Amount = Convert.ToDecimal(amount);
                tf.DateTransfered = config.receivedDateTime();
                tf.Status = false;
                db.SMS_TransferFundReports.InsertOnSubmit(tf);
            }
            else if (type == "receiver")
            {
                var upt = db.SMS_TransferFundReports.Single(i => i.ReferenceNo == ReferenceNo);
                if (upt != null)
                {
                    upt.Receiver = Receiver;
                    upt.Status = true;
                }
            }

            try
            {
                db.SubmitChanges();
            }
            catch (Exception ex)
            {
            }
        }