Ejemplo n.º 1
0
    protected void btncheck_Click(object sender, EventArgs e)
    {
        if (rbtnunpaid.Checked)
        {
            GridDataBind();
            Response.Redirect("~/TotalAmount.aspx?DataRecord=" + datarecord + "&TotalSongCount=" + totalsongcount + "&TotalAmount=" + totalamount + "&CustomerID=" + customerid + "&rolename=" + rolename + "&FullName=" + Request.QueryString["FullName"].ToString());
        }
        else
        {
            userid   = Guid.Parse(Session["userid"].ToString());
            rolename = userprofilerep.SelectRolesByUser(userid);
            if (rolename == "Producer")
            {
                ProducerRepository producerrep = new ProducerRepository();
                Producer           tblproducer = producerrep.GetProducerByUserID(userid);
                customerid = tblproducer.ProducerID;
            }
            else if (rolename == "Composer")
            {
                ComposerRepository composerrep = new ComposerRepository();
                Composer           tblcomposer = composerrep.GetComposerByUserID(userid);
                customerid = tblcomposer.ComposerID;
            }
            else if (rolename == "Artist")
            {
                ArtistRepository artistrep = new ArtistRepository();
                Artist           tblartist = artistrep.GetArtistByUserID(userid);
                customerid = tblartist.ArtistID;
            }

            else if (rolename == "Band")
            {
                BandRepository bandrep = new BandRepository();
                Band           tblband = bandrep.GetBandByUserID(userid);
                customerid = tblband.BandID;
            }
            else if (rolename == "Studio")
            {
                StudioRepository studiorep = new StudioRepository();
                Studio           tblstudio = studiorep.GetStudioByUserID(userid);
                customerid = tblstudio.StudioID;
            }
            Response.Redirect("~/PaidTotal.aspx?CustomerID=" + customerid + "&FullName=" + Request.QueryString["FullName"].ToString());
        }
    }
Ejemplo n.º 2
0
    private void GridDataBind()
    {
        try
        {
            userid   = Guid.Parse(Session["userid"].ToString());
            rolename = userprofilerep.SelectRolesByUser(userid);


            if (rolename == "Producer")
            {
                ProducerRepository producerrep = new ProducerRepository();
                Producer           tblproducer = producerrep.GetProducerByUserID(userid);
                customerid = tblproducer.ProducerID;
            }
            else if (rolename == "Composer")
            {
                ComposerRepository composerrep = new ComposerRepository();
                Composer           tblcomposer = composerrep.GetComposerByUserID(userid);
                customerid = tblcomposer.ComposerID;
            }
            else if (rolename == "Artist")
            {
                ArtistRepository artistrep = new ArtistRepository();
                Artist           tblartist = artistrep.GetArtistByUserID(userid);
                customerid = tblartist.ArtistID;
            }

            else if (rolename == "Band")
            {
                BandRepository bandrep = new BandRepository();
                Band           tblband = bandrep.GetBandByUserID(userid);
                customerid = tblband.BandID;
            }
            else if (rolename == "Studio")
            {
                StudioRepository studiorep = new StudioRepository();
                Studio           tblstudio = studiorep.GetStudioByUserID(userid);
                customerid = tblstudio.StudioID;
            }
            List <CheckAmt> lstcheck = fvoucherrep.listChkamt(customerid);//UnPaid
            if (lstcheck.Count > 0)
            {
                foreach (CheckAmt chkamt in lstcheck)
                {
                    amt       = amt + chkamt.Amount;
                    kyat      = amt.ToString();
                    record    = record + Convert.ToInt32(chkamt.Datarecord);
                    songcount = songcount + Convert.ToInt32(chkamt.Totalsongcount);
                }
                datarecord     = record.ToString();
                totalsongcount = songcount.ToString();
                totalamount   += decimal.Round(Convert.ToDecimal(kyat), 2) + "&nbsp;Kyats";
            }
            else
            {
                datarecord     = "-";
                totalsongcount = "-";
                totalamount    = "-";
            }
        }
        catch (Exception ex)
        {
            ex.Message.ToString();
        }
    }