Beispiel #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 = "-";
        }
    }
Beispiel #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 = "-";
        }
    }
    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());
        }
    }
Beispiel #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string userid = Request.QueryString["userid"].ToString();
            string role   = Request.QueryString["RoleName"].ToString();
            lblUserName.Text = "Welcome! " + Request.QueryString["FullName"].ToString();
            IsPaid           = Convert.ToBoolean(Request.QueryString["IsPaid"].ToString());
            Channel          = Request.QueryString["Channel"].ToString();
            if (Channel.StartsWith("MRTV"))
            {
                lblChannelName.Text = "MRTV Entertainment";
            }
            else
            {
                lblChannelName.Text = Channel;
            }

            if (role == "Artist")
            {
                Artist art = new ArtistRepository().selectbyUserID(Guid.Parse(userid));
                List <VoucherDetail> lstvoucher = vourep.GetVoucherByCustomerid(art.ArtistID, Channel, IsPaid);
                lblCustomerID.Text = art.ArtistID;
                gvlist.DataSource  = lstvoucher;
                gvlist.DataBind();
                for (int i = 0; i < gvlist.Rows.Count; i++)
                {
                    Label   lblAmount  = (Label)gvlist.Rows[i].FindControl("lblAmount");
                    decimal amounttest = Convert.ToDecimal(lblAmount.Text);
                    Int64   amount     = Convert.ToInt64(amounttest);
                    lblAmount.Text = amount.ToString("#,##") + " Ks";
                    Label lblChannel = (Label)gvlist.Rows[i].FindControl("lblChannel");
                    if (lblChannel.Text.Contains("CRBT"))
                    {
                        lblChannel.Text = "CRBT";
                    }
                    else
                    {
                        lblChannel.Text = "Full Song";
                    }
                }
            }
            if (role == "Composer")
            {
                Composer             comp       = new ComposerRepository().selectbyUserID(Guid.Parse(userid));
                List <VoucherDetail> lstvoucher = vourep.GetVoucherByCustomerid(comp.ComposerID, Channel, IsPaid);
                lblCustomerID.Text = comp.ComposerID;
                gvlist.DataSource  = lstvoucher;
                gvlist.DataBind();
                for (int i = 0; i < gvlist.Rows.Count; i++)
                {
                    Label   lblAmount  = (Label)gvlist.Rows[i].FindControl("lblAmount");
                    decimal amounttest = Convert.ToDecimal(lblAmount.Text);
                    Int64   amount     = Convert.ToInt64(amounttest);
                    lblAmount.Text = amount.ToString("#,##") + " Ks";
                    Label lblChannel = (Label)gvlist.Rows[i].FindControl("lblChannel");
                    if (lblChannel.Text.Contains("CRBT"))
                    {
                        lblChannel.Text = "CRBT";
                    }
                    else
                    {
                        lblChannel.Text = "Full Song";
                    }
                }
            }
            if (role == "Producer")
            {
                Producer             pro        = new ProducerRepository().selectbyUserID(Guid.Parse(userid));
                List <VoucherDetail> lstvoucher = vourep.GetVoucherByCustomerid(pro.ProducerID, Channel, IsPaid);
                lblCustomerID.Text = pro.ProducerID;
                gvlist.DataSource  = lstvoucher;
                gvlist.DataBind();
                for (int i = 0; i < gvlist.Rows.Count; i++)
                {
                    Label   lblAmount  = (Label)gvlist.Rows[i].FindControl("lblAmount");
                    decimal amounttest = Convert.ToDecimal(lblAmount.Text);
                    Int64   amount     = Convert.ToInt64(amounttest);
                    lblAmount.Text = amount.ToString("#,##") + " Ks";
                    Label lblChannel = (Label)gvlist.Rows[i].FindControl("lblChannel");
                    if (lblChannel.Text.Contains("CRBT"))
                    {
                        lblChannel.Text = "CRBT";
                    }
                    else
                    {
                        lblChannel.Text = "Full Song";
                    }
                }
            }

            if (role == "Studio")
            {
                Studio stu = new StudioRepository().selectbyUserID(Guid.Parse(userid));
                List <VoucherDetail> lstvoucher = vourep.GetVoucherByCustomerid(stu.StudioID, Channel, IsPaid);
                lblCustomerID.Text = stu.StudioID;
                gvlist.DataSource  = lstvoucher;
                gvlist.DataBind();
                for (int i = 0; i < gvlist.Rows.Count; i++)
                {
                    Label   lblAmount  = (Label)gvlist.Rows[i].FindControl("lblAmount");
                    decimal amounttest = Convert.ToDecimal(lblAmount.Text);
                    Int64   amount     = Convert.ToInt64(amounttest);
                    lblAmount.Text = amount.ToString("#,##") + " Ks";
                    Label lblChannel = (Label)gvlist.Rows[i].FindControl("lblChannel");
                    if (lblChannel.Text.Contains("CRBT"))
                    {
                        lblChannel.Text = "CRBT";
                    }
                    else
                    {
                        lblChannel.Text = "Full Song";
                    }
                }
            }

            if (role == "Band")
            {
                Band band = new BandRepository().selectbyUserID(Guid.Parse(userid));
                List <VoucherDetail> lstvoucher = vourep.GetVoucherByCustomerid(band.BandID, Channel, IsPaid);
                lblCustomerID.Text = band.BandID;
                gvlist.DataSource  = lstvoucher;
                gvlist.DataBind();
                for (int i = 0; i < gvlist.Rows.Count; i++)
                {
                    Label   lblAmount  = (Label)gvlist.Rows[i].FindControl("lblAmount");
                    decimal amounttest = Convert.ToDecimal(lblAmount.Text);
                    Int64   amount     = Convert.ToInt64(amounttest);
                    lblAmount.Text = amount.ToString("#,##") + " Ks";
                    Label lblChannel = (Label)gvlist.Rows[i].FindControl("lblChannel");
                    if (lblChannel.Text.Contains("CRBT"))
                    {
                        lblChannel.Text = "CRBT";
                    }
                    else
                    {
                        lblChannel.Text = "Full Song";
                    }
                }
            }
        }
    }
