コード例 #1
0
 private void btnVendor_Click(object sender, EventArgs e)
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         MTN_VENDOR_LIST frm = new MTN_VENDOR_LIST();
         frm.SelectVisible = true;
         if (frm.ShowDialog() == DialogResult.OK)
         {
             dalVendorList dal = new DAL.dalVendorList();
             modVendorList mod = dal.GetItem(Util.retValue1, out Util.emsg);
             if (mod != null)
             {
                 txtVendorName.Text = mod.VendorName;
                 txtCurrency.Text   = mod.Currency;
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
コード例 #2
0
ファイル: GuiPurchase.cs プロジェクト: 100009/hberp
        private void MTN_VENDOR_LIST_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            frmMain frmmain = (frmMain)this.ParentForm;

            if (frmmain.CheckChildFrmExist("MTN_VENDOR_LIST") == true)
            {
                return;
            }
            MTN_VENDOR_LIST newFrm = new MTN_VENDOR_LIST();

            if (newFrm != null && !frmmain.ShowMDIChild(newFrm, newFrm))
            {
                newFrm.Dispose();
                newFrm = null;
            }
        }
コード例 #3
0
ファイル: EditAccPayableForm.cs プロジェクト: 100009/hberp
 private void btnVendor_Click(object sender, EventArgs e)
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         MTN_VENDOR_LIST frm = new MTN_VENDOR_LIST();
         frm.SelectVisible = true;
         if (frm.ShowDialog() == DialogResult.OK)
         {
             txtVendorName.Text = Util.retValue1;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
コード例 #4
0
        private void btnSubject_Click(object sender, EventArgs e)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;
                ACC_SUBJECT_LIST frm = new ACC_SUBJECT_LIST();
                frm.ShowHideVisible(true);
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    txtSubjectId.Text   = ACC_SUBJECT_LIST._mod.SubjectId;
                    txtSubjectName.Text = ACC_SUBJECT_LIST._mod.SubjectName;
                    //txtCheckNo.ReadOnly = true;
                    //cboCheckType.Enabled = false;
                    //cboBankName.Enabled = false;
                    //dtpPromiseDate.Enabled = false;
                    ShowHideCheckControl(false);
                    switch (ACC_SUBJECT_LIST._mod.SubjectId)
                    {
                    case "1030":       //现金银行
                        ACC_BANK_ACCOUNT frmaccount = new ACC_BANK_ACCOUNT();
                        frmaccount.SelectVisible = true;
                        if (frmaccount.ShowDialog() == DialogResult.OK)
                        {
                            txtDetailId.Text     = Util.retValue1;
                            txtCurrency.Text     = Util.retValue2;
                            txtExchangeRate.Text = Util.retValue3;
                        }
                        break;

                    case "1075":       //应收票据
                    case "5125":       //应付票据
                        //txtCheckNo.ReadOnly = false;
                        //cboCheckType.Enabled = true;
                        //cboBankName.Enabled = true;
                        //dtpPromiseDate.Enabled = true;
                        ShowHideCheckControl(true);
                        break;

                    case "1055":       //应收帐款
                        MTN_CUSTOMER_LIST frmcust = new MTN_CUSTOMER_LIST();
                        frmcust.SelectVisible = true;
                        if (frmcust.ShowDialog() == DialogResult.OK)
                        {
                            txtDetailId.Text   = Util.retValue1;
                            txtDetailName.Text = Util.retValue2;
                        }
                        break;

                    case "1060":       //其它应收款
                        OTHER_RECEIVABLE_OBJECT frmorec = new OTHER_RECEIVABLE_OBJECT();
                        frmorec.SelectVisible = true;
                        if (frmorec.ShowDialog() == DialogResult.OK)
                        {
                            txtDetailId.Text = Util.retValue1;
                        }
                        break;

                    case "5145":       //应付帐款
                        MTN_VENDOR_LIST frmvendor = new MTN_VENDOR_LIST();
                        frmvendor.SelectVisible = true;
                        if (frmvendor.ShowDialog() == DialogResult.OK)
                        {
                            txtDetailId.Text = Util.retValue1;
                        }
                        break;

                    case "5155":       //其它应付款
                        OTHER_PAYABLE_OBJECT frmopay = new OTHER_PAYABLE_OBJECT();
                        frmopay.SelectVisible = true;
                        if (frmopay.ShowDialog() == DialogResult.OK)
                        {
                            txtDetailId.Text = Util.retValue1;
                        }
                        break;

                    case "1235":       //库存商品
                        txtSubjectId.Text   = string.Empty;
                        txtSubjectName.Text = string.Empty;
                        MessageBox.Show("不能选择这个科目", clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }
                    cboCheckType.SelectedIndex = -1;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
コード例 #5
0
ファイル: SYS_INIT.cs プロジェクト: 100009/hberp
        private void btnVendorList_Click(object sender, EventArgs e)
        {
            MTN_VENDOR_LIST frm = new MTN_VENDOR_LIST();

            frm.ShowDialog();
        }
コード例 #6
0
ファイル: EditAccCheckForm.cs プロジェクト: 100009/hberp
        private void EditItem(DataGridViewRow row)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;
                if (row == null)
                {
                    return;
                }
                ACC_SUBJECT_LIST frm = new ACC_SUBJECT_LIST();
                frm.ShowHideVisible(true);
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    if (ACC_SUBJECT_LIST._mod.SubjectId.IndexOf("9135") >= 0)
                    {
                        row.Cells[0].Value  = ACC_SUBJECT_LIST._mod.SubjectId;
                        row.Cells[1].Value  = "本年利润";
                        row.Cells[2].Value  = ACC_SUBJECT_LIST._mod.SubjectName;
                        row.Cells[3].Value  = "";
                        row.Cells[4].Value  = Util.retValue2;
                        row.Cells[6].Value  = clsLxms.GetExchangeRate(Util.retValue1);
                        row.Cells[7].Value  = "";
                        row.Cells[8].Value  = "";
                        row.Cells[9].Value  = "";
                        row.Cells[10].Value = DateTime.Today.ToString("MM-dd-yyyy");
                    }
                    else
                    {
                        switch (ACC_SUBJECT_LIST._mod.SubjectId)
                        {
                        case "1030":       //现金银行
                            ACC_BANK_ACCOUNT frm2 = new ACC_BANK_ACCOUNT();
                            frm2.ShowHideSelection(true);
                            if (frm2.ShowDialog() == DialogResult.OK)
                            {
                                row.Cells[0].Value  = ACC_SUBJECT_LIST._mod.SubjectId;
                                row.Cells[1].Value  = ACC_SUBJECT_LIST._mod.SubjectName;
                                row.Cells[2].Value  = Util.retValue1;
                                row.Cells[3].Value  = "";
                                row.Cells[4].Value  = Util.retValue2;
                                row.Cells[6].Value  = clsLxms.GetExchangeRate(Util.retValue1);
                                row.Cells[7].Value  = "";
                                row.Cells[8].Value  = "";
                                row.Cells[9].Value  = "";
                                row.Cells[10].Value = DateTime.Today.ToString("MM-dd-yyyy");
                            }
                            break;

                        case "1055":        //应收帐款
                            MTN_CUSTOMER_LIST frmccust = new MTN_CUSTOMER_LIST();
                            frmccust.ShowHideSelection(true);
                            if (frmccust.ShowDialog() == DialogResult.OK)
                            {
                                row.Cells[0].Value  = ACC_SUBJECT_LIST._mod.SubjectId;
                                row.Cells[1].Value  = ACC_SUBJECT_LIST._mod.SubjectName;
                                row.Cells[2].Value  = Util.retValue1;
                                row.Cells[3].Value  = Util.retValue2;
                                row.Cells[4].Value  = Util.Currency;
                                row.Cells[6].Value  = 1;
                                row.Cells[7].Value  = "";
                                row.Cells[8].Value  = "";
                                row.Cells[9].Value  = "";
                                row.Cells[10].Value = DateTime.Today.ToString("MM-dd-yyyy");
                            }
                            break;

                        case "5145":        //应付帐款
                            MTN_VENDOR_LIST frmvendor = new MTN_VENDOR_LIST();
                            frmvendor.SelectVisible = true;
                            if (frmvendor.ShowDialog() == DialogResult.OK)
                            {
                                row.Cells[0].Value  = ACC_SUBJECT_LIST._mod.SubjectId;
                                row.Cells[1].Value  = ACC_SUBJECT_LIST._mod.SubjectName;
                                row.Cells[2].Value  = Util.retValue1;
                                row.Cells[3].Value  = Util.retValue2;
                                row.Cells[4].Value  = Util.Currency;
                                row.Cells[6].Value  = 1;
                                row.Cells[7].Value  = "";
                                row.Cells[8].Value  = "";
                                row.Cells[9].Value  = "";
                                row.Cells[10].Value = DateTime.Today.ToString("MM-dd-yyyy");
                            }
                            break;

                        case "1060":        //其它应收款
                            OTHER_RECEIVABLE_OBJECT frmor = new OTHER_RECEIVABLE_OBJECT();
                            frmor.SelectVisible = true;
                            if (frmor.ShowDialog() == DialogResult.OK)
                            {
                                row.Cells[0].Value  = ACC_SUBJECT_LIST._mod.SubjectId;
                                row.Cells[1].Value  = ACC_SUBJECT_LIST._mod.SubjectName;
                                row.Cells[2].Value  = Util.retValue1;
                                row.Cells[3].Value  = "";
                                row.Cells[4].Value  = Util.Currency;
                                row.Cells[6].Value  = 1;
                                row.Cells[7].Value  = "";
                                row.Cells[8].Value  = "";
                                row.Cells[9].Value  = "";
                                row.Cells[10].Value = DateTime.Today.ToString("MM-dd-yyyy");
                            }
                            break;

                        case "5155":        //其它应付款
                            OTHER_PAYABLE_OBJECT frmop = new OTHER_PAYABLE_OBJECT();
                            frmop.SelectVisible = true;
                            if (frmop.ShowDialog() == DialogResult.OK)
                            {
                                row.Cells[0].Value  = ACC_SUBJECT_LIST._mod.SubjectId;
                                row.Cells[1].Value  = ACC_SUBJECT_LIST._mod.SubjectName;
                                row.Cells[2].Value  = Util.retValue1;
                                row.Cells[3].Value  = Util.retValue2;
                                row.Cells[4].Value  = Util.Currency;
                                row.Cells[6].Value  = 1;
                                row.Cells[7].Value  = "";
                                row.Cells[8].Value  = "";
                                row.Cells[9].Value  = "";
                                row.Cells[10].Value = DateTime.Today.ToString("MM-dd-yyyy");
                            }
                            break;

                        case "1075":        //应收票据
                        case "5125":        //应付票据
                            row = new DataGridViewRow();
                            row.CreateCells(DBGrid);
                            row.Cells[0].Value  = ACC_SUBJECT_LIST._mod.SubjectId;
                            row.Cells[1].Value  = ACC_SUBJECT_LIST._mod.SubjectName;
                            row.Cells[2].Value  = "";
                            row.Cells[3].Value  = "";
                            row.Cells[4].Value  = Util.Currency;
                            row.Cells[6].Value  = 1;
                            row.Cells[7].Value  = "";
                            row.Cells[8].Value  = "";
                            row.Cells[9].Value  = "";
                            row.Cells[10].Value = DateTime.Today.AddDays(7).ToString("MM-dd-yyyy");
                            break;

                        default:
                            row.Cells[0].Value  = ACC_SUBJECT_LIST._mod.SubjectId;
                            row.Cells[1].Value  = ACC_SUBJECT_LIST._mod.SubjectName;
                            row.Cells[2].Value  = "";
                            row.Cells[3].Value  = "";
                            row.Cells[4].Value  = Util.Currency;
                            row.Cells[6].Value  = 1;
                            row.Cells[7].Value  = "";
                            row.Cells[8].Value  = "";
                            row.Cells[9].Value  = "";
                            row.Cells[10].Value = DateTime.Today.ToString("MM-dd-yyyy");
                            break;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }