示例#1
0
    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 = "-";
        }
    }
示例#2
0
    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 + "&nbsp;Kyats&nbsp;&nbsp;&nbsp;" + totalAmountusd + "&nbsp;USD&nbsp;&nbsp;&nbsp;";
        lblmyanpro.Text     += (totalAmountkyat * 5) / 100 + "&nbsp;Kyats&nbsp;&nbsp;&nbsp;" + (totalAmountusd * 5) / 100 + "&nbsp;USD&nbsp;&nbsp;&nbsp;";
        if (kyat == "0" && USD == "0")
        {
            totalamount = "-";
        }
    }