migratino complete
This commit is contained in:
@@ -14,14 +14,14 @@ namespace FPJ0000
|
||||
string fn_fpcolsize1 = "";
|
||||
string fn_fpcolsize2 = "";
|
||||
int projectindex = 0;
|
||||
EEEntities db;
|
||||
//EEEntities db;
|
||||
Boolean bInit = false;
|
||||
|
||||
public fProjectSchedule(int project_,bool enbEdit=true)
|
||||
{
|
||||
InitializeComponent();
|
||||
projectindex = project_;
|
||||
db = new EEEntities();//this.dsPRJ.ProjectsSchedule.TableNewRow += ProjectsSchedule_TableNewRow;
|
||||
//db = new EEEntities();//this.dsPRJ.ProjectsSchedule.TableNewRow += ProjectsSchedule_TableNewRow;
|
||||
fn_fpcolsize1 = util.MakeFilePath(util.CurrentPath, "formSetting", "fp_" + this.Name + ".ini");
|
||||
fn_fpcolsize2 = util.MakeFilePath(util.CurrentPath, "formSetting", "fp2_" + this.Name + ".ini");
|
||||
this.FormClosed += FProjectSchedule_FormClosed;
|
||||
@@ -94,15 +94,15 @@ namespace FPJ0000
|
||||
this.taProjectInfo.FillByIDX(this.dsPRJ.Projects, this.projectindex);
|
||||
|
||||
//스케쥴 그룹(no)
|
||||
var db = new EEEntities();
|
||||
var nolist = db.EETGW_ProjectsSchedule.AsNoTracking().Where(t => t.gcode == FCOMMON.info.Login.gcode && t.project == this.projectindex).GroupBy(t => t.no).ToList();
|
||||
var db = new dsPRJTableAdapters.EETGW_ProjectsScheduleTableAdapter();// EEEntities();
|
||||
var nolist = db.GetNoList(FCOMMON.info.Login.gcode, this.projectindex);//.AsNoTracking().Where(t => t.gcode == FCOMMON.info.Login.gcode && t.project == this.projectindex).GroupBy(t => t.no).ToList();
|
||||
this.comboBox1.Items.Clear();
|
||||
if (nolist.Any())
|
||||
{
|
||||
foreach (var item in nolist)
|
||||
{
|
||||
if (item.Key == null) continue;
|
||||
this.comboBox1.Items.Add(item.Key.ToString());
|
||||
if (item.IsnoNull()) continue;
|
||||
this.comboBox1.Items.Add(item.no.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -664,11 +664,8 @@ namespace FPJ0000
|
||||
//}
|
||||
|
||||
|
||||
var db = new EEEntities();
|
||||
var list = db.Common.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.grp == "21")
|
||||
.OrderBy(t => t.code)
|
||||
.ToList();
|
||||
|
||||
var db = new dsJobReportTableAdapters.CommonTableAdapter();// EEEntities();
|
||||
var list = db.GetData(FCOMMON.info.Login.gcode, "21");//.Common.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.grp == "21").OrderBy(t => t.code).ToList();
|
||||
|
||||
foreach (var item in list)
|
||||
{
|
||||
@@ -678,7 +675,6 @@ namespace FPJ0000
|
||||
newdr.seq += dsPRJ.EETGW_ProjectsSchedule.Rows.Count + 1;
|
||||
newdr.title = item.memo;
|
||||
newdr.project = this.projectindex;
|
||||
|
||||
newdr.gcode = FCOMMON.info.Login.gcode;
|
||||
dsPRJ.EETGW_ProjectsSchedule.AddEETGW_ProjectsScheduleRow(newdr);
|
||||
}
|
||||
@@ -730,9 +726,9 @@ namespace FPJ0000
|
||||
private void chkapp1_Click(object sender, EventArgs e)
|
||||
{
|
||||
//권한이 있어야한다.
|
||||
var db = new EEEntities();
|
||||
var dr = db.Auth.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.user == FCOMMON.info.Login.no).FirstOrDefault();
|
||||
if (dr == null || dr.scheapp == null || dr.scheapp < 1)
|
||||
var db = new dsPRJTableAdapters.AuthTableAdapter();// EEEntities();
|
||||
var dr = db.GetByUser(FCOMMON.info.Login.gcode, FCOMMON.info.Login.no).FirstOrDefault();//.Auth.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.user == FCOMMON.info.Login.no).FirstOrDefault();
|
||||
if (dr == null || dr.IsscheappNull() || dr.scheapp < 1)
|
||||
{
|
||||
util.MsgE("'승인권한1'이 없습니다");
|
||||
return;
|
||||
@@ -755,9 +751,9 @@ namespace FPJ0000
|
||||
private void chkapp2_Click(object sender, EventArgs e)
|
||||
{
|
||||
//권한이 있어야한다.
|
||||
var db = new EEEntities();
|
||||
var dr = db.Auth.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.user == FCOMMON.info.Login.no).FirstOrDefault();
|
||||
if (dr == null || dr.scheapp == null || dr.scheapp < 2)
|
||||
var db = new dsPRJTableAdapters.AuthTableAdapter();// EEEntities();
|
||||
var dr = db.GetByUser(FCOMMON.info.Login.gcode, FCOMMON.info.Login.no).FirstOrDefault();//.Auth.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.user == FCOMMON.info.Login.no).FirstOrDefault();
|
||||
if (dr == null || dr.IsscheappNull() || dr.scheapp < 2)
|
||||
{
|
||||
util.MsgE("'승인권한2'이 없습니다");
|
||||
return;
|
||||
@@ -789,8 +785,10 @@ namespace FPJ0000
|
||||
|
||||
//해당스케쥴의 승인상태를 확인
|
||||
var scno = int.Parse(comboBox1.Text);
|
||||
var db = new EEEntities();
|
||||
var dr = db.EETGW_ProjectsSchedule.Where(t => t.project == this.projectindex && t.no == scno).FirstOrDefault();
|
||||
var db = new dsPRJTableAdapters.EETGW_ProjectsScheduleTableAdapter();// EEEntities();
|
||||
var dr = db.GetByNo(FCOMMON.info.Login.gcode, this.projectindex, scno).FirstOrDefault();
|
||||
//.Where(t => t.project == this.projectindex && t.no == scno).FirstOrDefault();
|
||||
|
||||
if (dr == null || dr.appoval == 0)
|
||||
{
|
||||
chkapp1.Checked = false;
|
||||
|
||||
Reference in New Issue
Block a user