public ExplainParamater GetExplainParamater(DataGridView dg, DataGridViewCellEventArgs e) { ExplainParamater ep = new ExplainParamater(); try { ep.Account = dg.Rows[e.RowIndex].Cells["ColAccount"].Value.ToString(); ep.Cusip = dg.Rows[e.RowIndex].Cells["SEDOL"].Value.ToString(); ep.Date = DateTime.Parse(dg.Rows[e.RowIndex].Cells["ColDte"].Value.ToString()); ep.Symbol = dg.Rows[e.RowIndex].Cells["ColSymbol"].Value.ToString(); } catch (Exception ex) { Utility.Error.ErrMsgBox(ex.Message); } return ep; }
/// <summary> /// Should pull the datarow values and pass them to the Explain PL object to show the explains. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void RowEnterEvent(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 0 && e.RowIndex != -1) { this.explainParamater = GetExplainParamater(this.dgDiffs, e); this.LoadExplain(); Debug.WriteLine(this.explainParamater.Symbol); } }
/// <summary> /// Opens an explain PL adjustment window. /// </summary> /// <param name="ep"></param> private void AddExplain(ExplainParamater ep) { frmExplainAdjustment frmexpl = new frmExplainAdjustment(this.explainObj); frmexpl.PopulateFormFields(ep); frmexpl.ShowDialog(); }
/// <summary> /// Captures The Edit Link that the user clicked to make an adjustment. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void DiffCellClickEvent(object sender, DataGridViewCellEventArgs e) { //Grab the data contents of the selected cell if (e.ColumnIndex == 0 && e.RowIndex != -1 ) { this.explainParamater = GetExplainParamater(this.dgDiffs, e); // Opens the Explain Window this.AddExplain(this.explainParamater); } }
public void PopulateFormFields(ExplainParamater ep) { this._ExplainParamObj = ep; #region Add To Combo Box ArrayList al = new ArrayList(); al.Add(new ComboBoxItem(1, "Qty Daily Explain Adjustments")); al.Add(new ComboBoxItem(2, "Qty ITD Explain Adjustments")); al.Add(new ComboBoxItem(3, "MV Daily Explain Adjustments")); al.Add(new ComboBoxItem(4, "MV ITD Explain Adjustments")); this.cboExplainType.DataSource = al; this.cboExplainType.DisplayMember = "Name"; this.cboExplainType.ValueMember = "Id"; #endregion // Load Set Parameters this.txtUser.Text = System.Windows.Forms.SystemInformation.UserName; this.dtpicker.Value = ep.Date; this.txtAccount.Text = ep.Account; this.txtCusip.Text = ep.Cusip; this.txtSymbol.Text = ep.Symbol; //this._ExplainPLObj.LoadDailyExplain(); }
public static double GetQtyDailyExplain(ExplainParamater ExpParam) { RECONDataSetTableAdapters.ExplainPLTableAdapter ta = new RECONDataSetTableAdapters.ExplainPLTableAdapter(); return Common.SafeDouble(ta.TotalQtyDailyExplain(ExpParam.Date, ExpParam.Cusip, ExpParam.Symbol, ExpParam.Account)); }
public void LoadQtyITDExplain(ExplainParamater ExpParam) { this._tableadapter.QtyITDFillByParams(this._dt, ExpParam.Date, ExpParam.Account, ExpParam.Cusip, ExpParam.Symbol); }
public void LoadDailyExplain(ExplainParamater ExpParam) { LoadDailyExplain(ExpParam.Date, ExpParam.Account, ExpParam.Cusip, ExpParam.Symbol); }
public void LoadAllExplain(ExplainParamater ExpParam) { _tableadapter.ClearBeforeFill = true; _tableadapter.FillByDte(this._dt, ExpParam.Date, ExpParam.Account, ExpParam.Cusip, ExpParam.Symbol); }