示例#1
0
 /// <summary>
 /// 변경할 단가입력시 숫자이외의값 체크, 단가를 한글로 나타내는 메서드
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void txtChaingePrice_TextChanged(object sender, EventArgs e)
 {
     if (txtChaingePrice.Text.Length > 9)
     {
         return;
     }
     else
     {
         if (txtChaingePrice.Text == "")
         {
             label4.Text = "";
         }
         else
         {
             if (CheckPrice(txtChaingePrice.Text))
             {
                 se = new SalesExcelDao();
                 try
                 {
                     label4.Text = se.NumToString(Int32.Parse(txtChaingePrice.Text));
                 }
                 catch (FormatException)
                 {
                     txtChaingePrice.Text = "";
                 }
             }
             else
             {
                 return;
             }
         }
     }
 }
示例#2
0
        /// <summary>
        /// 클릭시 출하지시서 내용을 엑셀로 저장
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnConfirm_Click(object sender, EventArgs e)
        {
            if (txtconf.Text == "")
            {
                MessageBox.Show("확인란에 서명하세요");
            }
            else
            {
                List <string> OrderInfoList = new List <string>();
                OrderInfoList.Add(lblOrderNo.Text);
                OrderInfoList.Add(lblShipDate.Text);
                OrderInfoList.Add(lblCus.Text);
                OrderInfoList.Add(lblEmp.Text);
                OrderInfoList.Add(lblPhone.Text);
                if (lblAddr.Text.IndexOf("구주소") == -1)
                {
                    OrderInfoList.Add(lblAddr.Text);
                }
                else
                {
                    OrderInfoList.Add(lblAddr.Text.Substring(0, lblAddr.Text.IndexOf("구주소")));
                }

                string excelStr = new SalesExcelDao().WriteExcelData(OrderInfoList, ProList, fIlePath, fIlePath2);
                MessageBox.Show(excelStr);
            }
        }