private void fromPredToolStripMenuItem_Click(object sender, EventArgs e) { TakeMoney Tm = new TakeMoney(); Tm.dolgOneID = ((___BASA__DataSet.DolgViewRow)((DataRowView)dolgDataGridView.CurrentRow.DataBoundItem).Row).ID; Tm.Text = "Списание Долга из Предоплаты"; Tm.Tag = "from"; int tmPID = ((___BASA__DataSet.DolgViewRow)((DataRowView)dolgDataGridView.CurrentRow.DataBoundItem).Row).PID; Tm.PID = tmPID; Tm.dolgManyIDS = new int[___BASA__DataSet.PredoplataView.Select("PID=" + tmPID.ToString()).Length]; int iii = 0; foreach (___BASA__DataSet.PredoplataViewRow dr in ___BASA__DataSet.PredoplataView.Select("PID=" + tmPID.ToString())) { Tm.predSumma += dr.Predoplata; Tm.dolgSumma = ((___BASA__DataSet.DolgViewRow)((DataRowView)dolgDataGridView.CurrentRow.DataBoundItem).Row).dolg; Tm.dolgManyIDS[iii] = dr.ID; iii++; } Tm.PFIO = ((___BASA__DataSet.DolgViewRow)((DataRowView)dolgDataGridView.CurrentRow.DataBoundItem).Row).PFIO; Tm.ShowDialog(); dolgViewTableAdapter.Fill(___BASA__DataSet.DolgView); predoplataViewTableAdapter.Fill(___BASA__DataSet.PredoplataView); }
private void button1_Click(object sender, EventArgs e) { TakeMoney Tm = new TakeMoney(); Tm.Text = "Прием Предоплаты"; Tm.Tag = "take"; Tm.PID = (int)pFIOComboBox.SelectedValue; Tm.PFIO = pFIOComboBox.Text; Tm.ShowDialog(); dolgViewTableAdapter.Fill(___BASA__DataSet.DolgView); predoplataViewTableAdapter.Fill(___BASA__DataSet.PredoplataView); }
private void prostitToolStripMenuItem_Click(object sender, EventArgs e) { TakeMoney Tm = new TakeMoney(); Tm.Text = "ПРОЩАЕМ ДОЛГ"; Tm.Tag = "pay0"; Tm.PID = ((___BASA__DataSet.DolgViewRow)((DataRowView)dolgDataGridView.CurrentRow.DataBoundItem).Row).PID; Tm.dolgOneID = ((___BASA__DataSet.DolgViewRow)((DataRowView)dolgDataGridView.CurrentRow.DataBoundItem).Row).ID; Tm.PFIO = ((___BASA__DataSet.DolgViewRow)((DataRowView)dolgDataGridView.CurrentRow.DataBoundItem).Row).PFIO; Tm.ShowDialog(); dolgViewTableAdapter.Fill(___BASA__DataSet.DolgView); predoplataViewTableAdapter.Fill(___BASA__DataSet.PredoplataView); }
private void toolStripMenuItem1_Click(object sender, EventArgs e) { TakeMoney Tm = new TakeMoney(); Tm.Text = "Возврат Предоплаты"; Tm.Tag = "pred"; Tm.PID = ((___BASA__DataSet.PredoplataViewRow)((DataRowView)predDataGridView.CurrentRow.DataBoundItem).Row).PID; Tm.dolgOneID = ((___BASA__DataSet.PredoplataViewRow)((DataRowView)predDataGridView.CurrentRow.DataBoundItem).Row).ID; Tm.PFIO = ((___BASA__DataSet.PredoplataViewRow)((DataRowView)predDataGridView.CurrentRow.DataBoundItem).Row).PFIO; Tm.dolgSumma = ((___BASA__DataSet.PredoplataViewRow)((DataRowView)predDataGridView.CurrentRow.DataBoundItem).Row).Predoplata; Tm.ShowDialog(); dolgViewTableAdapter.Fill(___BASA__DataSet.DolgView); predoplataViewTableAdapter.Fill(___BASA__DataSet.PredoplataView); }