재고 등록화면 프로젝트 입력칸 비활성화 => 완료
재고 관리 화면 - 보관소 필터링 기능 추가 재고 관리 등록 화면 규격의 값이 없어도 등록 가능 => 완료 보관소 직접입력이 아닌 선택 하게 => 재고등록화면 수정, 품목정보에 공급처 선택 기능 => 공급처 칸(제일 우측) 추가 주문도 보관소 별로 처리 => 완료 안전용 주문등록화면 추가 => 보관소 기능 추가 구매 신청 목록에 "보관소" 열 추가
This commit is contained in:
98
SubProject/FCM0000/Mail/fSendMail.cs
Normal file
98
SubProject/FCM0000/Mail/fSendMail.cs
Normal file
@@ -0,0 +1,98 @@
|
||||
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;
|
||||
using YARTE.UI.Buttons;
|
||||
using NetOffice;
|
||||
using Outlook = NetOffice.OutlookApi;
|
||||
using NetOffice.OutlookApi.Enums;
|
||||
|
||||
namespace FCM0000
|
||||
{
|
||||
public partial class fSendMail : FCOMMON.fBase
|
||||
{
|
||||
|
||||
|
||||
public fSendMail()
|
||||
{
|
||||
InitializeComponent();
|
||||
PredefinedButtonSets.SetupDefaultButtons(this.tbBody);
|
||||
this.dsMSSQL.MailData.TableNewRow += MailForm_TableNewRow;
|
||||
}
|
||||
|
||||
void MailForm_TableNewRow(object sender, DataTableNewRowEventArgs e)
|
||||
{
|
||||
e.Row["wuid"] = FCOMMON.info.Login.no;
|
||||
e.Row["wdate"] = DateTime.Now;
|
||||
e.Row["cate"] = "NR";
|
||||
}
|
||||
|
||||
private void fMailform_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.bs.AddNew();
|
||||
LoadNRData();
|
||||
}
|
||||
|
||||
void LoadNRData()
|
||||
{
|
||||
//자로에서 불러와서 그 값을 가져온다.
|
||||
DSMailTableAdapters.MailFormTableAdapter taMF = new DSMailTableAdapters.MailFormTableAdapter();
|
||||
var data = taMF.GetByCate(FCOMMON.info.Login.gcode, "NR");
|
||||
if (data != null && data.Rows.Count > 0)
|
||||
{
|
||||
var drForm = data.Rows[0] as DSMail.MailFormRow;
|
||||
this.tbSubject.Text = drForm.subject;
|
||||
this.tbBody.Html = drForm.body;
|
||||
this.tbTo.Text = drForm.tolist;
|
||||
this.tbBCC.Text = drForm.bcc;
|
||||
this.tbCC.Text = drForm.cc;
|
||||
}
|
||||
}
|
||||
|
||||
private void mailFormBindingNavigatorSaveItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Validate();
|
||||
var drv = this.bs.Current as DataRowView;
|
||||
drv["body"] = this.tbBody.Html;
|
||||
drv.EndEdit();
|
||||
this.bs.EndEdit();
|
||||
this.tam.UpdateAll(this.dsMSSQL);
|
||||
}
|
||||
|
||||
private void toolStripButton1_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
var drv = this.bs.Current as DataRowView;
|
||||
if (drv == null) return;
|
||||
|
||||
var dr = drv.Row as DSMail.MailFormRow;
|
||||
var tolist = new string[] { "Chikyun.kim@amkor.co.kr" }; //dr.tolist.Split(',');
|
||||
Outlook.Application outlookApplication = new Outlook.Application();
|
||||
foreach (var to in tolist)
|
||||
{
|
||||
if (to.isEmpty()) continue;
|
||||
var newMail = outlookApplication.CreateItem(OlItemType.olMailItem) as Outlook.MailItem;
|
||||
newMail.Display();
|
||||
newMail.Subject = this.tbSubject.Text.Trim(); // dr.title;
|
||||
newMail.To = to;
|
||||
newMail.CC = tbCC.Text.Trim();
|
||||
newMail.BCC = tbBCC.Text.Trim();
|
||||
// newMail.BodyFormat = OlBodyFormat.olFormatHTML;
|
||||
newMail.HTMLBody = this.tbBody.Html
|
||||
.Replace("{USER}", FCOMMON.info.Login.nameK)
|
||||
.Replace("{EUSER}", FCOMMON.info.Login.nameE)
|
||||
.Replace("{EMAIL}", FCOMMON.info.Login.email)
|
||||
.Replace("%7BEMAIL%7D", FCOMMON.info.Login.email)
|
||||
.Replace("{HP}", FCOMMON.info.Login.hp)
|
||||
.Replace("{TEL}", FCOMMON.info.Login.tel)
|
||||
.Replace("{ITEM}", tbSubject.Text) + newMail.HTMLBody;
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user