Ejemplo n.º 1
0
        private void PostOloans()
        {
            IACDataSetTableAdapters.ACCOUNTTableAdapter ACCOUNTTableAdapter = new IACDataSetTableAdapters.ACCOUNTTableAdapter();
            IACDataSetTableAdapters.MASTERTableAdapter  MASTERTableAdapter  = new IACDataSetTableAdapters.MASTERTableAdapter();
            BindingSource MASTERBindingSource = new BindingSource();
            Object        loMasterKey         = null;
            String        lsMasterKey         = "";

            MASTERBindingSource.DataSource = AddOniacDataSet.MASTER;


            loMasterKey = ACCOUNTTableAdapter.AccountNumber("OS_LOANS");
            lsMasterKey = (String)loMasterKey;

            MASTERTableAdapter.Fill(AddOniacDataSet.MASTER, lsMasterKey);

            if (AddOniacDataSet.MASTER.Rows.Count != 0)
            {
                AddOniacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_RSV", 0);
                AddOniacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_CONT", 0);
                AddOniacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_OLOAN", 0);
                AddOniacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_ADJ", 0);
                AddOniacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_BAD", 0);
                AddOniacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_LOSS", 0);
                AddOniacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_INT", 0);
                AddOniacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_NOTES", 0);
                AddOniacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_AMORT_CUR_OLOAN", 0);
                AddOniacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_AMORT_CUR_NOTES", 0);
                AddOniacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_AMORT_CUR_INT", 0);

                AddOniacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_OLOAN", lnMASTER_OS_LOANS);
                AddOniacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_YTD_OLOAN", AddOniacDataSet.MASTER.Rows[0].Field <Decimal>("MASTER_YTD_OLOAN") + lnMASTER_OS_LOANS);
                AddOniacDataSet.MASTER.Rows[0].SetField <DateTime>("MASTER_POST_DATE", DateTime.Now.Date);
                MASTERBindingSource.EndEdit();
                MASTERTableAdapter.Update(AddOniacDataSet.MASTER.Rows[0]);
                AddOniacDataSet.MASTER.AcceptChanges();
            }
        }
