protected void TakeCustomerID() { ComposerRepository composerrep = new ComposerRepository(); IQueryable <Composer> lstComposer = composerrep.SelectByGroupName("1"); foreach (Composer c in lstComposer) { FVoucherRepository fvoucherrep = new FVoucherRepository(); List <FVoucherDisplayClass> lstvoucherdisplay = fvoucherrep.ListNoDate("Kyat", "UnPaid", "", c.ComposerID, "Composer"); //datarecord = lstvoucherdisplay.Count().ToString(); //totalsongcount = lstvoucherdisplay.GroupBy(s => s.SongID).Count().ToString(); kyat = lstvoucherdisplay.Where(s => s.CurrencyType == "Kyat" && s.IsPaid == false).Sum(s => s.Amount).ToString(); USD = lstvoucherdisplay.Where(s => s.CurrencyType == "$" && s.IsPaid == false).Sum(s => s.Amount).ToString(); totalAmountkyat = Convert.ToDecimal(kyat); totalAmountusd = Convert.ToDecimal(USD); name += c.ComposerName + " : " + totalAmountkyat + "Kyats " + totalAmountusd + " USD <br>"; } lblName.Text = name; if (kyat == "0" && USD == "0") { totalamount = "-"; } }
protected void TakeCustomerID(Guid userid) { //int totalAmountfec = 0; ComposerRepository composerrep = new ComposerRepository(); //Composer tblcomposer = composerrep.GetComposerByUserID(userid); //customerid = tblcomposer.ComposerID; IQueryable <Composer> lstComposer = composerrep.SelectByGroupName("1"); foreach (Composer c in lstComposer) { FVoucherRepository fvoucherrep = new FVoucherRepository(); List <FVoucherDisplayClass> lstvoucherdisplay = fvoucherrep.ListNoDate("Kyat", "UnPaid", "", c.ComposerID, "Composer"); //datarecord = lstvoucherdisplay.Count().ToString(); //totalsongcount = lstvoucherdisplay.GroupBy(s => s.SongID).Count().ToString(); kyat = lstvoucherdisplay.Where(s => s.CurrencyType == "Kyat" && s.IsPaid == false).Sum(s => s.Amount).ToString(); USD = lstvoucherdisplay.Where(s => s.CurrencyType == "$" && s.IsPaid == false).Sum(s => s.Amount).ToString(); //fec = lstvoucherdisplay.ToList().Where(s => s.CurrencyType == "Fec" && s.IsPaid == false).Sum(s => s.Amount).ToString(); totalAmountkyat += Convert.ToDecimal(kyat); totalAmountusd += Convert.ToDecimal(USD); } lblTotalAmount.Text += totalAmountkyat + " Kyats " + totalAmountusd + " USD "; lblmyanpro.Text += (totalAmountkyat * 5) / 100 + " Kyats " + (totalAmountusd * 5) / 100 + " USD "; if (kyat == "0" && USD == "0") { totalamount = "-"; } }