コード例 #1
0
ファイル: OPA_SALES_DESIGN_FORM.cs プロジェクト: 100009/hberp
 private void toolEdit_Click(object sender, EventArgs e)
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         if (DBGrid.CurrentRow == null)
         {
             return;
         }
         modSalesDesignForm mod = (modSalesDesignForm)DBGrid.CurrentRow.DataBoundItem;
         EditDesignForm     frm = new EditDesignForm();
         frm.EditItem(mod.Id);
         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;
     }
 }
コード例 #2
0
ファイル: OPA_SALES_DESIGN_FORM.cs プロジェクト: 100009/hberp
 private void toolImport_Click(object sender, EventArgs e)
 {
     try
     {
         frmViewList          frmsel   = new frmViewList();
         dalCustomerOrderList dalorder = new dalCustomerOrderList();
         BindingCollection <modCustomerOrderList> listorder = dalorder.GetIList(false, string.Empty, string.Empty, string.Empty, string.Empty, DateTime.Today.AddDays(-30).ToString("MM-dd-yyyy"), string.Empty, out Util.emsg);
         if (listorder != null)
         {
             frmsel.Selection = true;
             frmsel.InitViewList("请选择要导入的客户订单号:", listorder);
             if (frmsel.ShowDialog() == DialogResult.OK)
             {
                 EditDesignForm frm = new EditDesignForm();
                 frm.Import(Convert.ToInt32(Util.retValue1));
                 if (frm.ShowDialog() == DialogResult.OK)
                 {
                     LoadData();
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
コード例 #3
0
ファイル: OPA_SALES_DESIGN_FORM.cs プロジェクト: 100009/hberp
 private void toolNew_Click(object sender, EventArgs e)
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         EditDesignForm frm = new EditDesignForm();
         frm.AddItem(Util.retValue1);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             rbStatus0.Checked = true;
             LoadData();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
コード例 #4
0
        private void mnuNewDesignForm_Click(object sender, EventArgs e)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;
                if (DBGrid.CurrentRow == null)
                {
                    return;
                }

                EditDesignForm frm = new EditDesignForm();
                frm.Import(Convert.ToInt32(DBGrid.CurrentRow.Cells["Id"].Value));
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    frmMain frmmain = (frmMain)this.ParentForm;
                    if (frmmain.CheckChildFrmExist("OPA_SALES_DESIGN_FORM") == true)
                    {
                        return;
                    }
                    OPA_SALES_DESIGN_FORM newFrm = new OPA_SALES_DESIGN_FORM();
                    if (newFrm != null && !frmmain.ShowMDIChild(newFrm, newFrm))
                    {
                        newFrm.Dispose();
                        newFrm = null;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }