示例#1
0
        private void OTHER_PAYABLE_OBJECT_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            frmMain frmmain = (frmMain)this.ParentForm;

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

            if (newFrm != null && !frmmain.ShowMDIChild(newFrm, newFrm))
            {
                newFrm.Dispose();
                newFrm = null;
            }
        }
示例#2
0
 private void btnObject_Click(object sender, EventArgs e)
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         OTHER_PAYABLE_OBJECT frm = new OTHER_PAYABLE_OBJECT();
         frm.SelectVisible = true;
         if (frm.ShowDialog() == DialogResult.OK)
         {
             txtObjectName.Text = Util.retValue1;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
        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;
            }
        }
示例#4
0
文件: SYS_INIT.cs 项目: 100009/hberp
        private void btnOtherPayableObject_Click(object sender, EventArgs e)
        {
            OTHER_PAYABLE_OBJECT frm = new OTHER_PAYABLE_OBJECT();

            frm.ShowDialog();
        }
示例#5
0
        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;
            }
        }