コード例 #1
0
ファイル: pro_Detail.cs プロジェクト: Bongkwon/JinJinTeam
        /// <summary>
        /// 확인 버튼 클릭시 발생하는 이벤트
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e">버튼 클릭</param>
        private void btn_ok_Click(object sender, EventArgs e)
        {
            string type_u = "pro";
            //temp = true;

            Products_Vo pv_sub = new Products_Vo()
            {
                Pro_ID    = lbl_proID.Text,
                Pro_State = p_s
            };

            if (!pv.Equals(pv_sub))
            {
                var result = MessageBox.Show("수정 하시겠습니까?", "수정", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
                if (result == DialogResult.OK)
                {
                    if (new Admin_Dao().Update_state_ob(pv_sub, type_u))
                    {
                        MessageBox.Show("수정 성공");

                        Admin_main ad = (Admin_main)Owner;
                        ad.Pro_Temp = true;
                    }
                }
                else
                {
                    pro_Detail_Load(null, null);
                }
            }
            Close();
        }
コード例 #2
0
ファイル: seller_Detail.cs プロジェクト: Bongkwon/JinJinTeam
        /// <summary>
        /// 확인 버튼 클릭시 발생하는 이벤트
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_ok_Click(object sender, EventArgs e)
        {
            string    type_u = "seller";
            Seller_Vo sv_sub = new Seller_Vo()
            {
                Seller_NO    = Int32.Parse(lbl_No.Text),
                Seller_state = s_s,
                Join_state   = j_s
            };

            if (!sv.Equals(sv_sub))
            {
                var result = MessageBox.Show("수정 하시겠습니까?", "수정", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
                if (result == DialogResult.OK)
                {
                    if (new Admin_Dao().Update_state_ob(sv_sub, type_u))
                    {
                        MessageBox.Show("수정 성공");
                        Admin_main ad = (Admin_main)Owner;
                        ad.Pro_Temp = true;
                    }
                }
                else
                {
                    seller_Detail_Load(null, null);
                }
            }
            Close();
        }
コード例 #3
0
        /// <summary>
        /// 종료 버튼 클릭시 발생하는 이벤트
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e">버튼 클릭</param>
        private void pb_Exit_Click(object sender, EventArgs e)
        {
            Admin_main admin = (Admin_main)Owner;

            admin.Sales_Temp = false;
            Close();
        }
コード例 #4
0
        /// <summary>
        /// 답글 달기 버튼 클릭시 발생하는 이벤트 답글폼 출력
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e">버튼 클릭</param>
        private void btn_return_Click(object sender, EventArgs e)
        {
            Return_inquire ri = new Return_inquire(selectedRows);

            ri.Owner = this;
            ri.ShowDialog();

            Admin_main ad = (Admin_main)Owner;

            ad.Pro_Temp = this.temp;

            if (temp)
            {
                Close();
            }
        }
コード例 #5
0
ファイル: Tax_Ex.cs プロジェクト: Bongkwon/JinJinTeam
        /// <summary>
        /// 출력 버튼 클릭시 발생하는 이벤트
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_output_Click(object sender, EventArgs e)
        {
            Excel.Application excelApp = new Excel.Application();
            if (excelApp == null)
            {
                MessageBox.Show("Excel 응용 프로그램을 찾을 수 없거나, 설치 되지 않았습니다.");
            }
            Excel.Workbook  workBook;
            Excel.Worksheet workSheet;
            object          missingValue = System.Reflection.Missing.Value;

            workBook  = excelApp.Workbooks.Open(Application.StartupPath + "/Resources/Tax_Format.xlsx");
            workSheet = workBook.Worksheets.Item[1];


            workSheet.Cells[5, 3] = lbl_corporate_registration_no.Text;

            workSheet.Cells[6, 6] = lbl_seller_boss.Text;
            workSheet.Cells[6, 3] = lbl_seller_Id.Text;

            workSheet.Cells[7, 3] = lbl_seller_addr.Text;

            workSheet.Cells[10, 1] = lbl_pay_date_1.Text;
            workSheet.Cells[10, 3] = lbl_pay_price_2.Text;
            workSheet.Cells[10, 7] = lbl_pay_price_5.Text;

            workSheet.Cells[12, 1]  = lbl_pay_date_2.Text;
            workSheet.Cells[12, 2]  = lbl_stock_id.Text;
            workSheet.Cells[12, 5]  = lbl_pay_count.Text;
            workSheet.Cells[12, 6]  = lbl_pay_price_1.Text;
            workSheet.Cells[12, 8]  = lbl_pay_price_3.Text;
            workSheet.Cells[12, 10] = lbl_pay_price_4.Text;

            workSheet.Cells[17, 1] = lbl_pay_price_6.Text;

            try
            {
                date_short = DateTime.Now.ToShortDateString();
                workBook.SaveAs(lbl_path.Text + @"\세금계산서 " + lbl_stock_id.Text + " " + date_short + ".xls", Excel.XlFileFormat.xlWorkbookNormal, null, null, null, null, Excel.XlSaveAsAccessMode.xlNoChange, Excel.XlSaveConflictResolution.xlLocalSessionChanges, missingValue, missingValue, missingValue, missingValue);
            }
            catch (Exception)
            {
                MessageBox.Show("저장 실패");
                return;
            }

            excelApp.Quit();
            Marshal.ReleaseComObject(workSheet);
            Marshal.ReleaseComObject(workBook);
            Marshal.ReleaseComObject(excelApp);

            string type_u = "pay";

            TaxBill_Vo tv_sub = new TaxBill_Vo()
            {
                Pay_ID = tv.Pay_ID
            };

            if (new Admin_Dao().Update_state_ob(tv_sub, type_u))
            {
                MessageBox.Show("저장 성공");

                Admin_main ad = (Admin_main)Owner;
                ad.Pro_Temp = true;
            }
        }