mdiparent 추가 폼 추가
This commit is contained in:
@@ -871,19 +871,6 @@ namespace WindowsFormsApp1
|
|||||||
return form;
|
return form;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FocusTabFor(Form form)
|
|
||||||
{
|
|
||||||
foreach (TabPage tb in mdiTabControl.TabPages)
|
|
||||||
{
|
|
||||||
if (tb.Tag == form)
|
|
||||||
{
|
|
||||||
mdiTabControl.SelectedTab = tb;
|
|
||||||
form.Focus();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void menu_allclose_Click(object sender, EventArgs e)
|
private void menu_allclose_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
// Create a copy of the list since closing forms modifies the collection
|
// Create a copy of the list since closing forms modifies the collection
|
||||||
|
|||||||
@@ -583,13 +583,10 @@ namespace WindowsFormsApp1.Delivery
|
|||||||
if (e.ColumnIndex != 2 || e.ColumnIndex != 4 || e.ColumnIndex != 5 ||
|
if (e.ColumnIndex != 2 || e.ColumnIndex != 4 || e.ColumnIndex != 5 ||
|
||||||
e.ColumnIndex != 6 || e.ColumnIndex != 15)
|
e.ColumnIndex != 6 || e.ColumnIndex != 15)
|
||||||
{
|
{
|
||||||
List_Lookup list_l = new List_Lookup(this)
|
var list_l = main.OpenFormInTab(() => new List_Lookup(this)
|
||||||
{
|
{
|
||||||
call_base = dataGridView1.Rows[e.RowIndex].Cells["list_name"].Value.ToString()
|
call_base = dataGridView1.Rows[e.RowIndex].Cells["list_name"].Value.ToString()
|
||||||
};
|
});
|
||||||
list_l.MdiParent = main;
|
|
||||||
list_l.WindowState = FormWindowState.Maximized;
|
|
||||||
list_l.Show();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
|
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
|
||||||
|
|||||||
@@ -355,25 +355,14 @@ namespace WindowsFormsApp1.Mac
|
|||||||
Skill_Grid sg = new Skill_Grid();
|
Skill_Grid sg = new Skill_Grid();
|
||||||
sg.Print_Grid_Num(sender, e);
|
sg.Print_Grid_Num(sender, e);
|
||||||
}
|
}
|
||||||
private Check_ISBN mMac_check_ISBN;
|
|
||||||
private void btnSearchISBN_Click(object sender, EventArgs e)
|
private void btnSearchISBN_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (dataGridView1.SelectedRows[0].Index < 0) return;
|
if (dataGridView1.SelectedRows[0].Index < 0) return;
|
||||||
string tSearchText = dataGridView1.SelectedRows[0].Cells["list_name"].Value.ToString();
|
string tSearchText = dataGridView1.SelectedRows[0].Cells["list_name"].Value.ToString();
|
||||||
string tSearchIDX = dataGridView1.SelectedRows[0].Cells["idx"].Value.ToString();
|
string tSearchIDX = dataGridView1.SelectedRows[0].Cells["idx"].Value.ToString();
|
||||||
if (mMac_check_ISBN != null)
|
var isbn = main.OpenFormInTab(() => new Check_ISBN(main, tSearchText, tSearchIDX));
|
||||||
{
|
isbn.tb_list_name.Enabled = true;
|
||||||
mMac_check_ISBN.Focus();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mMac_check_ISBN = new Check_ISBN(main, tSearchText, tSearchIDX);
|
|
||||||
mMac_check_ISBN.MdiParent = main;
|
|
||||||
mMac_check_ISBN.WindowState = FormWindowState.Maximized;
|
|
||||||
mMac_check_ISBN.FormClosed += (o, ea) => mMac_check_ISBN = null;
|
|
||||||
mMac_check_ISBN.tb_list_name.Enabled = true;
|
|
||||||
mMac_check_ISBN.Show();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -173,7 +173,8 @@ namespace WindowsFormsApp1.Account
|
|||||||
buy = Convert.ToInt32(dataGridView1.Rows[idx].Cells[4].Value.ToString());
|
buy = Convert.ToInt32(dataGridView1.Rows[idx].Cells[4].Value.ToString());
|
||||||
}
|
}
|
||||||
int pay = 0;
|
int pay = 0;
|
||||||
if (dataGridView1.Rows[idx].Cells[5].Value.ToString() != "0") {
|
if (dataGridView1.Rows[idx].Cells[5].Value.ToString() != "0")
|
||||||
|
{
|
||||||
pay = Convert.ToInt32(dataGridView1.Rows[idx].Cells[5].Value.ToString());
|
pay = Convert.ToInt32(dataGridView1.Rows[idx].Cells[5].Value.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -273,13 +274,10 @@ namespace WindowsFormsApp1.Account
|
|||||||
// 일자별이나 전체에선 더블클릭 이벤트 활성화 되지않음.
|
// 일자별이나 전체에선 더블클릭 이벤트 활성화 되지않음.
|
||||||
if(radioButton1.Checked == true || radioButton4.Checked == true) { return; }
|
if(radioButton1.Checked == true || radioButton4.Checked == true) { return; }
|
||||||
|
|
||||||
Purchase_Book pb = new Purchase_Book(this);
|
var pb = main.OpenFormInTab(() => new Purchase_Book(this));
|
||||||
pb.MdiParent = main;
|
|
||||||
pb.WindowState = FormWindowState.Maximized;
|
|
||||||
pb.tb_purchase.Text = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
|
pb.tb_purchase.Text = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
|
||||||
pb.start_Date.Value = DateTime.Parse(start_date.Value.ToString());
|
pb.start_Date.Value = DateTime.Parse(start_date.Value.ToString());
|
||||||
pb.end_Date.Value = DateTime.Parse(end_date.Value.ToString());
|
pb.end_Date.Value = DateTime.Parse(end_date.Value.ToString());
|
||||||
pb.Show();
|
|
||||||
pb.btn_Lookup_Click(null, null);
|
pb.btn_Lookup_Click(null, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,11 +18,12 @@ namespace WindowsFormsApp1.회계
|
|||||||
Helper_DB db = new Helper_DB();
|
Helper_DB db = new Helper_DB();
|
||||||
public string compidx;
|
public string compidx;
|
||||||
public int row = -1;
|
public int row = -1;
|
||||||
public Sales_Book(Sales_Deposit _sd)
|
public Sales_Book(Sales_Deposit _sd, Main _main)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
sd = _sd;
|
sd = _sd;
|
||||||
compidx = sd.compidx;
|
compidx = sd.compidx;
|
||||||
|
main = _main;
|
||||||
}
|
}
|
||||||
public Sales_Book(Main _main)
|
public Sales_Book(Main _main)
|
||||||
{
|
{
|
||||||
@@ -200,16 +201,13 @@ namespace WindowsFormsApp1.회계
|
|||||||
dataGridView1.Rows[row].Cells["content"].Value.ToString() == "입금 카드" ||
|
dataGridView1.Rows[row].Cells["content"].Value.ToString() == "입금 카드" ||
|
||||||
dataGridView1.Rows[row].Cells["content"].Value.ToString() == "입금 현금" ||
|
dataGridView1.Rows[row].Cells["content"].Value.ToString() == "입금 현금" ||
|
||||||
dataGridView1.Rows[row].Cells["content"].Value.ToString() == "입금 어음") { return; }
|
dataGridView1.Rows[row].Cells["content"].Value.ToString() == "입금 어음") { return; }
|
||||||
Sales_Detail sde = new Sales_Detail(this);
|
var sde = main.OpenFormInTab(() => new Sales_Detail(this));
|
||||||
string out_date = dataGridView1.Rows[e.RowIndex].Cells["out_date"].Value.ToString().Substring(0, 10).Replace("-", "");
|
string out_date = dataGridView1.Rows[e.RowIndex].Cells["out_date"].Value.ToString().Substring(0, 10).Replace("-", "");
|
||||||
int yesr = Convert.ToInt32(out_date.Substring(0, 4));
|
int yesr = Convert.ToInt32(out_date.Substring(0, 4));
|
||||||
int month = Convert.ToInt32(out_date.Substring(4, 2));
|
int month = Convert.ToInt32(out_date.Substring(4, 2));
|
||||||
int day = Convert.ToInt32(out_date.Substring(6, 2));
|
int day = Convert.ToInt32(out_date.Substring(6, 2));
|
||||||
sde.MdiParent = this.MdiParent;
|
|
||||||
sde.WindowState = FormWindowState.Maximized;
|
|
||||||
sde.Out_Date.Value = new DateTime(yesr, month, day);
|
sde.Out_Date.Value = new DateTime(yesr, month, day);
|
||||||
sde.tb_clt.Text = tb_clt.Text;
|
sde.tb_clt.Text = tb_clt.Text;
|
||||||
sde.Show();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -288,14 +288,11 @@ namespace WindowsFormsApp1.Account
|
|||||||
{
|
{
|
||||||
if (rb_Date.Checked) return;
|
if (rb_Date.Checked) return;
|
||||||
if (e.RowIndex < 0) { return; }
|
if (e.RowIndex < 0) { return; }
|
||||||
Sales_Book sb = new Sales_Book(this);
|
var sb = main.OpenFormInTab(() => new Sales_Book(this, main));
|
||||||
sb.row = e.RowIndex;
|
sb.row = e.RowIndex;
|
||||||
sb.MdiParent = main;
|
|
||||||
sb.WindowState = FormWindowState.Maximized;
|
|
||||||
sb.tb_clt.Text = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
|
sb.tb_clt.Text = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
|
||||||
sb.Start_Date.Value = DateTime.Parse(Start_Date.Value.ToString());
|
sb.Start_Date.Value = DateTime.Parse(Start_Date.Value.ToString());
|
||||||
sb.End_Date.Value = DateTime.Parse(End_Date.Value.ToString());
|
sb.End_Date.Value = DateTime.Parse(End_Date.Value.ToString());
|
||||||
sb.Show();
|
|
||||||
sb.btn_Lookup_Click(null, null);
|
sb.btn_Lookup_Click(null, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -166,16 +166,15 @@ namespace WindowsFormsApp1.Account
|
|||||||
}
|
}
|
||||||
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
||||||
{
|
{
|
||||||
Sales_Detail sd = new Sales_Detail(this);
|
|
||||||
string out_date = dataGridView1.Rows[e.RowIndex].Cells["out_date"].Value.ToString().Substring(0, 10).Replace("-", "");
|
string out_date = dataGridView1.Rows[e.RowIndex].Cells["out_date"].Value.ToString().Substring(0, 10).Replace("-", "");
|
||||||
int yesr = Convert.ToInt32(out_date.Substring(0, 4));
|
int yesr = Convert.ToInt32(out_date.Substring(0, 4));
|
||||||
int month = Convert.ToInt32(out_date.Substring(4, 2));
|
int month = Convert.ToInt32(out_date.Substring(4, 2));
|
||||||
int day = Convert.ToInt32(out_date.Substring(6, 2));
|
int day = Convert.ToInt32(out_date.Substring(6, 2));
|
||||||
sd.MdiParent = main;
|
|
||||||
sd.WindowState = FormWindowState.Maximized;
|
var sd = main.OpenFormInTab(() => new Sales_Detail(this));
|
||||||
sd.Out_Date.Value = new DateTime(yesr, month, day);
|
sd.Out_Date.Value = new DateTime(yesr, month, day);
|
||||||
sd.tb_clt.Text = dataGridView1.Rows[e.RowIndex].Cells["clt"].Value.ToString();
|
sd.tb_clt.Text = dataGridView1.Rows[e.RowIndex].Cells["clt"].Value.ToString();
|
||||||
sd.Show();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user