Esempio n. 1
0
        private void MonthlyReportBakery_Load(object sender, EventArgs e)
        {
            decimal FeeRate = 1.8m;

            try
            {
                var headerAdapter = new MyHeaderAdapter();
                headerAdapter.Fill(m_DataSet.Header);
                TitleSetup Setup = new TitleSetup();
                Setup.Load();
                FeeRate = Setup.FeeRate();
            }
            catch
            {
                MessageBox.Show("標頭資料讀取錯誤,你的資料庫版本可能不對");
            }
            int count = m_DataSet.Header.Count;

            if (count == 0)
            {
                MessageBox.Show("無資料!");
                m_CloseOnLoad = true;   // OnLoad時無法呼叫Close(), 設置變數在OnShown呼叫
                // Close
                return;
            }
            var row = m_DataSet.Header[count - 1];

            Revenue = new RevenueCalcBakery(row.DataDate, FeeRate / 100);
            comboBoxMonth.SelectedIndex = row.DataDate.Month - 1;
            labelFeeRate.Text           = FeeRate.ToString() + "%";
        }
Esempio n. 2
0
        private void MonthlyReport_Load(object sender, EventArgs e)
        {
            decimal FeeRate = 1.8m;

            try
            {
                headerTableAdapter1.Connection = MapPath.BasicConnection;
                headerTableAdapter1.Fill(basicDataSet1.Header);
                TitleSetup Setup = new TitleSetup();
                Setup.Load();
                FeeRate = Setup.FeeRate();
            }
            catch
            {
                MessageBox.Show("標頭資料讀取錯誤,你的資料庫版本可能不對");
            }
            int count = basicDataSet1.Header.Count;

            if (count == 0)
            {
                MessageBox.Show("無資料!");
                Close();
                return;
            }
            BasicDataSet.HeaderRow row = basicDataSet1.Header[count - 1];
            Revenue = new RevenueCalc(row.DataDate, FeeRate / 100);
            comboBoxMonth.SelectedIndex = row.DataDate.Month - 1;
            labelFeeRate.Text           = FeeRate.ToString() + "%";
        }
Esempio n. 3
0
        public LedgerTableGenerator(Label labelMsg, TitleSetup setup, VEDataSet dataSet1, CalcRevenueDelegate calcRevenue)
#endif
        {
            LabelMessage = labelMsg;
            Setup        = setup;
            m_DataSet    = dataSet1;
            CalcRevenue  = calcRevenue;
        }
Esempio n. 4
0
        bool CodeInSetup(TitleSetup Setup, string code)
        {
            if (Setup.CashIncome == code)
            {
                return(true);
            }
            if (Setup.CashReceivable == code)
            {
                return(true);
            }
            if (Setup.CardIncome == code)
            {
                return(true);
            }
            if (Setup.CardReceivable == code)
            {
                return(true);
            }
            if (Setup.DefaultAsset == code)
            {
                return(true);
            }
            if (Setup.DefaultCost == code)
            {
                return(true);
            }
            if (Setup.DefaultExpense == code)
            {
                return(true);
            }
            if (Setup.DefaultIncome == code)
            {
                return(true);
            }
            if (Setup.DefualtLiability == code)
            {
                return(true);
            }
//            if (Setup.OwnersEquity == code)     return true;
            if (Setup.VoucherShouldPay == code)
            {
                return(true);
            }
            return(false);
        }
Esempio n. 5
0
 public LedgerTableGenerator(Label labelMsg, TitleSetup setup, DamaiDataSet dataSet1, CalcRevenueDelegate calcRevenue)