Exemplo n.º 1
0
 private void mnuCopyItem_Click(object sender, EventArgs e)
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         if (DBGrid.CurrentRow == null)
         {
             return;
         }
         modCustomerOrderList  mod = (modCustomerOrderList)DBGrid.CurrentRow.DataBoundItem;
         EditCustomerOrderList frm = new EditCustomerOrderList();
         frm.CopyItem(mod);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             LoadData();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Exemplo n.º 2
0
 private void toolImport_Click(object sender, EventArgs e)
 {
     try
     {
         frmViewList      frmsel  = new frmViewList();
         dalQuotationForm dalquot = new dalQuotationForm();
         BindingCollection <modVQuotationDetail> listquot = dalquot.GetVDetail(string.Empty, string.Empty, string.Empty, string.Empty, DateTime.Today.AddDays(-30).ToString("MM-dd-yyyy"), string.Empty, out Util.emsg);
         if (listquot != null)
         {
             frmsel.InitViewList("请选择要导入的客户报价单号:", listquot);
             frmsel.Selection = true;
             if (frmsel.ShowDialog() == DialogResult.OK)
             {
                 modVQuotationDetail mod = dalquot.GetDetailItem(Util.retValue1, Convert.ToInt32(Util.retValue2), out Util.emsg);
                 if (mod != null)
                 {
                     EditCustomerOrderList frm = new EditCustomerOrderList();
                     frm.ImportItem(mod);
                     if (frm.ShowDialog() == DialogResult.OK)
                     {
                         LoadData();
                     }
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Exemplo n.º 3
0
 private void toolNew_Click(object sender, EventArgs e)
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         EditCustomerOrderList frm = new EditCustomerOrderList();
         frm.AddItem(Util.retValue1);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             LoadData();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }