공정 항목 추가 (업무일지, 프로젝트)
구매내역에 s/c 정렬 기능 추가
This commit is contained in:
@@ -1,354 +1,354 @@
|
||||
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 FEQ0000
|
||||
{
|
||||
public partial class fImpEquipment : Form
|
||||
{
|
||||
DataTable dt = null;
|
||||
DataTable dtExcel = new DataTable();
|
||||
fEquipment.eTabletype imptype = fEquipment.eTabletype.MOLD;
|
||||
public fImpEquipment(fEquipment.eTabletype type_)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.FormClosed += __Closed;
|
||||
imptype = type_;
|
||||
|
||||
switch (imptype)
|
||||
{
|
||||
case fEquipment.eTabletype.FOL:
|
||||
dt = new dsEQ.EquipmentFDataTable();
|
||||
break;
|
||||
case fEquipment.eTabletype.MOLD:
|
||||
dt = new dsEQ.EquipmentMEDataTable();
|
||||
break;
|
||||
case fEquipment.eTabletype.BUMP:
|
||||
dt = new dsEQ.EquipmentBDataTable();
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void __Load(object sender, EventArgs e)
|
||||
{
|
||||
this.Text = string.Format("Data Import({0})", this.imptype);
|
||||
var form = this as Form;
|
||||
FCOMMON.Util.SetFormStatus(ref form, this.Name, true);
|
||||
this.Show();
|
||||
Application.DoEvents();
|
||||
}
|
||||
|
||||
void __Closed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
var form = this as Form;
|
||||
FCOMMON.Util.SetFormStatus(ref form, this.Name, false);
|
||||
}
|
||||
|
||||
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
OpenFileDialog od = new OpenFileDialog();
|
||||
od.Filter = "excel|*.xlsx|all files|*.*";
|
||||
od.InitialDirectory = FCOMMON.Util.CurrentPath + "model";
|
||||
od.FilterIndex = 1;
|
||||
od.RestoreDirectory = true;
|
||||
if (od.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
|
||||
textBox1.Text = od.FileName;
|
||||
}
|
||||
|
||||
private string[] getCSVFormat(string line)
|
||||
{
|
||||
List<string> datas = new List<string>();
|
||||
var charlist = line.ToCharArray();
|
||||
int c = 0;
|
||||
System.Text.StringBuilder sb = new StringBuilder();
|
||||
Boolean findCom = false;
|
||||
foreach (var ch in charlist)
|
||||
{
|
||||
if (ch == '"')
|
||||
{
|
||||
if (findCom == false)
|
||||
findCom = true;
|
||||
else findCom = false;
|
||||
}
|
||||
else if (ch == ',')
|
||||
{
|
||||
if (findCom)
|
||||
{
|
||||
sb.Append(ch);
|
||||
}
|
||||
else
|
||||
{
|
||||
datas.Add(sb.ToString());
|
||||
sb.Clear();
|
||||
findCom = false;
|
||||
}
|
||||
|
||||
}
|
||||
else sb.Append(ch);
|
||||
}
|
||||
return datas.ToArray();
|
||||
}
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(textBox1.Text.isEmpty())
|
||||
{
|
||||
FCOMMON.Util.MsgE("파일을 선택하세요");
|
||||
textBox1.Focus();
|
||||
return;
|
||||
}
|
||||
if(!System.IO.File.Exists(textBox1.Text))
|
||||
{
|
||||
FCOMMON.Util.MsgE("입력하신 파일이 존재하지 않습니다.");
|
||||
textBox1.Focus();
|
||||
textBox1.SelectAll();
|
||||
return;
|
||||
}
|
||||
|
||||
dtExcel.Columns.Clear();
|
||||
dtExcel.Rows.Clear();
|
||||
dtExcel.AcceptChanges();
|
||||
|
||||
libxl.Book book;// = new libxl.BinBook();
|
||||
book = new libxl.XmlBook();
|
||||
book.setKey(FCOMMON.info.libxlCompany, FCOMMON.info.libxlKey);
|
||||
try
|
||||
{
|
||||
book.load(textBox1.Text);
|
||||
}catch (Exception ex)
|
||||
{
|
||||
FCOMMON.Util.MsgE(ex.Message);
|
||||
return;
|
||||
}
|
||||
|
||||
int sheetNum = (int)numericUpDown1.Value;
|
||||
if (sheetNum >= book.sheetCount())
|
||||
{
|
||||
FCOMMON.Util.MsgE("입력한 시트 번호는 존재하지 않습니다.");
|
||||
book = null;
|
||||
return;
|
||||
}
|
||||
var sheet = book.getSheet(sheetNum);
|
||||
var MaxRow = sheet.lastRow();
|
||||
var MinRow = sheet.firstRow();
|
||||
var MaxCol = sheet.lastCol();
|
||||
var MinCol = sheet.firstCol();
|
||||
List<string> cols = new List<string>();
|
||||
bool firstRow = true;
|
||||
try{
|
||||
for (int r = MinRow; r <= MaxRow; r++)
|
||||
{
|
||||
DataRow dr = null;
|
||||
if (firstRow ==false) dr = dtExcel.NewRow();
|
||||
|
||||
Boolean nullColumn = false;
|
||||
for (int c = MinCol; c <= MaxCol; c++)
|
||||
{
|
||||
var strVallue = sheet.readStr(r, c);
|
||||
if (strVallue.isEmpty() && c == MinCol)
|
||||
{
|
||||
//첫줄 첫행이 빈값이면 처리하지 않는다.
|
||||
nullColumn = true;
|
||||
break;
|
||||
}
|
||||
if (firstRow)
|
||||
{
|
||||
cols.Add(strVallue);
|
||||
this.dtExcel.Columns.Add(strVallue);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!cols[c].isEmpty())
|
||||
dr[cols[c]] = strVallue;
|
||||
}
|
||||
}
|
||||
if (nullColumn) continue; //줄처리를 못한 경우 넘어감
|
||||
if (firstRow) firstRow = false;
|
||||
if (dr != null) dtExcel.Rows.Add(dr);
|
||||
}
|
||||
dtExcel.AcceptChanges();
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
FCOMMON.Util.MsgE("불러오는 중 오류 발생\n" + ex.Message);
|
||||
}
|
||||
//
|
||||
book = null;
|
||||
|
||||
this.bs.DataSource = dtExcel;
|
||||
this.dataGridView1.DataSource = dtExcel;
|
||||
this.bn.BindingSource = this.bs;
|
||||
|
||||
if(this.bs.Count < 1)
|
||||
{
|
||||
FCOMMON.Util.MsgE("입력된 자료가 없습니다.\n\n지정된 엑셀의 1번째 칸에 값이 없다면 입력되지 않습니다.");
|
||||
}
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
var ta = new dsEQTableAdapters.LineCodeTableAdapter();
|
||||
var lineTd = ta.GetData();
|
||||
lineTd.AcceptChanges();
|
||||
//12,13
|
||||
foreach (DataRow dr in dt.Rows)
|
||||
{
|
||||
var linecode = dr[12].ToString();
|
||||
var linedesc = dr[13].ToString();
|
||||
var codeDrows = lineTd.Select("code='" + linecode + "'");
|
||||
if (codeDrows.Length == 0)
|
||||
{
|
||||
var newdr = lineTd.NewLineCodeRow();
|
||||
newdr.code = linecode;
|
||||
newdr.memo = linedesc;
|
||||
var linebuf = linedesc.Split('-');
|
||||
if (linebuf.Length > 1)
|
||||
{
|
||||
newdr.team = linebuf[0];
|
||||
newdr.part = linebuf[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
newdr.team = linedesc;
|
||||
}
|
||||
|
||||
newdr.wuid = FCOMMON.info.Login.no;
|
||||
newdr.wdate = DateTime.Now;
|
||||
lineTd.AddLineCodeRow(newdr);
|
||||
}
|
||||
}
|
||||
ta.Update(lineTd);
|
||||
lineTd.AcceptChanges();
|
||||
FCOMMON.Util.MsgE("test");
|
||||
|
||||
}
|
||||
|
||||
private void button3_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(dtExcel == null || dtExcel.Rows.Count < 1)
|
||||
{
|
||||
FCOMMON.Util.MsgE("등록 가능한 자료가 없습니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
System.Text.StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine("다음 자료를 추가하시겠습니까?");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine("등록일 : " + dateTimePicker1.Value.ToShortDateString());
|
||||
sb.AppendLine();
|
||||
sb.AppendLine("해당 일자에 등록된 자료가 있다면 삭제 됩니다.");
|
||||
sb.AppendLine("'저장 완료' 메세지가 나올때 까지 기다려 주세요.");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine("실행 하려면 '예' 를 누르세요");
|
||||
var dlg = FCOMMON.Util.MsgQ(sb.ToString());
|
||||
if (dlg != System.Windows.Forms.DialogResult.Yes) return;
|
||||
|
||||
//라인코드를 읽어서 값을 기록해준다.
|
||||
var taLine = new dsEQTableAdapters.LineCodeTableAdapter();
|
||||
var lineTd = taLine.GetData();
|
||||
lineTd.AcceptChanges();
|
||||
|
||||
dt.Clear();
|
||||
dt.AcceptChanges();
|
||||
|
||||
var dateStr = this.dateTimePicker1.Value.ToShortDateString();
|
||||
this.progressBar1.Value = 0;
|
||||
this.progressBar1.Maximum = dtExcel.Rows.Count;
|
||||
|
||||
//12,13
|
||||
foreach (DataRow dr in dtExcel.Rows)
|
||||
{
|
||||
this.progressBar1.Value += 1;
|
||||
|
||||
var linecode = dr[12].ToString();
|
||||
var linedesc = dr[13].ToString();
|
||||
var lineT = string.Empty;
|
||||
var lineP = string.Empty;
|
||||
|
||||
//없는 라인코드는 추가
|
||||
var lineDrows = lineTd.Select("code='" + linecode + "'");
|
||||
if (lineDrows.Length == 0)
|
||||
{
|
||||
var linebuf = linedesc.Split('-');
|
||||
if (linebuf.Length > 1)
|
||||
{
|
||||
lineT = linebuf[0];
|
||||
lineP = linebuf[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
lineT = linedesc;
|
||||
lineP = string.Empty;
|
||||
}
|
||||
|
||||
|
||||
var newli = lineTd.NewLineCodeRow();
|
||||
newli.code = linecode;
|
||||
newli.team = lineT;
|
||||
newli.part = lineP;
|
||||
newli.memo = linedesc;
|
||||
newli.except = false;
|
||||
newli.wuid = FCOMMON.info.Login.no;
|
||||
newli.wdate = DateTime.Now;
|
||||
lineTd.AddLineCodeRow(newli);
|
||||
}
|
||||
else
|
||||
{
|
||||
var lineDr = lineDrows[0] as dsEQ.LineCodeRow;
|
||||
lineT = lineDr.team;
|
||||
lineP = lineDr.part;
|
||||
}
|
||||
|
||||
//데이터추가
|
||||
var newdr = dt.NewRow();
|
||||
newdr["pdate"] = dateTimePicker1.Value.ToShortDateString();
|
||||
newdr["asset"] = dr[6].ToString();
|
||||
newdr["grp"] = dr[0].ToString();
|
||||
newdr["type"] = dr[2].ToString();
|
||||
newdr["model"] = dr[3].ToString();
|
||||
newdr["linecode"] = linecode;
|
||||
newdr["lineT"] = lineT;
|
||||
newdr["lineP"] = lineP;
|
||||
newdr["serial"] = dr[7].ToString();
|
||||
newdr["manu"] = dr[9].ToString();
|
||||
newdr["primary"] = true;
|
||||
newdr["wuid"] = FCOMMON.info.Login.no;
|
||||
newdr["wdate"] = DateTime.Now;
|
||||
newdr["except"] = false;
|
||||
newdr["memo"] = string.Empty;
|
||||
if (imptype == fEquipment.eTabletype.BUMP) newdr["param1"] = "8\"";
|
||||
else newdr["param1"] = string.Empty;
|
||||
dt.Rows.Add(newdr);
|
||||
}
|
||||
|
||||
taLine.Update(lineTd);
|
||||
lineTd.AcceptChanges();
|
||||
|
||||
switch (imptype)
|
||||
{
|
||||
case fEquipment.eTabletype.MOLD:
|
||||
var taE = new dsEQTableAdapters.EquipmentMETableAdapter();
|
||||
taE.DeleteData(dateStr);
|
||||
taE.Update((dsEQ.EquipmentMEDataTable)dt);
|
||||
break;
|
||||
case fEquipment.eTabletype.BUMP:
|
||||
var taB = new dsEQTableAdapters.EquipmentBTableAdapter();
|
||||
taB.DeleteData(dateStr);
|
||||
taB.Update((dsEQ.EquipmentBDataTable)dt);
|
||||
break;
|
||||
case fEquipment.eTabletype.FOL:
|
||||
var taF = new dsEQTableAdapters.EquipmentFTableAdapter();
|
||||
taF.DeleteData(dateStr);
|
||||
taF.Update((dsEQ.EquipmentFDataTable)dt);
|
||||
break;
|
||||
}
|
||||
dt.AcceptChanges();
|
||||
FCOMMON.Util.MsgI("Save OK");
|
||||
}
|
||||
}
|
||||
}
|
||||
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 FEQ0000
|
||||
{
|
||||
public partial class fImpEquipment : Form
|
||||
{
|
||||
DataTable dt = null;
|
||||
DataTable dtExcel = new DataTable();
|
||||
fEquipment.eTabletype imptype = fEquipment.eTabletype.MOLD;
|
||||
public fImpEquipment(fEquipment.eTabletype type_)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.FormClosed += __Closed;
|
||||
imptype = type_;
|
||||
|
||||
switch (imptype)
|
||||
{
|
||||
case fEquipment.eTabletype.FOL:
|
||||
dt = new dsEQ.EquipmentFDataTable();
|
||||
break;
|
||||
case fEquipment.eTabletype.MOLD:
|
||||
dt = new dsEQ.EquipmentMEDataTable();
|
||||
break;
|
||||
case fEquipment.eTabletype.BUMP:
|
||||
dt = new dsEQ.EquipmentBDataTable();
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void __Load(object sender, EventArgs e)
|
||||
{
|
||||
this.Text = string.Format("Data Import({0})", this.imptype);
|
||||
var form = this as Form;
|
||||
FCOMMON.Util.SetFormStatus(ref form, this.Name, true);
|
||||
this.Show();
|
||||
Application.DoEvents();
|
||||
}
|
||||
|
||||
void __Closed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
var form = this as Form;
|
||||
FCOMMON.Util.SetFormStatus(ref form, this.Name, false);
|
||||
}
|
||||
|
||||
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
OpenFileDialog od = new OpenFileDialog();
|
||||
od.Filter = "excel|*.xlsx|all files|*.*";
|
||||
od.InitialDirectory = FCOMMON.Util.CurrentPath + "model";
|
||||
od.FilterIndex = 1;
|
||||
od.RestoreDirectory = true;
|
||||
if (od.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
|
||||
textBox1.Text = od.FileName;
|
||||
}
|
||||
|
||||
private string[] getCSVFormat(string line)
|
||||
{
|
||||
List<string> datas = new List<string>();
|
||||
var charlist = line.ToCharArray();
|
||||
// int c = 0;
|
||||
System.Text.StringBuilder sb = new StringBuilder();
|
||||
Boolean findCom = false;
|
||||
foreach (var ch in charlist)
|
||||
{
|
||||
if (ch == '"')
|
||||
{
|
||||
if (findCom == false)
|
||||
findCom = true;
|
||||
else findCom = false;
|
||||
}
|
||||
else if (ch == ',')
|
||||
{
|
||||
if (findCom)
|
||||
{
|
||||
sb.Append(ch);
|
||||
}
|
||||
else
|
||||
{
|
||||
datas.Add(sb.ToString());
|
||||
sb.Clear();
|
||||
findCom = false;
|
||||
}
|
||||
|
||||
}
|
||||
else sb.Append(ch);
|
||||
}
|
||||
return datas.ToArray();
|
||||
}
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(textBox1.Text.isEmpty())
|
||||
{
|
||||
FCOMMON.Util.MsgE("파일을 선택하세요");
|
||||
textBox1.Focus();
|
||||
return;
|
||||
}
|
||||
if(!System.IO.File.Exists(textBox1.Text))
|
||||
{
|
||||
FCOMMON.Util.MsgE("입력하신 파일이 존재하지 않습니다.");
|
||||
textBox1.Focus();
|
||||
textBox1.SelectAll();
|
||||
return;
|
||||
}
|
||||
|
||||
dtExcel.Columns.Clear();
|
||||
dtExcel.Rows.Clear();
|
||||
dtExcel.AcceptChanges();
|
||||
|
||||
libxl.Book book;// = new libxl.BinBook();
|
||||
book = new libxl.XmlBook();
|
||||
book.setKey(FCOMMON.info.libxlCompany, FCOMMON.info.libxlKey);
|
||||
try
|
||||
{
|
||||
book.load(textBox1.Text);
|
||||
}catch (Exception ex)
|
||||
{
|
||||
FCOMMON.Util.MsgE(ex.Message);
|
||||
return;
|
||||
}
|
||||
|
||||
int sheetNum = (int)numericUpDown1.Value;
|
||||
if (sheetNum >= book.sheetCount())
|
||||
{
|
||||
FCOMMON.Util.MsgE("입력한 시트 번호는 존재하지 않습니다.");
|
||||
book = null;
|
||||
return;
|
||||
}
|
||||
var sheet = book.getSheet(sheetNum);
|
||||
var MaxRow = sheet.lastRow();
|
||||
var MinRow = sheet.firstRow();
|
||||
var MaxCol = sheet.lastCol();
|
||||
var MinCol = sheet.firstCol();
|
||||
List<string> cols = new List<string>();
|
||||
bool firstRow = true;
|
||||
try{
|
||||
for (int r = MinRow; r <= MaxRow; r++)
|
||||
{
|
||||
DataRow dr = null;
|
||||
if (firstRow ==false) dr = dtExcel.NewRow();
|
||||
|
||||
Boolean nullColumn = false;
|
||||
for (int c = MinCol; c <= MaxCol; c++)
|
||||
{
|
||||
var strVallue = sheet.readStr(r, c);
|
||||
if (strVallue.isEmpty() && c == MinCol)
|
||||
{
|
||||
//첫줄 첫행이 빈값이면 처리하지 않는다.
|
||||
nullColumn = true;
|
||||
break;
|
||||
}
|
||||
if (firstRow)
|
||||
{
|
||||
cols.Add(strVallue);
|
||||
this.dtExcel.Columns.Add(strVallue);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!cols[c].isEmpty())
|
||||
dr[cols[c]] = strVallue;
|
||||
}
|
||||
}
|
||||
if (nullColumn) continue; //줄처리를 못한 경우 넘어감
|
||||
if (firstRow) firstRow = false;
|
||||
if (dr != null) dtExcel.Rows.Add(dr);
|
||||
}
|
||||
dtExcel.AcceptChanges();
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
FCOMMON.Util.MsgE("불러오는 중 오류 발생\n" + ex.Message);
|
||||
}
|
||||
//
|
||||
book = null;
|
||||
|
||||
this.bs.DataSource = dtExcel;
|
||||
this.dataGridView1.DataSource = dtExcel;
|
||||
this.bn.BindingSource = this.bs;
|
||||
|
||||
if(this.bs.Count < 1)
|
||||
{
|
||||
FCOMMON.Util.MsgE("입력된 자료가 없습니다.\n\n지정된 엑셀의 1번째 칸에 값이 없다면 입력되지 않습니다.");
|
||||
}
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
var ta = new dsEQTableAdapters.LineCodeTableAdapter();
|
||||
var lineTd = ta.GetData();
|
||||
lineTd.AcceptChanges();
|
||||
//12,13
|
||||
foreach (DataRow dr in dt.Rows)
|
||||
{
|
||||
var linecode = dr[12].ToString();
|
||||
var linedesc = dr[13].ToString();
|
||||
var codeDrows = lineTd.Select("code='" + linecode + "'");
|
||||
if (codeDrows.Length == 0)
|
||||
{
|
||||
var newdr = lineTd.NewLineCodeRow();
|
||||
newdr.code = linecode;
|
||||
newdr.memo = linedesc;
|
||||
var linebuf = linedesc.Split('-');
|
||||
if (linebuf.Length > 1)
|
||||
{
|
||||
newdr.team = linebuf[0];
|
||||
newdr.part = linebuf[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
newdr.team = linedesc;
|
||||
}
|
||||
|
||||
newdr.wuid = FCOMMON.info.Login.no;
|
||||
newdr.wdate = DateTime.Now;
|
||||
lineTd.AddLineCodeRow(newdr);
|
||||
}
|
||||
}
|
||||
ta.Update(lineTd);
|
||||
lineTd.AcceptChanges();
|
||||
FCOMMON.Util.MsgE("test");
|
||||
|
||||
}
|
||||
|
||||
private void button3_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(dtExcel == null || dtExcel.Rows.Count < 1)
|
||||
{
|
||||
FCOMMON.Util.MsgE("등록 가능한 자료가 없습니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
System.Text.StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine("다음 자료를 추가하시겠습니까?");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine("등록일 : " + dateTimePicker1.Value.ToShortDateString());
|
||||
sb.AppendLine();
|
||||
sb.AppendLine("해당 일자에 등록된 자료가 있다면 삭제 됩니다.");
|
||||
sb.AppendLine("'저장 완료' 메세지가 나올때 까지 기다려 주세요.");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine("실행 하려면 '예' 를 누르세요");
|
||||
var dlg = FCOMMON.Util.MsgQ(sb.ToString());
|
||||
if (dlg != System.Windows.Forms.DialogResult.Yes) return;
|
||||
|
||||
//라인코드를 읽어서 값을 기록해준다.
|
||||
var taLine = new dsEQTableAdapters.LineCodeTableAdapter();
|
||||
var lineTd = taLine.GetData();
|
||||
lineTd.AcceptChanges();
|
||||
|
||||
dt.Clear();
|
||||
dt.AcceptChanges();
|
||||
|
||||
var dateStr = this.dateTimePicker1.Value.ToShortDateString();
|
||||
this.progressBar1.Value = 0;
|
||||
this.progressBar1.Maximum = dtExcel.Rows.Count;
|
||||
|
||||
//12,13
|
||||
foreach (DataRow dr in dtExcel.Rows)
|
||||
{
|
||||
this.progressBar1.Value += 1;
|
||||
|
||||
var linecode = dr[12].ToString();
|
||||
var linedesc = dr[13].ToString();
|
||||
var lineT = string.Empty;
|
||||
var lineP = string.Empty;
|
||||
|
||||
//없는 라인코드는 추가
|
||||
var lineDrows = lineTd.Select("code='" + linecode + "'");
|
||||
if (lineDrows.Length == 0)
|
||||
{
|
||||
var linebuf = linedesc.Split('-');
|
||||
if (linebuf.Length > 1)
|
||||
{
|
||||
lineT = linebuf[0];
|
||||
lineP = linebuf[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
lineT = linedesc;
|
||||
lineP = string.Empty;
|
||||
}
|
||||
|
||||
|
||||
var newli = lineTd.NewLineCodeRow();
|
||||
newli.code = linecode;
|
||||
newli.team = lineT;
|
||||
newli.part = lineP;
|
||||
newli.memo = linedesc;
|
||||
newli.except = false;
|
||||
newli.wuid = FCOMMON.info.Login.no;
|
||||
newli.wdate = DateTime.Now;
|
||||
lineTd.AddLineCodeRow(newli);
|
||||
}
|
||||
else
|
||||
{
|
||||
var lineDr = lineDrows[0] as dsEQ.LineCodeRow;
|
||||
lineT = lineDr.team;
|
||||
lineP = lineDr.part;
|
||||
}
|
||||
|
||||
//데이터추가
|
||||
var newdr = dt.NewRow();
|
||||
newdr["pdate"] = dateTimePicker1.Value.ToShortDateString();
|
||||
newdr["asset"] = dr[6].ToString();
|
||||
newdr["grp"] = dr[0].ToString();
|
||||
newdr["type"] = dr[2].ToString();
|
||||
newdr["model"] = dr[3].ToString();
|
||||
newdr["linecode"] = linecode;
|
||||
newdr["lineT"] = lineT;
|
||||
newdr["lineP"] = lineP;
|
||||
newdr["serial"] = dr[7].ToString();
|
||||
newdr["manu"] = dr[9].ToString();
|
||||
newdr["primary"] = true;
|
||||
newdr["wuid"] = FCOMMON.info.Login.no;
|
||||
newdr["wdate"] = DateTime.Now;
|
||||
newdr["except"] = false;
|
||||
newdr["memo"] = string.Empty;
|
||||
if (imptype == fEquipment.eTabletype.BUMP) newdr["param1"] = "8\"";
|
||||
else newdr["param1"] = string.Empty;
|
||||
dt.Rows.Add(newdr);
|
||||
}
|
||||
|
||||
taLine.Update(lineTd);
|
||||
lineTd.AcceptChanges();
|
||||
|
||||
switch (imptype)
|
||||
{
|
||||
case fEquipment.eTabletype.MOLD:
|
||||
var taE = new dsEQTableAdapters.EquipmentMETableAdapter();
|
||||
taE.DeleteData(dateStr);
|
||||
taE.Update((dsEQ.EquipmentMEDataTable)dt);
|
||||
break;
|
||||
case fEquipment.eTabletype.BUMP:
|
||||
var taB = new dsEQTableAdapters.EquipmentBTableAdapter();
|
||||
taB.DeleteData(dateStr);
|
||||
taB.Update((dsEQ.EquipmentBDataTable)dt);
|
||||
break;
|
||||
case fEquipment.eTabletype.FOL:
|
||||
var taF = new dsEQTableAdapters.EquipmentFTableAdapter();
|
||||
taF.DeleteData(dateStr);
|
||||
taF.Update((dsEQ.EquipmentFDataTable)dt);
|
||||
break;
|
||||
}
|
||||
dt.AcceptChanges();
|
||||
FCOMMON.Util.MsgI("Save OK");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
188
SubProject/FEQ0000/Purchase/fPurchase.Designer.cs
generated
188
SubProject/FEQ0000/Purchase/fPurchase.Designer.cs
generated
@@ -30,31 +30,31 @@
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fPurchase));
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType1 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType2 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType3 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType4 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType5 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType6 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType7 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType8 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType9 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType10 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.NumberCellType numberCellType1 = new FarPoint.Win.Spread.CellType.NumberCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType11 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType12 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.NumberCellType numberCellType2 = new FarPoint.Win.Spread.CellType.NumberCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType13 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.NumberCellType numberCellType3 = new FarPoint.Win.Spread.CellType.NumberCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType14 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.NumberCellType numberCellType4 = new FarPoint.Win.Spread.CellType.NumberCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType15 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.NumberCellType numberCellType5 = new FarPoint.Win.Spread.CellType.NumberCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType16 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType17 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType18 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType19 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.CheckBoxCellType checkBoxCellType1 = new FarPoint.Win.Spread.CellType.CheckBoxCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType20 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType21 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType22 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType23 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType24 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType25 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType26 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType27 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType28 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType29 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.NumberCellType numberCellType6 = new FarPoint.Win.Spread.CellType.NumberCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType30 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType31 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.NumberCellType numberCellType7 = new FarPoint.Win.Spread.CellType.NumberCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType32 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.NumberCellType numberCellType8 = new FarPoint.Win.Spread.CellType.NumberCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType33 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.NumberCellType numberCellType9 = new FarPoint.Win.Spread.CellType.NumberCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType34 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.NumberCellType numberCellType10 = new FarPoint.Win.Spread.CellType.NumberCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType35 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType36 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType37 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType38 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.CheckBoxCellType checkBoxCellType2 = new FarPoint.Win.Spread.CellType.CheckBoxCellType();
|
||||
this.dsPurchase = new FEQ0000.dsPurchase();
|
||||
this.bs = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.ta = new FEQ0000.dsPurchaseTableAdapters.PurchaseTableAdapter();
|
||||
@@ -120,6 +120,8 @@
|
||||
this.btViewDel = new System.Windows.Forms.ToolStripButton();
|
||||
this.fpSpread1 = new FarPoint.Win.Spread.FpSpread();
|
||||
this.fpSpread1_Sheet1 = new FarPoint.Win.Spread.SheetView();
|
||||
this.toolStripLabel4 = new System.Windows.Forms.ToolStripLabel();
|
||||
this.cmbSort = new System.Windows.Forms.ToolStripComboBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dsPurchase)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bn)).BeginInit();
|
||||
@@ -187,7 +189,7 @@
|
||||
this.bn.MovePreviousItem = this.bindingNavigatorMovePreviousItem;
|
||||
this.bn.Name = "bn";
|
||||
this.bn.PositionItem = this.bindingNavigatorPositionItem;
|
||||
this.bn.Size = new System.Drawing.Size(1028, 26);
|
||||
this.bn.Size = new System.Drawing.Size(1184, 26);
|
||||
this.bn.TabIndex = 0;
|
||||
this.bn.Text = "bindingNavigator1";
|
||||
//
|
||||
@@ -495,6 +497,8 @@
|
||||
this.dtSD,
|
||||
this.lbEnd,
|
||||
this.dtED,
|
||||
this.toolStripLabel4,
|
||||
this.cmbSort,
|
||||
this.toolStripSeparator2,
|
||||
this.toolStripLabel1,
|
||||
this.cmbState,
|
||||
@@ -509,7 +513,7 @@
|
||||
this.btViewDel});
|
||||
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.toolStrip1.Name = "toolStrip1";
|
||||
this.toolStrip1.Size = new System.Drawing.Size(1028, 37);
|
||||
this.toolStrip1.Size = new System.Drawing.Size(1184, 37);
|
||||
this.toolStrip1.TabIndex = 3;
|
||||
this.toolStrip1.Text = "toolStrip1";
|
||||
//
|
||||
@@ -611,8 +615,8 @@
|
||||
this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image")));
|
||||
this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.toolStripDropDownButton1.Name = "toolStripDropDownButton1";
|
||||
this.toolStripDropDownButton1.Size = new System.Drawing.Size(116, 34);
|
||||
this.toolStripDropDownButton1.Text = "Quick Menu";
|
||||
this.toolStripDropDownButton1.Size = new System.Drawing.Size(81, 34);
|
||||
this.toolStripDropDownButton1.Text = "Quick";
|
||||
//
|
||||
// 금일입고품목ToolStripMenuItem
|
||||
//
|
||||
@@ -667,7 +671,7 @@
|
||||
this.fpSpread1.Name = "fpSpread1";
|
||||
this.fpSpread1.Sheets.AddRange(new FarPoint.Win.Spread.SheetView[] {
|
||||
this.fpSpread1_Sheet1});
|
||||
this.fpSpread1.Size = new System.Drawing.Size(1028, 602);
|
||||
this.fpSpread1.Size = new System.Drawing.Size(1184, 602);
|
||||
this.fpSpread1.StatusBarVisible = true;
|
||||
this.fpSpread1.TabIndex = 4;
|
||||
//
|
||||
@@ -712,7 +716,7 @@
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Rows.Get(0).Height = 37F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(0).AllowAutoFilter = true;
|
||||
this.fpSpread1_Sheet1.Columns.Get(0).AllowAutoSort = true;
|
||||
this.fpSpread1_Sheet1.Columns.Get(0).CellType = textCellType1;
|
||||
this.fpSpread1_Sheet1.Columns.Get(0).CellType = textCellType20;
|
||||
this.fpSpread1_Sheet1.Columns.Get(0).DataField = "pdate";
|
||||
this.fpSpread1_Sheet1.Columns.Get(0).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(0).Label = "등록일";
|
||||
@@ -720,7 +724,7 @@
|
||||
this.fpSpread1_Sheet1.Columns.Get(0).Width = 77F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(1).AllowAutoFilter = true;
|
||||
this.fpSpread1_Sheet1.Columns.Get(1).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
||||
this.fpSpread1_Sheet1.Columns.Get(1).CellType = textCellType2;
|
||||
this.fpSpread1_Sheet1.Columns.Get(1).CellType = textCellType21;
|
||||
this.fpSpread1_Sheet1.Columns.Get(1).DataField = "state";
|
||||
this.fpSpread1_Sheet1.Columns.Get(1).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(1).Label = "상태";
|
||||
@@ -728,164 +732,164 @@
|
||||
this.fpSpread1_Sheet1.Columns.Get(1).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(1).Width = 49F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(2).AllowAutoFilter = true;
|
||||
this.fpSpread1_Sheet1.Columns.Get(2).CellType = textCellType3;
|
||||
this.fpSpread1_Sheet1.Columns.Get(2).CellType = textCellType22;
|
||||
this.fpSpread1_Sheet1.Columns.Get(2).DataField = "place";
|
||||
this.fpSpread1_Sheet1.Columns.Get(2).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(2).Label = "보관소";
|
||||
this.fpSpread1_Sheet1.Columns.Get(2).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).AllowAutoFilter = true;
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).CellType = textCellType4;
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).CellType = textCellType23;
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).DataField = "process";
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).Label = "공정";
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).Width = 49F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(4).AllowAutoFilter = true;
|
||||
this.fpSpread1_Sheet1.Columns.Get(4).CellType = textCellType5;
|
||||
this.fpSpread1_Sheet1.Columns.Get(4).CellType = textCellType24;
|
||||
this.fpSpread1_Sheet1.Columns.Get(4).DataField = "requestName";
|
||||
this.fpSpread1_Sheet1.Columns.Get(4).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
|
||||
this.fpSpread1_Sheet1.Columns.Get(4).Label = "요청";
|
||||
this.fpSpread1_Sheet1.Columns.Get(4).Width = 37F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(5).CellType = textCellType6;
|
||||
this.fpSpread1_Sheet1.Columns.Get(5).CellType = textCellType25;
|
||||
this.fpSpread1_Sheet1.Columns.Get(5).DataField = "sc";
|
||||
this.fpSpread1_Sheet1.Columns.Get(5).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(5).Label = "SC#";
|
||||
this.fpSpread1_Sheet1.Columns.Get(5).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(5).Width = 24F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(6).CellType = textCellType7;
|
||||
this.fpSpread1_Sheet1.Columns.Get(6).CellType = textCellType26;
|
||||
this.fpSpread1_Sheet1.Columns.Get(6).DataField = "orderno";
|
||||
this.fpSpread1_Sheet1.Columns.Get(6).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(6).Label = "CR/CF#";
|
||||
this.fpSpread1_Sheet1.Columns.Get(6).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(6).Width = 43F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(7).CellType = textCellType8;
|
||||
this.fpSpread1_Sheet1.Columns.Get(7).CellType = textCellType27;
|
||||
this.fpSpread1_Sheet1.Columns.Get(7).DataField = "receiveName";
|
||||
this.fpSpread1_Sheet1.Columns.Get(7).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
|
||||
this.fpSpread1_Sheet1.Columns.Get(7).Label = "수령";
|
||||
this.fpSpread1_Sheet1.Columns.Get(7).Width = 33F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).AllowAutoSort = true;
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).CellType = textCellType9;
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).CellType = textCellType28;
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).DataField = "sid";
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).Label = "SID#";
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).Width = 51F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(9).CellType = textCellType10;
|
||||
this.fpSpread1_Sheet1.Columns.Get(9).CellType = textCellType29;
|
||||
this.fpSpread1_Sheet1.Columns.Get(9).DataField = "pumname";
|
||||
this.fpSpread1_Sheet1.Columns.Get(9).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
|
||||
this.fpSpread1_Sheet1.Columns.Get(9).Label = "품명";
|
||||
this.fpSpread1_Sheet1.Columns.Get(9).Width = 33F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(10).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
||||
numberCellType1.DecimalPlaces = 0;
|
||||
numberCellType1.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes;
|
||||
numberCellType1.MaximumValue = 2147483647D;
|
||||
numberCellType1.MinimumValue = -2147483648D;
|
||||
this.fpSpread1_Sheet1.Columns.Get(10).CellType = numberCellType1;
|
||||
numberCellType6.DecimalPlaces = 0;
|
||||
numberCellType6.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes;
|
||||
numberCellType6.MaximumValue = 2147483647D;
|
||||
numberCellType6.MinimumValue = -2147483648D;
|
||||
this.fpSpread1_Sheet1.Columns.Get(10).CellType = numberCellType6;
|
||||
this.fpSpread1_Sheet1.Columns.Get(10).DataField = "pumidx";
|
||||
this.fpSpread1_Sheet1.Columns.Get(10).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(10).Label = "*";
|
||||
this.fpSpread1_Sheet1.Columns.Get(10).Width = 14F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(11).CellType = textCellType11;
|
||||
this.fpSpread1_Sheet1.Columns.Get(11).CellType = textCellType30;
|
||||
this.fpSpread1_Sheet1.Columns.Get(11).DataField = "pumscale";
|
||||
this.fpSpread1_Sheet1.Columns.Get(11).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
|
||||
this.fpSpread1_Sheet1.Columns.Get(11).Label = "규격";
|
||||
this.fpSpread1_Sheet1.Columns.Get(11).Width = 33F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(12).CellType = textCellType12;
|
||||
this.fpSpread1_Sheet1.Columns.Get(12).CellType = textCellType31;
|
||||
this.fpSpread1_Sheet1.Columns.Get(12).DataField = "dept";
|
||||
this.fpSpread1_Sheet1.Columns.Get(12).Label = "장비\r\n제조사";
|
||||
this.fpSpread1_Sheet1.Columns.Get(12).Width = 45F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(13).CellType = textCellType12;
|
||||
this.fpSpread1_Sheet1.Columns.Get(13).CellType = textCellType31;
|
||||
this.fpSpread1_Sheet1.Columns.Get(13).DataField = "manuproc";
|
||||
this.fpSpread1_Sheet1.Columns.Get(13).Label = "제조\r\n공정";
|
||||
this.fpSpread1_Sheet1.Columns.Get(13).Width = 33F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(14).CellType = textCellType12;
|
||||
this.fpSpread1_Sheet1.Columns.Get(14).CellType = textCellType31;
|
||||
this.fpSpread1_Sheet1.Columns.Get(14).DataField = "asset";
|
||||
this.fpSpread1_Sheet1.Columns.Get(14).Label = "장비\r\n모델";
|
||||
this.fpSpread1_Sheet1.Columns.Get(14).Width = 33F;
|
||||
numberCellType2.DecimalPlaces = 0;
|
||||
numberCellType2.NegativeRed = true;
|
||||
numberCellType2.NullDisplay = "--";
|
||||
numberCellType2.Separator = ",";
|
||||
numberCellType2.ShowSeparator = true;
|
||||
numberCellType2.ShrinkToFit = true;
|
||||
this.fpSpread1_Sheet1.Columns.Get(15).CellType = numberCellType2;
|
||||
numberCellType7.DecimalPlaces = 0;
|
||||
numberCellType7.NegativeRed = true;
|
||||
numberCellType7.NullDisplay = "--";
|
||||
numberCellType7.Separator = ",";
|
||||
numberCellType7.ShowSeparator = true;
|
||||
numberCellType7.ShrinkToFit = true;
|
||||
this.fpSpread1_Sheet1.Columns.Get(15).CellType = numberCellType7;
|
||||
this.fpSpread1_Sheet1.Columns.Get(15).DataField = "pumqty";
|
||||
this.fpSpread1_Sheet1.Columns.Get(15).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(15).Label = "수량";
|
||||
this.fpSpread1_Sheet1.Columns.Get(15).Width = 33F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(16).CellType = textCellType13;
|
||||
this.fpSpread1_Sheet1.Columns.Get(16).CellType = textCellType32;
|
||||
this.fpSpread1_Sheet1.Columns.Get(16).DataField = "pumunit";
|
||||
this.fpSpread1_Sheet1.Columns.Get(16).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(16).Label = "단위";
|
||||
this.fpSpread1_Sheet1.Columns.Get(16).Width = 33F;
|
||||
numberCellType3.DecimalPlaces = 0;
|
||||
numberCellType3.NegativeRed = true;
|
||||
numberCellType3.NullDisplay = "--";
|
||||
numberCellType3.Separator = ",";
|
||||
numberCellType3.ShowSeparator = true;
|
||||
numberCellType3.ShrinkToFit = true;
|
||||
this.fpSpread1_Sheet1.Columns.Get(17).CellType = numberCellType3;
|
||||
numberCellType8.DecimalPlaces = 0;
|
||||
numberCellType8.NegativeRed = true;
|
||||
numberCellType8.NullDisplay = "--";
|
||||
numberCellType8.Separator = ",";
|
||||
numberCellType8.ShowSeparator = true;
|
||||
numberCellType8.ShrinkToFit = true;
|
||||
this.fpSpread1_Sheet1.Columns.Get(17).CellType = numberCellType8;
|
||||
this.fpSpread1_Sheet1.Columns.Get(17).DataField = "pumprice";
|
||||
this.fpSpread1_Sheet1.Columns.Get(17).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right;
|
||||
this.fpSpread1_Sheet1.Columns.Get(17).Label = "단가";
|
||||
this.fpSpread1_Sheet1.Columns.Get(17).Width = 33F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(18).CellType = numberCellType3;
|
||||
this.fpSpread1_Sheet1.Columns.Get(18).CellType = numberCellType8;
|
||||
this.fpSpread1_Sheet1.Columns.Get(18).DataField = "pumamt";
|
||||
this.fpSpread1_Sheet1.Columns.Get(18).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right;
|
||||
this.fpSpread1_Sheet1.Columns.Get(18).Label = "합계금액";
|
||||
this.fpSpread1_Sheet1.Columns.Get(18).Width = 33F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(19).AllowAutoFilter = true;
|
||||
this.fpSpread1_Sheet1.Columns.Get(19).CellType = textCellType14;
|
||||
this.fpSpread1_Sheet1.Columns.Get(19).CellType = textCellType33;
|
||||
this.fpSpread1_Sheet1.Columns.Get(19).DataField = "supply";
|
||||
this.fpSpread1_Sheet1.Columns.Get(19).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
|
||||
this.fpSpread1_Sheet1.Columns.Get(19).Label = "공급업체";
|
||||
this.fpSpread1_Sheet1.Columns.Get(19).Width = 49F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(20).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
||||
numberCellType4.DecimalPlaces = 0;
|
||||
numberCellType4.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes;
|
||||
numberCellType4.MaximumValue = 2147483647D;
|
||||
numberCellType4.MinimumValue = -2147483648D;
|
||||
this.fpSpread1_Sheet1.Columns.Get(20).CellType = numberCellType4;
|
||||
numberCellType9.DecimalPlaces = 0;
|
||||
numberCellType9.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes;
|
||||
numberCellType9.MaximumValue = 2147483647D;
|
||||
numberCellType9.MinimumValue = -2147483648D;
|
||||
this.fpSpread1_Sheet1.Columns.Get(20).CellType = numberCellType9;
|
||||
this.fpSpread1_Sheet1.Columns.Get(20).DataField = "supplyidx";
|
||||
this.fpSpread1_Sheet1.Columns.Get(20).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(20).Label = "*";
|
||||
this.fpSpread1_Sheet1.Columns.Get(20).Width = 14F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(21).CellType = textCellType15;
|
||||
this.fpSpread1_Sheet1.Columns.Get(21).CellType = textCellType34;
|
||||
this.fpSpread1_Sheet1.Columns.Get(21).DataField = "project";
|
||||
this.fpSpread1_Sheet1.Columns.Get(21).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
|
||||
this.fpSpread1_Sheet1.Columns.Get(21).Label = "관련프로젝트";
|
||||
this.fpSpread1_Sheet1.Columns.Get(21).Width = 45F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(22).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
||||
numberCellType5.DecimalPlaces = 0;
|
||||
numberCellType5.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes;
|
||||
numberCellType5.MaximumValue = 2147483647D;
|
||||
numberCellType5.MinimumValue = -2147483648D;
|
||||
this.fpSpread1_Sheet1.Columns.Get(22).CellType = numberCellType5;
|
||||
numberCellType10.DecimalPlaces = 0;
|
||||
numberCellType10.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes;
|
||||
numberCellType10.MaximumValue = 2147483647D;
|
||||
numberCellType10.MinimumValue = -2147483648D;
|
||||
this.fpSpread1_Sheet1.Columns.Get(22).CellType = numberCellType10;
|
||||
this.fpSpread1_Sheet1.Columns.Get(22).DataField = "projectidx";
|
||||
this.fpSpread1_Sheet1.Columns.Get(22).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(22).Label = "*";
|
||||
this.fpSpread1_Sheet1.Columns.Get(22).Width = 14F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(23).CellType = textCellType16;
|
||||
this.fpSpread1_Sheet1.Columns.Get(23).CellType = textCellType35;
|
||||
this.fpSpread1_Sheet1.Columns.Get(23).DataField = "edate";
|
||||
this.fpSpread1_Sheet1.Columns.Get(23).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(23).Label = "입고예정";
|
||||
this.fpSpread1_Sheet1.Columns.Get(23).Width = 33F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(24).CellType = textCellType17;
|
||||
this.fpSpread1_Sheet1.Columns.Get(24).CellType = textCellType36;
|
||||
this.fpSpread1_Sheet1.Columns.Get(24).DataField = "indate";
|
||||
this.fpSpread1_Sheet1.Columns.Get(24).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(24).Label = "입고일";
|
||||
this.fpSpread1_Sheet1.Columns.Get(24).Width = 33F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(25).CellType = textCellType18;
|
||||
this.fpSpread1_Sheet1.Columns.Get(25).CellType = textCellType37;
|
||||
this.fpSpread1_Sheet1.Columns.Get(25).DataField = "po";
|
||||
this.fpSpread1_Sheet1.Columns.Get(25).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(25).Label = "PO#";
|
||||
this.fpSpread1_Sheet1.Columns.Get(25).Width = 32F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(26).CellType = textCellType19;
|
||||
this.fpSpread1_Sheet1.Columns.Get(26).CellType = textCellType38;
|
||||
this.fpSpread1_Sheet1.Columns.Get(26).DataField = "bigo";
|
||||
this.fpSpread1_Sheet1.Columns.Get(26).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
|
||||
this.fpSpread1_Sheet1.Columns.Get(26).Label = "비고";
|
||||
this.fpSpread1_Sheet1.Columns.Get(26).Width = 33F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(27).CellType = checkBoxCellType1;
|
||||
this.fpSpread1_Sheet1.Columns.Get(27).CellType = checkBoxCellType2;
|
||||
this.fpSpread1_Sheet1.Columns.Get(27).DataField = "isdel";
|
||||
this.fpSpread1_Sheet1.Columns.Get(27).Label = "삭제됨";
|
||||
this.fpSpread1_Sheet1.Columns.Get(27).Tag = "isdel";
|
||||
@@ -896,11 +900,27 @@
|
||||
this.fpSpread1_Sheet1.RowHeader.Columns.Default.Resizable = false;
|
||||
this.fpSpread1_Sheet1.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.A1;
|
||||
//
|
||||
// toolStripLabel4
|
||||
//
|
||||
this.toolStripLabel4.Name = "toolStripLabel4";
|
||||
this.toolStripLabel4.Size = new System.Drawing.Size(31, 34);
|
||||
this.toolStripLabel4.Text = "정렬";
|
||||
//
|
||||
// cmbSort
|
||||
//
|
||||
this.cmbSort.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbSort.Items.AddRange(new object[] {
|
||||
"등록일",
|
||||
"완료일",
|
||||
"S/C"});
|
||||
this.cmbSort.Name = "cmbSort";
|
||||
this.cmbSort.Size = new System.Drawing.Size(90, 37);
|
||||
//
|
||||
// fPurchase
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1028, 665);
|
||||
this.ClientSize = new System.Drawing.Size(1184, 665);
|
||||
this.Controls.Add(this.fpSpread1);
|
||||
this.Controls.Add(this.toolStrip1);
|
||||
this.Controls.Add(this.bn);
|
||||
@@ -990,5 +1010,7 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem 추가ToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripButton toolStripButton2;
|
||||
private FarPoint.Win.Spread.SheetView fpSpread1_Sheet1;
|
||||
private System.Windows.Forms.ToolStripLabel toolStripLabel4;
|
||||
private System.Windows.Forms.ToolStripComboBox cmbSort;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,6 +82,7 @@ namespace FEQ0000
|
||||
{
|
||||
this.cmDate.SelectedIndex = 0;
|
||||
this.tbRequest.Text = string.Empty; //양진원 FCOMMON.info.Login.nameK;
|
||||
this.cmbSort.SelectedIndex = 0;
|
||||
this.dtSD.Text = DateTime.Now.AddDays(-30).ToShortDateString();
|
||||
this.dtED.Text = DateTime.Now.AddDays(10).ToShortDateString();
|
||||
|
||||
@@ -150,6 +151,7 @@ namespace FEQ0000
|
||||
string dateField = "pdate";
|
||||
if (cmDate.SelectedIndex == 1) dateField = "indate";
|
||||
else if (cmDate.SelectedIndex == 2) dateField = "expdate";
|
||||
|
||||
|
||||
System.Data.SqlClient.SqlDataAdapter da = new System.Data.SqlClient.SqlDataAdapter();
|
||||
System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand();
|
||||
@@ -180,6 +182,11 @@ namespace FEQ0000
|
||||
}
|
||||
}
|
||||
// else cmd.CommandText += " and (state < '04' or state > '07')";
|
||||
|
||||
|
||||
if (cmbSort.SelectedIndex == 1) dateField = "edate";
|
||||
else if (cmbSort.SelectedIndex == 2) dateField = "sc";
|
||||
|
||||
cmd.CommandText += " ORDER BY " + dateField + " DESC, idx DESC";
|
||||
|
||||
cmd.Parameters.Add(new System.Data.SqlClient.SqlParameter("@sd", dtSD.Text));
|
||||
|
||||
@@ -337,6 +337,6 @@
|
||||
<value>579, 23</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>63</value>
|
||||
<value>65</value>
|
||||
</metadata>
|
||||
</root>
|
||||
Reference in New Issue
Block a user