Files
Groupware/SubProject/FPJ0000/Project/fProejctHistory.cs
chikyun.kim 3336898dc0 파트리스트 가져오기 기능
파트리스트 구매등록 기능
2019-05-17 17:30:51 +09:00

81 lines
2.3 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace FPJ0000
{
public partial class fProejctHistory : FCOMMON.fBase
{
int pidx = 0;
public fProejctHistory(int pidx_)
{
InitializeComponent();
this.pidx = pidx_;
}
private void fProejctHistory_Load(object sender, EventArgs e)
{
try
{
this.ta.Fill(this.dsPRJ.ProjectsHistory, this.pidx);
}
catch (System.Exception ex)
{
System.Windows.Forms.MessageBox.Show(ex.Message);
}
}
private void projectsHistoryBindingNavigatorSaveItem_Click(object sender, EventArgs e)
{
this.Validate();
this.bs.EndEdit();
try
{
this.tam.UpdateAll(this.dsPRJ);
DialogResult = System.Windows.Forms.DialogResult.OK;
}catch (Exception ex)
{
FCOMMON.Util.MsgE(ex.Message);
}
}
private void fillToolStripButton_Click(object sender, EventArgs e)
{
}
private void bindingNavigatorDeleteItem_Click(object sender, EventArgs e)
{
var drv = this.bs.Current as DataRowView;
if (drv == null) return;
var dr = drv.Row as dsPRJ.ProjectsHistoryRow;
string msg = "다음 자료를 삭제하시겠습니까?\n\n" +
"등록일 : " + dr.pdate;
var dlg = FCOMMON.Util.MsgQ(msg);
if(dlg == System.Windows.Forms.DialogResult.Yes)
{
bs.RemoveCurrent();
}
}
private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
{
var newdr = this.dsPRJ.ProjectsHistory.NewProjectsHistoryRow();
newdr.pdate = DateTime.Now.ToString("yyyy-MM-dd");
newdr.wuid = FCOMMON.info.Login.no;
newdr.wdate = DateTime.Now;
newdr.remark = string.Empty;
newdr.pidx = this.pidx;
this.dsPRJ.ProjectsHistory.AddProjectsHistoryRow(newdr);
this.bs.Position = 0;
textBox1.Focus();
}
}
}