Ejemplo n.º 2
0
        private void UpdateMaster()
        {
            IACDataSetTableAdapters.ACCOUNTTableAdapter ACCOUNTTableAdapter = new IACDataSetTableAdapters.ACCOUNTTableAdapter();
            IACDataSetTableAdapters.MASTERTableAdapter  MASTERTableAdapter  = new IACDataSetTableAdapters.MASTERTableAdapter();
            BindingSource MASTERBindingSource = new BindingSource();

            MASTERBindingSource.DataSource = ContingiacDataSet.MASTER;

            Object loMasterKey = ACCOUNTTableAdapter.AccountNumber("BAD_DEBTS");
            String lsMasterKey = (String)loMasterKey;

            MASTERTableAdapter.Fill(ContingiacDataSet.MASTER, lsMasterKey);

            if (ContingiacDataSet.MASTER.Rows.Count != 0)
            {
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_RSV", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_CONT", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_OLOAN", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_ADJ", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_BAD", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_LOSS", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_INT", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_NOTES", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_AMORT_CUR_OLOAN", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_AMORT_CUR_NOTES", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_AMORT_CUR_INT", 0);

                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_BAD", lnMASTER_BAD);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_YTD_BAD", ContingiacDataSet.MASTER.Rows[0].Field <Decimal>("MASTER_YTD_BAD") + lnMASTER_BAD);
                ContingiacDataSet.MASTER.Rows[0].SetField <DateTime>("MASTER_POST_DATE", DateTime.Now.Date);
                MASTERBindingSource.EndEdit();
                MASTERTableAdapter.Update(ContingiacDataSet.MASTER.Rows[0]);
                ContingiacDataSet.MASTER.AcceptChanges();
            }

            loMasterKey = ACCOUNTTableAdapter.AccountNumber("RES_LOSS");
            lsMasterKey = (String)loMasterKey;

            MASTERTableAdapter.Fill(ContingiacDataSet.MASTER, lsMasterKey);

            if (ContingiacDataSet.MASTER.Rows.Count != 0)
            {
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_RSV", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_CONT", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_OLOAN", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_ADJ", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_BAD", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_LOSS", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_INT", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_NOTES", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_AMORT_CUR_OLOAN", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_AMORT_CUR_NOTES", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_AMORT_CUR_INT", 0);

                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_RSV", lnMASTER_RSV);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_YTD_RSV", ContingiacDataSet.MASTER.Rows[0].Field <Decimal>("MASTER_YTD_RSV") + lnMASTER_RSV);
                ContingiacDataSet.MASTER.Rows[0].SetField <DateTime>("MASTER_POST_DATE", DateTime.Now.Date);
                MASTERBindingSource.EndEdit();
                MASTERTableAdapter.Update(ContingiacDataSet.MASTER.Rows[0]);
                ContingiacDataSet.MASTER.AcceptChanges();
            }

            loMasterKey = ACCOUNTTableAdapter.AccountNumber("LOSS_RES");
            lsMasterKey = (String)loMasterKey;

            MASTERTableAdapter.Fill(ContingiacDataSet.MASTER, lsMasterKey);

            if (ContingiacDataSet.MASTER.Rows.Count != 0)
            {
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_RSV", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_CONT", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_OLOAN", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_ADJ", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_BAD", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_LOSS", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_INT", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_NOTES", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_AMORT_CUR_OLOAN", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_AMORT_CUR_NOTES", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_AMORT_CUR_INT", 0);

                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_LOSS", lnMASTER_LOSS);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_YTD_LOSS", ContingiacDataSet.MASTER.Rows[0].Field <Decimal>("MASTER_YTD_LOSS") + lnMASTER_LOSS);
                ContingiacDataSet.MASTER.Rows[0].SetField <DateTime>("MASTER_POST_DATE", DateTime.Now.Date);
                MASTERBindingSource.EndEdit();
                MASTERTableAdapter.Update(ContingiacDataSet.MASTER.Rows[0]);
                ContingiacDataSet.MASTER.AcceptChanges();
            }

            loMasterKey = ACCOUNTTableAdapter.AccountNumber("ADJUST");
            lsMasterKey = (String)loMasterKey;

            MASTERTableAdapter.Fill(ContingiacDataSet.MASTER, lsMasterKey);

            if (ContingiacDataSet.MASTER.Rows.Count != 0)
            {
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_RSV", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_CONT", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_OLOAN", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_ADJ", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_BAD", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_LOSS", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_INT", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_NOTES", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_AMORT_CUR_OLOAN", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_AMORT_CUR_NOTES", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_AMORT_CUR_INT", 0);

                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_ADJ", lnMASTER_ADJ);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_YTD_ADJ", ContingiacDataSet.MASTER.Rows[0].Field <Decimal>("MASTER_YTD_ADJ") + lnMASTER_ADJ);
                ContingiacDataSet.MASTER.Rows[0].SetField <DateTime>("MASTER_POST_DATE", DateTime.Now.Date);
                MASTERBindingSource.EndEdit();
                MASTERTableAdapter.Update(ContingiacDataSet.MASTER.Rows[0]);
                ContingiacDataSet.MASTER.AcceptChanges();
            }

            loMasterKey = ACCOUNTTableAdapter.AccountNumber("CONTING");
            lsMasterKey = (String)loMasterKey;

            MASTERTableAdapter.Fill(ContingiacDataSet.MASTER, lsMasterKey);

            if (ContingiacDataSet.MASTER.Rows.Count != 0)
            {
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_RSV", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_CONT", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_OLOAN", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_ADJ", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_BAD", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_LOSS", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_INT", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_NOTES", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_AMORT_CUR_OLOAN", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_AMORT_CUR_NOTES", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_AMORT_CUR_INT", 0);

                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_CONT", lnMASTER_CONT);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_YTD_CONT", ContingiacDataSet.MASTER.Rows[0].Field <Decimal>("MASTER_YTD_CONT") + lnMASTER_CONT);
                ContingiacDataSet.MASTER.Rows[0].SetField <DateTime>("MASTER_POST_DATE", DateTime.Now.Date);
                MASTERBindingSource.EndEdit();
                MASTERTableAdapter.Update(ContingiacDataSet.MASTER.Rows[0]);
                ContingiacDataSet.MASTER.AcceptChanges();
            }

            loMasterKey = ACCOUNTTableAdapter.AccountNumber("OS_LOANS");
            lsMasterKey = (String)loMasterKey;

            MASTERTableAdapter.Fill(ContingiacDataSet.MASTER, lsMasterKey);

            if (ContingiacDataSet.MASTER.Rows.Count != 0)
            {
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_RSV", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_CONT", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_OLOAN", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_ADJ", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_BAD", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_LOSS", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_INT", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_NOTES", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_AMORT_CUR_OLOAN", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_AMORT_CUR_NOTES", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_AMORT_CUR_INT", 0);

                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_NOTES", lnMASTER_NOTES);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_YTD_NOTES", ContingiacDataSet.MASTER.Rows[0].Field <Decimal>("MASTER_YTD_NOTES") + lnMASTER_NOTES);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_OLOAN", lnMASTER_OS_LOANS);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_YTD_OLOAN", ContingiacDataSet.MASTER.Rows[0].Field <Decimal>("MASTER_YTD_OLOAN") + lnMASTER_OS_LOANS);
                ContingiacDataSet.MASTER.Rows[0].SetField <DateTime>("MASTER_POST_DATE", DateTime.Now.Date);
                MASTERBindingSource.EndEdit();
                MASTERTableAdapter.Update(ContingiacDataSet.MASTER.Rows[0]);
                ContingiacDataSet.MASTER.AcceptChanges();
            }

            loMasterKey = ACCOUNTTableAdapter.AccountNumber("AMORT_INT");
            lsMasterKey = (String)loMasterKey;

            MASTERTableAdapter.Fill(ContingiacDataSet.MASTER, lsMasterKey);

            if (ContingiacDataSet.MASTER.Rows.Count != 0)
            {
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_RSV", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_CONT", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_OLOAN", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_ADJ", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_BAD", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_LOSS", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_INT", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_CUR_NOTES", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_AMORT_CUR_OLOAN", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_AMORT_CUR_NOTES", 0);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_AMORT_CUR_INT", 0);

                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_AMORT_CUR_INT", lnMASTER_AMORT_INT);
                ContingiacDataSet.MASTER.Rows[0].SetField <Decimal>("MASTER_AMORT_YTD_INT", ContingiacDataSet.MASTER.Rows[0].Field <Decimal>("MASTER_AMORT_YTD_INT") + lnMASTER_AMORT_INT);
                ContingiacDataSet.MASTER.Rows[0].SetField <DateTime>("MASTER_POST_DATE", DateTime.Now.Date);
                MASTERBindingSource.EndEdit();
                MASTERTableAdapter.Update(ContingiacDataSet.MASTER.Rows[0]);
                ContingiacDataSet.MASTER.AcceptChanges();
            }
        }