private static decimal GetValue(GLRecordAmounts glRecordAmounts, int i, int monthID) { switch (i) { case 1: return(glRecordAmounts.Get(monthID).Mtd); case 2: return(glRecordAmounts.Get(monthID).Qtd); case 3: return(glRecordAmounts.Get(monthID).Ytd); default: return(0); } }
public List <GLRecord> GetSourceData() { List <GLRecord> sourceData = new List <GLRecord>(); GLDataMembers objGLDataMembers = new GLDataMembers(); objGLDataMembers.AddOrUpdate(1, 105); objGLDataMembers.AddOrUpdate(2, 105); objGLDataMembers.AddOrUpdate(3, 10); objGLDataMembers.AddOrUpdate(4, 103); GLRecordAmounts gLRecordAmounts = new GLRecordAmounts(); gLRecordAmounts.Add(385, new GLRecordAmount(2000, 2000, 2000)); gLRecordAmounts.Add(386, new GLRecordAmount(2500, 4500, 4500)); gLRecordAmounts.Add(387, new GLRecordAmount(3000, 7500, 7500)); gLRecordAmounts.Add(388, new GLRecordAmount(3500, 3500, 11000)); gLRecordAmounts.Add(389, new GLRecordAmount(4000, 7500, 15000)); gLRecordAmounts.Add(390, new GLRecordAmount(4500, 12000, 19500)); gLRecordAmounts.Add(391, new GLRecordAmount(5000, 5000, 24500)); gLRecordAmounts.Add(392, new GLRecordAmount(5500, 10500, 30000)); gLRecordAmounts.Add(393, new GLRecordAmount(6000, 16500, 36000)); gLRecordAmounts.Add(394, new GLRecordAmount(6500, 6500, 42500)); gLRecordAmounts.Add(395, new GLRecordAmount(7000, 13500, 49500)); gLRecordAmounts.Add(396, new GLRecordAmount(7500, 21000, 57000)); sourceData.Add(new GLRecord(1, 10, objGLDataMembers, gLRecordAmounts)); objGLDataMembers = new GLDataMembers(); objGLDataMembers.AddOrUpdate(1, 106); objGLDataMembers.AddOrUpdate(2, 107); objGLDataMembers.AddOrUpdate(3, 10); objGLDataMembers.AddOrUpdate(4, 104); gLRecordAmounts = new GLRecordAmounts(); gLRecordAmounts.Add(385, new GLRecordAmount(3000, 3000, 3000)); gLRecordAmounts.Add(386, new GLRecordAmount(3500, 6500, 6500)); gLRecordAmounts.Add(387, new GLRecordAmount(4000, 10500, 10500)); gLRecordAmounts.Add(388, new GLRecordAmount(4500, 4500, 15000)); gLRecordAmounts.Add(389, new GLRecordAmount(5000, 9500, 20000)); gLRecordAmounts.Add(390, new GLRecordAmount(5500, 15000, 25500)); gLRecordAmounts.Add(391, new GLRecordAmount(6000, 6000, 31500)); gLRecordAmounts.Add(392, new GLRecordAmount(6500, 12500, 38000)); gLRecordAmounts.Add(393, new GLRecordAmount(7000, 19500, 45000)); gLRecordAmounts.Add(394, new GLRecordAmount(7500, 7500, 52500)); gLRecordAmounts.Add(395, new GLRecordAmount(8000, 15500, 60500)); gLRecordAmounts.Add(396, new GLRecordAmount(8500, 24000, 69000)); sourceData.Add(new GLRecord(1, 10, objGLDataMembers, gLRecordAmounts)); objGLDataMembers = new GLDataMembers(); objGLDataMembers.AddOrUpdate(1, 107); objGLDataMembers.AddOrUpdate(2, 105); objGLDataMembers.AddOrUpdate(3, 10); objGLDataMembers.AddOrUpdate(4, 105); gLRecordAmounts = new GLRecordAmounts(); gLRecordAmounts.Add(385, new GLRecordAmount(1000, 1000, 1000)); gLRecordAmounts.Add(386, new GLRecordAmount(1500, 2500, 2500)); gLRecordAmounts.Add(387, new GLRecordAmount(2000, 4500, 4500)); gLRecordAmounts.Add(388, new GLRecordAmount(2500, 2500, 7000)); gLRecordAmounts.Add(389, new GLRecordAmount(3000, 5500, 10000)); gLRecordAmounts.Add(390, new GLRecordAmount(3500, 9000, 13500)); gLRecordAmounts.Add(391, new GLRecordAmount(4000, 4000, 17500)); gLRecordAmounts.Add(392, new GLRecordAmount(4500, 8500, 22000)); gLRecordAmounts.Add(393, new GLRecordAmount(5000, 13500, 27000)); gLRecordAmounts.Add(394, new GLRecordAmount(5500, 5500, 32500)); gLRecordAmounts.Add(395, new GLRecordAmount(6000, 11500, 38500)); gLRecordAmounts.Add(396, new GLRecordAmount(6500, 18000, 45000)); sourceData.Add(new GLRecord(1, 10, objGLDataMembers, gLRecordAmounts)); objGLDataMembers = new GLDataMembers(); objGLDataMembers.AddOrUpdate(1, 108); objGLDataMembers.AddOrUpdate(2, 107); objGLDataMembers.AddOrUpdate(3, 10); objGLDataMembers.AddOrUpdate(4, 104); gLRecordAmounts = new GLRecordAmounts(); gLRecordAmounts.Add(385, new GLRecordAmount(3500, 3500, 3500)); gLRecordAmounts.Add(386, new GLRecordAmount(4000, 7500, 7500)); gLRecordAmounts.Add(387, new GLRecordAmount(4500, 12000, 12000)); gLRecordAmounts.Add(388, new GLRecordAmount(5000, 5000, 17000)); gLRecordAmounts.Add(389, new GLRecordAmount(5500, 10500, 22500)); gLRecordAmounts.Add(390, new GLRecordAmount(6000, 16500, 28500)); gLRecordAmounts.Add(391, new GLRecordAmount(6500, 6500, 35000)); gLRecordAmounts.Add(392, new GLRecordAmount(7000, 13500, 42000)); gLRecordAmounts.Add(393, new GLRecordAmount(7500, 21000, 49500)); gLRecordAmounts.Add(394, new GLRecordAmount(8000, 8000, 57500)); gLRecordAmounts.Add(395, new GLRecordAmount(8500, 16500, 66000)); gLRecordAmounts.Add(396, new GLRecordAmount(9000, 25500, 70000)); sourceData.Add(new GLRecord(1, 10, objGLDataMembers, gLRecordAmounts)); return(sourceData); }