private void toolStripButton_Add_Click(object sender, EventArgs e) { if (dataGridView_Settlement.Rows.Count <= 0) { Prompt.Warning("没有结算记录,无法保存!"); return; } FrmSettleSave save = new FrmSettleSave(); save.tabMaker = Login.User.UserName; save.tabName = Login.User.ProjectName + "_" + SettlePeriod + "_跳点结算报表"; if (save.ShowDialog() == System.Windows.Forms.DialogResult.OK) { string upId = comboBox_Upgrade.SelectedValue.ToString(); if (SaveUpSettle(upId, save.tabMaker, save.tabDate, save.tabName)) { DataTable dt = (DataTable)dataGridView_Settlement.DataSource; dt.Rows.Clear(); dataGridView_Settlement.DataSource = dt; Prompt.Information("操作成功"); } } }
/// <summary> /// 保存确权结构数据 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void toolStripButton_Save_Click(object sender, EventArgs e) { if (dataGridView_Settlement.Rows.Count <= 0) { Prompt.Warning("没有结算记录,无法保存!"); return; } FrmSettleSave save = new FrmSettleSave(); save.tabMaker = Login.User.UserName; save.tabName = Login.User.ProjectName + "_" + DateTime.Now.ToShortDateString() + "_确权结算报表"; if (save.ShowDialog() == System.Windows.Forms.DialogResult.OK) { if (SaveFullSettle(save.tabMaker, save.tabDate, save.tabName)) { DataTable dt = (DataTable)dataGridView_Settlement.DataSource; dt.Rows.Clear(); dataGridView_Settlement.DataSource = dt; Prompt.Information("操作成功"); } } }