/// <summary> /// Trigger an email send to the specified subscriber using the 'Trigger Send Definition' key, /// <paramref name="triggerSendDefKey"/>. /// </summary> /// <remarks>Note that this function additionally creates a triggered send data extension and will create /// a duplicate even if the subscriber details are identical. It might be a good idea to fix this some /// day.</remarks> public ValResultData<int> SendEmailNow(string subscriberKey, string triggerSendDefKey, int listId, SubscriberBO subscriberBO) { if (_soapClientFactory == null) return ValResultDataFactory.NewFailure<int>("No SoapClientFactory provided to EmailSender"); if (string.IsNullOrEmpty(subscriberKey)) return ValResultDataFactory.NewFailure<int>("No subscriber key provided to EmailSender"); if (string.IsNullOrEmpty(triggerSendDefKey)) return ValResultDataFactory.NewFailure<int>("No trigger send definition key provided to EmailSender"); Subscriber subscriber; if (subscriberBO != null) { subscriber = SubscriberFactory.New(subscriberBO, listId, _soapClientFactory); } else { subscriber = new Subscriber { EmailAddress = subscriberKey, SubscriberKey = subscriberKey, }; } var clientId = new ClientID { ID = _soapClientFactory.SubAccountId, IDSpecified = true, }; var send = new TriggeredSend { Client = clientId, Subscribers = new[] { subscriber }, TriggeredSendDefinition = new TriggeredSendDefinition { CustomerKey = triggerSendDefKey, Client = clientId, }, }; APIObject[] sends = {send}; string status; CreateResult[] results; try { string requestId; results = _soapClientFactory.Client.Create(new CreateOptions(), sends, out requestId, out status); } catch (Exception ex) { return ValResultDataFactory.NewFailure<int>("Failed to trigger email send. Exception details: {0}", ex.Message); } if (!"OK".Equals(status, StringComparison.InvariantCultureIgnoreCase)) { string errors = ETErrorResultExtractor.Extract(results); if (!string.IsNullOrEmpty(errors)) return ValResultDataFactory.NewFailure<int>("Failed to trigger email send. " + "Exact Target errors are: {0}", errors); } if (results.Length == 0) return ValResultDataFactory.NewSuccess(0, "Failed to trigger email send. " + "Unable to acquire error details."); return ValResultDataFactory.NewSuccess(0, "Successfully triggered email send"); }
private void Window_Loaded(object sender, RoutedEventArgs e) { mainWindow.Visibility = Visibility.Hidden; SqlCommand ClientView = new SqlCommand("create view ClientView as select adress1, adress2, adress3, D_Full_name, D_Phone_number, Auto_model, Auto_plate," + " Datatime, Distance, summary, PaymentOperator, Servise_name, " + "Servise_surcharge from Rides r JOIN Driver d ON r.DriverID = d.Driver_ID JOIN Client c ON r.ClientID = c.Client_ID join Payment p on " + "r.PaymentOperator = p.Pay_operator join ExtraServises e on r.ExServise_ID = e.servise_ID where ClientID = " + ClientID.ToString(), connect); cmndDrop = new SqlCommand("drop view ClientView", connect); cmndDrop.ExecuteNonQuery(); ClientView.ExecuteNonQuery(); string CmndLine = "select * from ClientView"; cmnd = new SqlCommand(CmndLine, connect); SqlDataReader reader = cmnd.ExecuteReader(); DT = new DataTable(); DT.Load(reader); CDataGrid.ItemsSource = DT.DefaultView; Column_Selection_CB.ItemsSource = CtTableStrings; reader.Close(); }
public override bool getNext() { if(m_eof) return false; if(!m_next.valid && !m_eof) // get the next read trace entry { try { // read line and parse it String raw_input = m_reader.ReadLine(); if(raw_input == null) throw new EndOfStreamException(); String[] fields = raw_input.Split(m_delimiters,StringSplitOptions.RemoveEmptyEntries); UInt64 rawBaseAddr = UInt64.Parse(fields[2],System.Globalization.NumberStyles.AllowHexSpecifier); UInt32 mask = UInt32.Parse(fields[3],System.Globalization.NumberStyles.AllowHexSpecifier); UInt64 cycle = UInt64.Parse(fields[4]); int size; int offset; ParseMask(mask,out size, out offset); if(fields[0].Length == 2) m_next.client = (ClientID) Enum.Parse(typeof(ClientID),fields[0].Substring(0,2)); else m_next.client = (ClientID) Enum.Parse(typeof(ClientID),fields[0].Substring(0,1)); m_next.gpuOp = (GPUOP) Enum.Parse(typeof(GPUOP),fields[1]); m_next.valid = true; m_next.baseAddr = rawBaseAddr + (UInt64)offset; m_next.size = size; m_next.sclk_cycle = cycle; m_insts_remaining = (int)((cycle - m_last_sclk)/Config.proc.GPUBWFactor); if(m_insts_remaining < 0) m_insts_remaining = 0; m_last_sclk = cycle; } catch (EndOfStreamException) { m_next.valid = false; m_next.sclk_cycle = UInt64.MaxValue; m_eof = true; } } Debug.Assert(m_next.valid || m_eof); #if true if(m_insts_remaining > 0) { m_insts_remaining--; type = Trace.Type.NonMem; address = 1; from = 0; client = ClientID.NONE; memsize = 0; return true; } #endif client = m_next.client; memsize = m_next.size; address = m_next.baseAddr; address |= ((ulong)m_group) << 48; if(m_next.gpuOp == GPUOP.R) type = Trace.Type.Rd; else type = Trace.Type.Wr; m_next.valid = false; return true; }
private void ClientIDTextBox_Leave(object sender, System.EventArgs e) { if (string.IsNullOrWhiteSpace(clientIDTextBox.Text) || string.Compare(clientIDTextBox.Text, "کد شناسه") == 0) { confirmClientIDPicturBox.Visible = false; clientIDTextBox.ForeColor = Infrastructure.Utility.DarkGrayColor(); clientIDPanel.BackColor = Infrastructure.Utility.DarkGrayColor(); clientIDTextBox.Text = "کد شناسه"; clientIDTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Left; ClientID = null; } else { ClientID = clientIDTextBox.Text; if (ClientID.Length < 11) { confirmClientIDPicturBox.Visible = true; confirmClientIDPicturBox.Image = Properties.Resources.Tik_False; clientIDTextBox.Focus(); ClientID = null; return; } else { if (Validation_ClientID(clientIDTextBox.Text) == true) { clientIDTextBox.ForeColor = Infrastructure.Utility.WhiteColor(); clientIDPanel.BackColor = Infrastructure.Utility.WhiteColor(); clientIDTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; if (clientIDTextBox.Text.StartsWith("09")) { //ClientID = clientIDTextBox.Text; confirmClientIDPicturBox.Visible = true; confirmClientIDPicturBox.Image = Properties.Resources.Tik_True; saveButton.Enabled = true; clientIDTextBox.Text = clientIDTextBox.Text.Insert(4, "-"); ClientID = ClientID.Replace("-", string.Empty).Trim(); } else { clientIDTextBox.Focus(); return; } } else if (Validation_ClientID(clientIDTextBox.Text) == false) { confirmClientIDPicturBox.Visible = true; confirmClientIDPicturBox.Image = Properties.Resources.Tik_False; clientIDTextBox.Focus(); ClientID = null; saveButton.Enabled = false; } } } }
public TrailingStopLossOrderTransaction(TransactionID id, DateTime time, int userID, AccountID accountID, TransactionID batchID, RequestID requestID, TransactionType type, TradeID tradeID, ClientID clientTradeID, double distance, TimeInForce timeInForce, DateTime gTDTime, OrderTriggerCondition triggerCondition, TrailingStopLossOrderReason reason, ClientExtensions clientExtensions, TransactionID orderFillTransactionID, OrderID replacesOrderID, TransactionID cancellingTransactionID) { this.Id = id; this.Time = time; this.UserID = userID; this.AccountID = accountID; this.BatchID = batchID; this.RequestID = requestID; this.Type = type; this.TradeID = tradeID; this.ClientTradeID = clientTradeID; this.Distance = distance; this.TimeInForce = timeInForce; this.GTDTime = gTDTime; this.TriggerCondition = triggerCondition; this.Reason = reason; this.ClientExtensions = clientExtensions; this.OrderFillTransactionID = orderFillTransactionID; this.ReplacesOrderID = replacesOrderID; this.CancellingTransactionID = cancellingTransactionID; }
public PrimeNetTransportClient() { ClientID = Guid.NewGuid(); Debug.Log("Creating a new GUID" + ClientID.ToString()); }
/// <summary> /// <Description>Used to display curren Medication record of Client</Description> /// <Author>Anuj</Author> /// <CreatedOn>4 jan 2009</CreatedOn> /// </summary> /// <param name=""></param> /// <param name=""></param> /// <param name="sortString"></param> private TableRow GenerateCurrentMedicationSubRows(DataRow drTemp, string PrescribedBy, string tableId, string startDate, string endDate, bool _boolRowWithInteractionFound, int prescriberId, string DispenceQty, bool Medication, int ClientMedicationScriptDrugStrengthId, int ClientMedicationId, string MedicationName) { try { CommonFunctions.Event_Trap(this); string newId = System.Guid.NewGuid().ToString(); int MedicationId = Convert.ToInt32(drTemp["ClientMedicationId"]); string tblId = this.ClientID + this.ClientIDSeparator + tableId; TableRow trTemp = new TableRow(); trTemp.ID = "Tr_" + newId; int client = ((Streamline.BaseLayer.StreamlinePrinciple)Context.User).Client.ClientId; //Ist Column TableCell tdStartDate = new TableCell(); //tdStartDate.Text = OrderDate; tdStartDate.Text = startDate; //IInd Column TableCell tdEndDate = new TableCell(); tdEndDate.Text = endDate; //IIIrd Column TableCell tdOrderStart = new TableCell(); if (drTemp["StartDate"].ToString() != "") { tdOrderStart.Text = Convert.ToDateTime(drTemp["StartDate"]).ToString("MM/dd/yyyy"); } //IVth Column TableCell tdOrderEnd = new TableCell(); if (drTemp["EndDate"].ToString() != "") { tdOrderEnd.Text = Convert.ToDateTime(drTemp["EndDate"]).ToString("MM/dd/yyyy"); } Label lblMedication = new Label(); lblMedication.ID = "Lbl_" + MedicationId.ToString(); //Vth Column TableCell tdMedication = new TableCell(); lblMedication.Text = MedicationName; tdMedication.Controls.Add(lblMedication); if (Medication == false) { tdMedication.Controls.Clear(); tdMedication.Text = ""; } //VIth Column TableCell tdRadioButton = new TableCell(); string rowId = this.ClientID + this.ClientIDSeparator + trTemp.ClientID; HtmlInputRadioButton rbTemp = new HtmlInputRadioButton(); rbTemp.Name = ClientID.ToString();//Addedd By Pradeep as per task#3299 rbTemp.Attributes.Add("ClientMedicationId", drTemp["ClientMedicationId"].ToString()); rbTemp.Attributes.Add("ClientMedicationInstructionId", drTemp["ClientMedicationInstructionId"].ToString()); rbTemp.Attributes.Add("onClick", "onCurrentMedicationRadioClick(" + ClientMedicationScriptDrugStrengthId + "," + ClientMedicationId + ")"); rbTemp.ID = "Rb_" + MedicationId.ToString(); tdRadioButton.Controls.Add(rbTemp); if (Medication == false) { //myscript += "var Radiocontext" + MedicationId + "={MedicationId:" + MedicationId + ",MedicationInstructionsId:" + drTemp["MedicationInstructionId"].ToString() + ",TableId:'" + tblId + "',RowId:'" + rowId + "'};"; //myscript += "var RadioclickCallback" + MedicationId + " ="; //myscript += " Function.createCallback(" + this._onRadioClickEventHandler + ", Radiocontext" + MedicationId + ");"; //myscript += "$addHandler($get('" + this.ClientID + this.ClientIDSeparator + rbTemp.ClientID + "'), 'click', RadioclickCallback" + MedicationId + ");"; } //VIIth Column TableCell tdOrder = new TableCell(); tdOrder.Text = drTemp["Instruction"] == DBNull.Value ? "" : drTemp["Instruction"].ToString(); if (Medication == false) { tdRadioButton.Controls.Clear(); tdRadioButton.Text = ""; } //VIIIth Column TableCell tdPrescribed = new TableCell(); tdPrescribed.Text = PrescribedBy; if (Medication == false) { tdPrescribed.Controls.Clear(); tdPrescribed.Text = ""; } //VIIIth Column TableCell tdDispenceQty = new TableCell(); tdDispenceQty.Text = DispenceQty; if (drTemp["DispenseQuantity"] != null) { tdDispenceQty.Controls.Clear(); tdDispenceQty.Text = Convert.ToString(drTemp["DispenseQuantity"]); } if (Medication == false) { tdOrder.Controls.Clear(); tdOrder.Text = ""; tdDispenceQty.Controls.Clear(); tdDispenceQty.Text = ""; tdOrderStart.Controls.Clear(); tdOrderStart.Text = ""; tdOrderEnd.Controls.Clear(); tdOrderEnd.Text = ""; } trTemp.Cells.Add(tdRadioButton); trTemp.Cells.Add(tdMedication); trTemp.Cells.Add(tdStartDate); trTemp.Cells.Add(tdOrder);//Instruction trTemp.Cells.Add(tdDispenceQty); trTemp.Cells.Add(tdOrderStart); trTemp.Cells.Add(tdOrderEnd); trTemp.Cells.Add(tdPrescribed); trTemp.CssClass = "GridViewRowStyle"; //RepeatMediactionId = MedicationId; return(trTemp); } catch (Exception ex) { if (ex.Data["CustomExceptionInformation"] == null) { ex.Data["CustomExceptionInformation"] = ""; } else { ex.Data["CustomExceptionInformation"] = ""; } if (ex.Data["DatasetInfo"] == null) { ex.Data["DatasetInfo"] = null; } throw (ex); } }
public void ShowReport(string _strScriptIds) { FileStream fs; TextWriter ts; ArrayList ScriptArrays; ArrayList ChartScriptArrays; bool _strFaxSendStatus = false; string _strFaxFaildMessage = ""; try { string strPath = ""; string FileName = ""; fs = new FileStream(Server.MapPath("RDLC\\" + Context.User.Identity.Name + "\\Report.html"), FileMode.Create); ts = new StreamWriter(fs); divReportViewer.InnerHtml = ""; string strPageHtml = ""; ScriptArrays = new ArrayList(); ScriptArrays = ApplicationCommonFunctions.StringSplit(_strScriptIds, "^"); if (method.Trim().ToUpper() == "P") { //using (Streamline.BaseLayer.RDLCPrint objRDLC = new RDLCPrint()) //{ // objRDLC.Run(this.reportViewer1.LocalReport, Server.MapPath("RDLC\\" + Context.User.Identity.Name), this.HiddenFieldAllFaxed.ToString(), false, false); //} ScriptManager.RegisterStartupScript(LabelClientScript, LabelClientScript.GetType(), ClientID.ToString(), "printRDLC();", true); _strFaxFailed = true; } else if (method.Trim().ToUpper() == "F") { if (pharmacyId != 0) { //Send to Fax SendToFax(pharmacyId); if (_strFaxFailed == true) { _strFaxFaildMessage = "Script could not be faxed at this time. The fax server is not available. Please print the script or re-fax the script later."; strPageHtml += "<span style='float:left;position:absolute;padding-left:30%;color:Red;text-align:center;font-size: 12px;font-family:Microsoft Sans Serif;'><b>" + _strFaxFaildMessage + "</b></span><br/>"; //---Send for printing //using (Streamline.BaseLayer.RDLCPrint objRDLC = new RDLCPrint()) //{ // objRDLC.Run(this.reportViewer1.LocalReport, Server.MapPath("RDLC\\" + Context.User.Identity.Name), this.HiddenFieldAllFaxed.ToString(), false, false); //} ScriptManager.RegisterStartupScript(LabelClientScript, LabelClientScript.GetType(), ClientID.ToString(), "printRDLC();", true); } } else { //Send to Printer ScriptManager.RegisterStartupScript(LabelClientScript, LabelClientScript.GetType(), ClientID.ToString(), "printRDLC();", true); } } for (int i = 0; i < ScriptArrays.Count; i++) { foreach (string file in Directory.GetFiles(Server.MapPath("RDLC\\" + Context.User.Identity.Name + "\\"))) { FileName = file.Substring(file.LastIndexOf("\\") + 1); if ((FileName.IndexOf("JPEG") >= 0 || FileName.IndexOf("jpeg") >= 0) && (FileName.IndexOf(ScriptArrays[i].ToString(), 3) >= 0)) { strPageHtml += "<img src='.\\RDLC\\" + Context.User.Identity.Name + "\\" + FileName + "' style='width:100%' />"; } strPath = "'..\\RDLC\\" + Context.User.Identity.Name + "\\" + FileName; } } divReportViewer.InnerHtml = ""; divReportViewer.InnerHtml = strPageHtml; ts.Close(); //Response.Write(strPageHtml); } catch (Exception ex) { throw (ex); } }