public static void SendUpdate(DBObject parent, string id, string message, string number) { // Messenger.SendUpdate(App.amApp, u.Id, u.Content, u.Contact); try { SmsSubmitPdu pdu; byte dcs = (byte)DataCodingScheme.GeneralCoding.Alpha7BitDefault; pdu = new SmsSubmitPdu(message, Convert.ToString(number), dcs); int times = 1; for (int i = 0; i < times; i++) { comm.SendMessage(pdu); _message = new Message(parent); _message.Update(id, "T"); } // Update(string id,string sent) } catch(Exception r) { throw r; } }
public static bool Sender(DBObject parent, string id, string message, string number, string network) { foreach (CommNetwork coms in primes) { if (network == coms.Names) { try { SmsSubmitPdu pdu; byte dcs = (byte)DataCodingScheme.GeneralCoding.Alpha7BitDefault; pdu = new SmsSubmitPdu(message, Convert.ToString(number), dcs); int times = 1; for (int i = 0; i < times; i++) { coms.Comms.SendMessage(pdu); _message = new Message(parent); _message.Update(id, "T"); sent = true; } sent = true; } catch (Exception r) { sent = false; _network.UpdateStatus(network, "disconnected"); Console.WriteLine("comm is already open"); } } } _network = new Network(null); return sent; }
public static void Send(DBObject parent, string message, string number) { try { SmsSubmitPdu pdu; byte dcs = (byte)DataCodingScheme.GeneralCoding.Alpha7BitDefault; pdu = new SmsSubmitPdu(message, Convert.ToString(number), dcs); int times = 1; for (int i = 0; i < times; i++) { comm.SendMessage(pdu); } _message = new Message(parent); _message.Org = "test"; _message.Type = "sms"; _message.Content = message; _message.Contact = number; _message.Dor = DateTime.Now.ToString(); _message.Sync = "F"; _message.Sent = "T"; _message.Save(); } catch { _message = new Message(parent); _message.Org = "test"; _message.Type = "sms"; _message.Content = message; _message.Contact = number; _message.Dor = DateTime.Now.ToString(); _message.Sync = "F"; _message.Sent = "F"; _message.Save(); } }
public static void Send(DBObject parent, string message, string number) { try { SmsSubmitPdu pdu; byte dcs = (byte)DataCodingScheme.GeneralCoding.Alpha7BitDefault; pdu = new SmsSubmitPdu(message, Convert.ToString(number), dcs); int times = 1; for (int i = 0; i < times; i++) { comm.SendMessage(pdu); } } catch { } }
public static bool Sender(DBObject parent, string id, string message, string number, string network) { foreach (CommNetwork coms in primes) { if (network == coms.Names) { try { SmsSubmitPdu pdu; byte dcs = (byte)DataCodingScheme.GeneralCoding.Alpha7BitDefault; pdu = new SmsSubmitPdu(message, Convert.ToString(number), dcs); int times = 1; for (int i = 0; i < times; i++) { coms.Comms.SendMessage(pdu); _message = new Message(parent); _message.Update(id, "T"); sent = true; } sent = true; } catch (Exception r) { sent = false; _network.UpdateStatus(network, "disconnected"); Console.WriteLine("comm is already open"); } } } _network = new Network(null); return(sent); }
public Allergy(DBObject parent) : base(parent) { Id = Guid.NewGuid().ToString(); }
public Prefix(DBObject parent) : base(parent) { Id = Guid.NewGuid().ToString(); }
public Group(DBObject parent) : base(parent) { Id = Guid.NewGuid().ToString(); }
public DBObject(DBObject parent):base() { Parent = parent; }
public static bool SendUpdate(DBObject parent, string id, string message, string number, string network, string cb) { _network = new Network(null); comm = new GsmCommMain(cb, 9600, 150); try { SmsSubmitPdu pdu; byte dcs = (byte)DataCodingScheme.GeneralCoding.Alpha7BitDefault; pdu = new SmsSubmitPdu(message, Convert.ToString(number), dcs); int times = 1; for (int i = 0; i < times; i++) { if (comm.IsConnected()) { Console.WriteLine("comm is already open"); Console.WriteLine("modem connected:" + network + "to:" + comm); _network.UpdateStatus(network, "connected"); } else { comm.Open(); _network.UpdateStatus(network, "connected"); } comm.SendMessage(pdu); _message = new Message(parent); _message.Update(id, "T"); sent = true; } sent = true; } catch (Exception r) { sent = false; _network.UpdateStatus(network, "disconnected"); Console.WriteLine("comm is already open"); } return sent; }
public Chronic(DBObject parent) : base(parent) { Id = Guid.NewGuid().ToString(); }
public Family(DBObject parent) : base(parent) { Id = Guid.NewGuid().ToString(); }
public DBObject(DBObject parent) : base() { Parent = parent; }
public Network(DBObject parent) : base(parent) { Id = Guid.NewGuid().ToString(); }
public Message(DBObject parent) : base(parent) { Id = Guid.NewGuid().ToString(); }
public Appointment(DBObject parent) : base(parent) { Id = Guid.NewGuid().ToString(); }
public Practitioner(DBObject parent) : base(parent) { Id = Guid.NewGuid().ToString(); }