Beispiel #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string userid = Request.QueryString["userid"].ToString();
            string role   = Request.QueryString["RoleName"].ToString();
            lblUserName.Text = "Welcome! " + Request.QueryString["FullName"].ToString();
            lblRole.Text     = "Summary Report ";

            if (userid != null)
            {
                if (role == "Artist")
                {
                    Artist art = new ArtistRepository().selectbyUserID(Guid.Parse(userid));
                    if (art != null)
                    {
                        List <TotalResult> lstvoucherUn = vourep.GetSummaryAmountListsByCustomeridUnPaid(art.ArtistID).ToList();

                        if (lstvoucherUn.Count == 0)
                        {
                            amountUn         = 0;
                            lblAmountUn.Text = "0" + " Ks";
                        }
                        foreach (TotalResult t in lstvoucherUn)
                        {
                            amountUn         = Convert.ToInt64(t.Amount);
                            lblAmountUn.Text = amountUn.ToString("#,##") + " Ks";
                        }
                        List <TotalResult> lstvoucherP = vourep.GetSummaryAmountListsByCustomeridPaid(art.ArtistID).ToList();
                        if (lstvoucherP.Count == 0)
                        {
                            amountP         = 0;
                            lblAmountP.Text = "0" + " Ks";
                        }
                        foreach (TotalResult t in lstvoucherP)
                        {
                            amountP         = Convert.ToInt64(t.Amount);
                            lblAmountP.Text = amountP.ToString("#,##") + " Ks";
                        }
                        Total = amountUn + amountP;
                        if (Total == 0)
                        {
                            lblTotalAmount.Text = "0" + " Ks";
                        }
                        else
                        {
                            lblTotalAmount.Text = Total.ToString("#,##") + " Ks";
                        }
                    }


                    else
                    {
                        PanelError.Visible  = true;
                        PanelAmount.Visible = false;
                        lblMessage.Text     = "Please Check  UserID ! " + " လူႀကီးမင္​း၏  account ကိုျပန္​လည္​စစ္​​ေဆး​ေပးရန္​ Legacy Music Network သို႔ ျပန္​လည္​ဆက္​သြယ္​​ေပးပါ ";
                    }
                }
                if (role == "Composer")
                {
                    Composer comp = new ComposerRepository().selectbyUserID(Guid.Parse(userid));
                    if (comp != null)
                    {
                        List <TotalResult> lstvoucherUn = vourep.GetSummaryAmountListsByCustomeridUnPaid(comp.ComposerID).ToList();
                        if (lstvoucherUn.Count == 0)
                        {
                            amountUn         = 0;
                            lblAmountUn.Text = "0" + " Ks";
                        }
                        foreach (TotalResult t in lstvoucherUn)
                        {
                            amountUn         = Convert.ToInt64(t.Amount);
                            lblAmountUn.Text = amountUn.ToString("#,##") + " Ks";
                        }
                        List <TotalResult> lstvoucherP = vourep.GetSummaryAmountListsByCustomeridPaid(comp.ComposerID).ToList();
                        if (lstvoucherP.Count == 0)
                        {
                            amountP         = 0;
                            lblAmountP.Text = "0" + " Ks";
                        }
                        foreach (TotalResult t in lstvoucherP)
                        {
                            amountP         = Convert.ToInt64(t.Amount);
                            lblAmountP.Text = amountP.ToString("#,##") + " Ks";
                        }
                        Total = amountUn + amountP;
                        if (Total == 0)
                        {
                            lblTotalAmount.Text = "0" + " Ks";
                        }
                        else
                        {
                            lblTotalAmount.Text = Total.ToString("#,##") + " Ks";
                        }
                    }
                    else
                    {
                        PanelError.Visible  = true;
                        PanelAmount.Visible = false;
                        lblMessage.Text     = "Please Check  UserID ! " + " လူႀကီးမင္​း၏  account ကိုျပန္​လည္​စစ္​​ေဆး​ေပးရန္​ Legacy Music Network သို႔ ျပန္​လည္​ဆက္​သြယ္​​ေပးပါ ";
                    }
                }
                if (role == "Producer")
                {
                    Producer pro = new ProducerRepository().selectbyUserID(Guid.Parse(userid));
                    if (pro != null)
                    {
                        List <TotalResult> lstvoucherUn = vourep.GetSummaryAmountListsByCustomeridUnPaid(pro.ProducerID).ToList();
                        if (lstvoucherUn.Count == 0)
                        {
                            amountUn         = 0;
                            lblAmountUn.Text = "0" + " Ks";
                        }
                        foreach (TotalResult t in lstvoucherUn)
                        {
                            amountUn         = Convert.ToInt64(t.Amount);
                            lblAmountUn.Text = amountUn.ToString("#,##") + " Ks";
                        }
                        List <TotalResult> lstvoucherP = vourep.GetSummaryAmountListsByCustomeridPaid(pro.ProducerID).ToList();
                        if (lstvoucherP.Count == 0)
                        {
                            amountP         = 0;
                            lblAmountP.Text = "0" + " Ks";
                        }
                        foreach (TotalResult t in lstvoucherP)
                        {
                            amountP         = Convert.ToInt64(t.Amount);
                            lblAmountP.Text = amountP.ToString("#,##") + " Ks";
                        }
                        Total = amountUn + amountP;
                        if (Total == 0)
                        {
                            lblTotalAmount.Text = "0" + " Ks";
                        }
                        else
                        {
                            lblTotalAmount.Text = Total.ToString("#,##") + " Ks";
                        }
                    }
                    else
                    {
                        PanelError.Visible  = true;
                        PanelAmount.Visible = false;
                        lblMessage.Text     = "Please Check  UserID ! " + " လူႀကီးမင္​း၏  account ကိုျပန္​လည္​စစ္​​ေဆး​ေပးရန္​ Legacy Music Network သို႔ ျပန္​လည္​ဆက္​သြယ္​​ေပးပါ ";
                    }
                }
                if (role == "Studio")
                {
                    Studio stu = new StudioRepository().selectbyUserID(Guid.Parse(userid));
                    if (stu != null)
                    {
                        List <TotalResult> lstvoucherUn = vourep.GetSummaryAmountListsByCustomeridUnPaid(stu.StudioID).ToList();
                        if (lstvoucherUn.Count == 0)
                        {
                            amountUn         = 0;
                            lblAmountUn.Text = "0" + " Ks";
                        }
                        foreach (TotalResult t in lstvoucherUn)
                        {
                            amountUn         = Convert.ToInt64(t.Amount);
                            lblAmountUn.Text = amountUn.ToString("#,##") + " Ks";
                        }
                        List <TotalResult> lstvoucherP = vourep.GetSummaryAmountListsByCustomeridPaid(stu.StudioID).ToList();
                        if (lstvoucherP.Count == 0)
                        {
                            amountP         = 0;
                            lblAmountP.Text = "0" + " Ks";
                        }
                        foreach (TotalResult t in lstvoucherP)
                        {
                            amountP         = Convert.ToInt64(t.Amount);
                            lblAmountP.Text = amountP.ToString("#,##") + " Ks";
                        }
                        Total = amountUn + amountP;
                        if (Total == 0)
                        {
                            lblTotalAmount.Text = "0" + " Ks";
                        }
                        else
                        {
                            lblTotalAmount.Text = Total.ToString("#,##") + " Ks";
                        }
                    }
                    else
                    {
                        PanelError.Visible  = true;
                        PanelAmount.Visible = false;
                        lblMessage.Text     = "Please Check  UserID ! " + " လူႀကီးမင္​း၏  account ကိုျပန္​လည္​စစ္​​ေဆး​ေပးရန္​ Legacy Music Network သို႔ ျပန္​လည္​ဆက္​သြယ္​​ေပးပါ ";
                    }
                }
                if (role == "Band")
                {
                    Band band = new BandRepository().selectbyUserID(Guid.Parse(userid));
                    if (band != null)
                    {
                        List <TotalResult> lstvoucherUn = vourep.GetSummaryAmountListsByCustomeridUnPaid(band.BandID).ToList();
                        if (lstvoucherUn.Count == 0)
                        {
                            amountUn         = 0;
                            lblAmountUn.Text = "0" + " Ks";
                        }
                        foreach (TotalResult t in lstvoucherUn)
                        {
                            amountUn         = Convert.ToInt64(t.Amount);
                            lblAmountUn.Text = amountUn.ToString("#,##") + " Ks";
                        }
                        List <TotalResult> lstvoucherP = vourep.GetSummaryAmountListsByCustomeridPaid(band.BandID).ToList();
                        if (lstvoucherP.Count == 0)
                        {
                            amountP         = 0;
                            lblAmountP.Text = "0" + " Ks";
                        }
                        foreach (TotalResult t in lstvoucherP)
                        {
                            amountP         = Convert.ToInt64(t.Amount);
                            lblAmountP.Text = amountP.ToString("#,##") + " Ks";
                        }

                        Total = amountUn + amountP;
                        if (Total == 0)
                        {
                            lblTotalAmount.Text = "0" + " Ks";
                        }
                        else
                        {
                            lblTotalAmount.Text = Total.ToString("#,##") + " Ks";
                        }
                    }
                    else
                    {
                        PanelError.Visible  = true;
                        PanelAmount.Visible = false;
                        lblMessage.Text     = "Please Check  UserID ! " + " လူႀကီးမင္​း၏  account ကိုျပန္​လည္​စစ္​​ေဆး​ေပးရန္​ Legacy Music Network သို႔ ျပန္​လည္​ဆက္​သြယ္​​ေပးပါ ";
                    }
                }
            }
            else
            {
                PanelError.Visible  = true;
                PanelAmount.Visible = false;
                lblMessage.Text     = "Please Check  UserID ! " + " လူႀကီးမင္​း၏  account ကိုျပန္​လည္​စစ္​​ေဆး​ေပးရန္​ Legacy Music Network သို႔ ျပန္​လည္​ဆက္​သြယ္​​ေပးပါ ";
            }
        }
    }
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        username = Request.QueryString["FullName"].ToString();
        aspnet_User user1 = userrepo.selectByUserName(username);

        if (rbtnArtist.Checked)
        {
            aspnet_User user      = userrepo.selectByUserName(username + "a");
            Artist      tblartist = new ArtistRepository().selectbyUserID(user1.UserId);

            if (user != null)
            {
                username            = user.UserName;
                userID              = user.UserId;
                Session["userid"]   = userID;
                Session["UserName"] = username;
                Session["RoleName"] = "Artist";
                Response.Redirect("~/SummaryReport.aspx?FullName=" + Request.QueryString["FullName"].ToString() + "&userid=" + userID + "&RoleName=" + "Artist");
                Session.Clear();
            }
            else if (tblartist != null)
            {
                Session["userid"]   = user1.UserId;
                Session["UserName"] = user1.UserName;
                Session["RoleName"] = "Artist";
                Response.Redirect("~/SummaryReport.aspx?FullName=" + Request.QueryString["FullName"].ToString() + "&userid=" + user1.UserId + "&RoleName=" + "Artist");
                Session.Clear();
            }
            else
            {
                lblMessage.Text = username + " doesn't have artist layer ";
            }
        }

        if (rbtnComposer.Checked)
        {
            aspnet_User user        = userrepo.selectByUserName(username + "c");
            Composer    tblcomposer = new ComposerRepository().selectbyUserID(user1.UserId);

            if (user != null)
            {
                username            = user.UserName;
                userID              = user.UserId;
                Session["userid"]   = userID;
                Session["UserName"] = username;
                Session["RoleName"] = "Composer";
                Response.Redirect("~/SummaryReport.aspx?FullName=" + Request.QueryString["FullName"].ToString() + "&userid=" + userID + "&RoleName=" + "Composer");
                Session.Clear();
            }
            else if (tblcomposer != null)
            {
                Session["userid"]   = user1.UserId;
                Session["UserName"] = user1.UserName;
                Session["RoleName"] = "Composer";
                Response.Redirect("~/SummaryReport.aspx?FullName=" + Request.QueryString["FullName"].ToString() + "&userid=" + user1.UserId + "&RoleName=" + "Composer");
                Session.Clear();
            }
            else
            {
                lblMessage.Text = username + " doesn't have  composer layer ";
            }
        }

        if (rbtnProducer.Checked)
        {
            aspnet_User user        = userrepo.selectByUserName(username + "p");
            Producer    tblproducer = new ProducerRepository().selectbyUserID(user1.UserId);

            if (user != null)
            {
                username            = user.UserName;
                userID              = user.UserId;
                Session["userid"]   = userID;
                Session["UserName"] = username;
                Session["RoleName"] = "Producer";
                Response.Redirect("~/SummaryReport.aspx?FullName=" + Request.QueryString["FullName"].ToString() + "&userid=" + userID + "&RoleName=" + "Producer");
                Session.Clear();
            }
            else if (tblproducer != null)
            {
                Session["userid"]   = user1.UserId;
                Session["UserName"] = user1.UserName;
                Session["RoleName"] = "Producer";
                Response.Redirect("~/SummaryReport.aspx?FullName=" + Request.QueryString["FullName"].ToString() + "&userid=" + user1.UserId + "&RoleName=" + "Producer");
                Session.Clear();
            }

            else
            {
                lblMessage.Text = username + " doesn't have producer layer ";
            }
        }
        if (rbtnBand.Checked)
        {
            aspnet_User user    = userrepo.selectByUserName(username + "b");
            Band        tblband = new BandRepository().selectbyUserID(user1.UserId);

            if (user != null)
            {
                username            = user.UserName;
                userID              = user.UserId;
                Session["userid"]   = userID;
                Session["UserName"] = username;
                Session["RoleName"] = "Band";
                Response.Redirect("~/SummaryReport.aspx?FullName=" + Request.QueryString["FullName"].ToString() + "&userid=" + userID + "&RoleName=" + "Band");
                Session.Clear();
            }
            else if (tblband != null)
            {
                Session["userid"]   = user1.UserId;
                Session["UserName"] = user1.UserName;
                Session["RoleName"] = "Band";
                Response.Redirect("~/SummaryReport.aspx?FullName=" + Request.QueryString["FullName"].ToString() + "&userid=" + user1.UserId + "&RoleName=" + "Band");
                Session.Clear();
            }
            else
            {
                lblMessage.Text = username + " doesn't have band layer ";
            }
        }
        if (rbtnStudio.Checked)
        {
            aspnet_User user      = userrepo.selectByUserName(username + "d");
            Studio      tblstudio = new StudioRepository().selectbyUserID(user1.UserId);

            if (user != null)
            {
                username            = user.UserName;
                userID              = user.UserId;
                Session["userid"]   = userID;
                Session["UserName"] = username;
                Session["RoleName"] = "Studio";
                Response.Redirect("~/SummaryReport.aspx?FullName=" + Request.QueryString["FullName"].ToString() + "&userid=" + userID + "&RoleName=" + "Studio");
                Session.Clear();
            }
            else if (tblstudio != null)
            {
                Session["userid"]   = user1.UserId;
                Session["UserName"] = user1.UserName;
                Session["RoleName"] = "Studio";
                Response.Redirect("~/SummaryReport.aspx?FullName=" + Request.QueryString["FullName"].ToString() + "&userid=" + user1.UserId + "&RoleName=" + "Studio");
                Session.Clear();
            }

            else
            {
                lblMessage.Text = username + " doesn't have studio layer ";
            }
        }
        else
        {
            // ImgChoose.Visible = true;
        }
    }
Beispiel #7
0
 public ComposerService(DbEntitiesContext context)
 {
     composerRepository = new ComposerRepository(context);
 }
Beispiel #8
0
 public ComposerService()
     : base(new DbEntitiesContext())
 {
     composerRepository = new ComposerRepository();
 }
    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();
        }
    }