예제 #1
0
        private void FillTokenGenerationData(string sQr)
        {
            DataTable dtDetail = new DataTable();

            InitilizeTokenGenerationGrid();
            dtDetail = objMainClass.fnFillDataTable(sQr);
            if (dtDetail.Rows.Count > 0)
            {
                for (int i = 0; i <= dtDetail.Rows.Count - 1; i++)
                {
                    dgDealerDetail.Rows.Add();

                    dgDealerDetail.Rows[dgDealerDetail.Rows.Count - 1].Cells["UserId"].Value     = dtDetail.Rows[i]["UserId"];
                    dgDealerDetail.Rows[dgDealerDetail.Rows.Count - 1].Cells["Clientname"].Value = dtDetail.Rows[i]["Clientname"];
                    dgDealerDetail.Rows[dgDealerDetail.Rows.Count - 1].Cells["Username"].Value   = dtDetail.Rows[i]["Username"];
                    dgDealerDetail.Rows[dgDealerDetail.Rows.Count - 1].Cells["email"].Value      = dtDetail.Rows[i]["Useremail"];
                    dgDealerDetail.Rows[dgDealerDetail.Rows.Count - 1].Cells["MusicType"].Value  = dtDetail.Rows[i]["MusicType"];
                    dgDealerDetail.Rows[dgDealerDetail.Rows.Count - 1].Cells["Tokens"].Value     = dtDetail.Rows[i]["NoofToken"];
                }
            }
            foreach (DataGridViewRow row in dgDealerDetail.Rows)
            {
                row.Height = 30;
            }
        }
예제 #2
0
        private void cmbClientName_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (Convert.ToInt32(cmbClientName.SelectedValue) == 0)
            {
                lblDealerCode.Text     = "";
                lblCopyleftToken.Text  = "";
                lblCopyrightToken.Text = "";
                lblAsianToken.Text     = "";
                lblTotalTokens.Text    = "";
                InitilizeGrid();
                return;
            }


            string sQr = "";

            sQr = " spDealerLedgerSummary " + Convert.ToInt32(cmbClientName.SelectedValue);
            DataTable dtDetail = new DataTable();

            dtDetail = objMainClass.fnFillDataTable(sQr);
            if (dtDetail.Rows.Count > 0)
            {
                try {
                    lblCopyleftToken.Text  = Convert.ToString(dtDetail.Rows[0]["CLToken"]);
                    lblCopyrightToken.Text = Convert.ToString(dtDetail.Rows[0]["CRToken"]);
                    lblAsianToken.Text     = Convert.ToString(dtDetail.Rows[0]["ADToken"]);
                    lblTotalTokens.Text    = Convert.ToString(dtDetail.Rows[0]["IssueTokens"]);
                    lblDealerCode.Text     = Convert.ToString(dtDetail.Rows[0]["DealerCode"]);
                }
                catch (Exception ex)
                {
                }
            }
            FillData();
        }
예제 #3
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            DataTable dtPrv = new DataTable();

            if (SubmitValidationGet() == false)
            {
                return;
            }
            string str = "";

            str   = "select *  from tbStreamPlaylistSchedule where streamPlaylistid=" + Convert.ToInt32(cmbStreamName.SelectedValue) + " and  '" + string.Format(fi, "{0:hh:mm tt}", dtpStartTime.Value.AddMinutes(1)) + "' between starttime and endtime";
            dtPrv = objMainClass.fnFillDataTable(str);
            if (dtPrv.Rows.Count > 0)
            {
                if (StaticClass.constr.State == ConnectionState.Open)
                {
                    StaticClass.constr.Close();
                }
                StaticClass.constr.Open();
                SqlCommand cmdTit = new SqlCommand();
                cmdTit.Connection = StaticClass.constr;
                str = "";
                str = "delete from tbStreamPlaylistSchedule where streamPlaylistid=" + Convert.ToInt32(cmbStreamName.SelectedValue) + " and   '" + string.Format(fi, "{0:hh:mm tt}", dtpStartTime.Value.AddMinutes(1)) + "' between starttime and endtime";
                cmdTit.CommandText = str;
                cmdTit.ExecuteNonQuery();
                StaticClass.constr.Close();
            }
            str   = "";
            str   = "select *  from tbStreamPlaylistSchedule where streamPlaylistid=" + Convert.ToInt32(cmbStreamName.SelectedValue) + " and   '" + string.Format(fi, "{0:hh:mm tt}", dtpEndTime.Value.AddMinutes(-1)) + "' between starttime and endtime";
            dtPrv = objMainClass.fnFillDataTable(str);
            if (dtPrv.Rows.Count > 0)
            {
                if (StaticClass.constr.State == ConnectionState.Open)
                {
                    StaticClass.constr.Close();
                }
                StaticClass.constr.Open();
                SqlCommand cmd = new SqlCommand();
                cmd.Connection  = StaticClass.constr;
                str             = "";
                str             = "delete from tbStreamPlaylistSchedule where streamPlaylistid=" + Convert.ToInt32(cmbStreamName.SelectedValue) + " and   '" + string.Format(fi, "{0:hh:mm tt}", dtpEndTime.Value.AddMinutes(-1)) + "' between starttime and endtime";
                cmd.CommandText = str;
                cmd.ExecuteNonQuery();
                StaticClass.constr.Close();
            }
            if (StaticClass.constr.State == ConnectionState.Open)
            {
                StaticClass.constr.Close();
            }
            StaticClass.constr.Open();
            SqlCommand cmdS = new SqlCommand();

            cmdS.Connection  = StaticClass.constr;
            str              = "";
            str              = "insert into tbStreamPlaylistSchedule(streamPlaylistid,splPlaylistid,StartTime,EndTime,FormatId) values(" + Convert.ToInt32(cmbStreamName.SelectedValue) + "," + Convert.ToInt32(cmbSplPlaylist.SelectedValue) + ", '" + string.Format(fi, "{0:hh:mm tt}", dtpStartTime.Value) + "','" + string.Format(fi, "{0:hh:mm tt}", dtpEndTime.Value) + "'," + Convert.ToInt32(cmbFormat.SelectedValue) + ")";
            cmdS.CommandText = str;
            cmdS.ExecuteNonQuery();
            StaticClass.constr.Close();
            FillSaveData();
        }
예제 #4
0
        private void FillData()
        {
            string sQr = "";

            sQr = "GetTokenInfo " + Convert.ToInt32(cmbSaveCustomer.SelectedValue);

            DataTable dtDetail = new DataTable();

            InitilizeGrid();
            dtDetail = objMainClass.fnFillDataTable(sQr);
            if (dtDetail.Rows.Count > 0)
            {
                for (int i = 0; i <= dtDetail.Rows.Count - 1; i++)
                {
                    dgToken.Rows.Add();
                    dgToken.Rows[dgToken.Rows.Count - 1].Cells["Id"].Value     = dtDetail.Rows[i]["tokenid"];
                    dgToken.Rows[dgToken.Rows.Count - 1].Cells[1].Value        = 0;
                    dgToken.Rows[dgToken.Rows.Count - 1].Cells["tNo"].Value    = dtDetail.Rows[i]["tNo"].ToString();
                    dgToken.Rows[dgToken.Rows.Count - 1].Cells["pName"].Value  = dtDetail.Rows[i]["PersonName"].ToString();
                    dgToken.Rows[dgToken.Rows.Count - 1].Cells["loc"].Value    = dtDetail.Rows[i]["Location"].ToString();
                    dgToken.Rows[dgToken.Rows.Count - 1].Cells["cName"].Value  = dtDetail.Rows[i]["CityName"].ToString();
                    dgToken.Rows[dgToken.Rows.Count - 1].Cells["sName"].Value  = dtDetail.Rows[i]["StateName"].ToString();
                    dgToken.Rows[dgToken.Rows.Count - 1].Cells["coName"].Value = dtDetail.Rows[i]["CountryName"].ToString();
                    if (Convert.ToBoolean(dtDetail.Rows[i]["IsStore"]) == true)
                    {
                        dgToken.Rows[dgToken.Rows.Count - 1].Cells["ver"].Value = "Store";
                    }
                    else
                    {
                        dgToken.Rows[dgToken.Rows.Count - 1].Cells["ver"].Value = "Stream";
                    }
                    dgToken.Rows[dgToken.Rows.Count - 1].Cells["uId"].Value = dtDetail.Rows[i]["userid"].ToString();
                }
            }
        }
예제 #5
0
        public frmChangeAppMiddleImage()
        {
            InitializeComponent();
            DataTable dtDetail = new DataTable();
            string    str      = "Select * from  tblMiddleImage_App";

            dtDetail = objMainClass.fnFillDataTable(str);
            picImage.ImageLocation = dtDetail.Rows[0]["imgPath"].ToString();
        }
예제 #6
0
        private void FillGrid(string str)
        {
            int iCtr;

            string TitleTime = "";

            try
            {
                InitilizeGrid(dgCommanGrid);
                DataTable dtDetail;
                dtDetail = objMainClass.fnFillDataTable(str);
                if ((dtDetail.Rows.Count > 0))
                {
                    for (iCtr = 0; (iCtr <= (dtDetail.Rows.Count - 1)); iCtr++)
                    {
                        dgCommanGrid.Rows.Add();
                        dgCommanGrid.Rows[dgCommanGrid.Rows.Count - 1].Cells["songid"].Value   = dtDetail.Rows[iCtr]["TitleID"];
                        dgCommanGrid.Rows[dgCommanGrid.Rows.Count - 1].Cells["songname"].Value = dtDetail.Rows[iCtr]["Title"];

                        string   strTime = dtDetail.Rows[iCtr]["Time"].ToString();
                        string[] arr     = strTime.Split(':');
                        TitleTime = arr[1] + ":" + arr[2];

                        dgCommanGrid.Rows[dgCommanGrid.Rows.Count - 1].Cells["Length"].Value = TitleTime;
                        dgCommanGrid.Rows[dgCommanGrid.Rows.Count - 1].Cells["Artist"].Value = dtDetail.Rows[iCtr]["ArtistName"];
                        dgCommanGrid.Rows[dgCommanGrid.Rows.Count - 1].Cells["Album"].Value  = dtDetail.Rows[iCtr]["AlbumName"];


                        dgCommanGrid.Rows[dgCommanGrid.Rows.Count - 1].Cells["Genre"].Value    = dtDetail.Rows[iCtr]["genre"];
                        dgCommanGrid.Rows[dgCommanGrid.Rows.Count - 1].Cells["Tempo"].Value    = dtDetail.Rows[iCtr]["Tempo"];
                        dgCommanGrid.Rows[dgCommanGrid.Rows.Count - 1].Cells["year"].Value     = dtDetail.Rows[iCtr]["TitleYear"];
                        dgCommanGrid.Rows[dgCommanGrid.Rows.Count - 1].Cells["Category"].Value = dtDetail.Rows[iCtr]["Category"];

                        dgCommanGrid.Rows[dgCommanGrid.Rows.Count - 1].Cells["songname"].Style.Font = new Font("Segoe UI", 9, System.Drawing.FontStyle.Regular);
                        dgCommanGrid.Rows[dgCommanGrid.Rows.Count - 1].Cells["Artist"].Style.Font   = new Font("Segoe UI", 9, System.Drawing.FontStyle.Regular);
                        dgCommanGrid.Rows[dgCommanGrid.Rows.Count - 1].Cells["Album"].Style.Font    = new Font("Segoe UI", 9, System.Drawing.FontStyle.Regular);
                        dgCommanGrid.Rows[dgCommanGrid.Rows.Count - 1].Cells["Genre"].Style.Font    = new Font("Segoe UI", 9, System.Drawing.FontStyle.Regular);
                        dgCommanGrid.Rows[dgCommanGrid.Rows.Count - 1].Cells["Category"].Style.Font = new Font("Segoe UI", 9, System.Drawing.FontStyle.Regular);
                        dgCommanGrid.Rows[dgCommanGrid.Rows.Count - 1].Cells["Tempo"].Style.Font    = new Font("Segoe UI", 9, System.Drawing.FontStyle.Regular);
                        dgCommanGrid.Rows[dgCommanGrid.Rows.Count - 1].Cells["year"].Style.Font     = new Font("Segoe UI", 9, System.Drawing.FontStyle.Regular);
                    }
                }
            }

            catch
            {
                return;
            }
        }
예제 #7
0
        private void FillData(Int32 splPlaylistId)
        {
            string    str;
            int       iCtr;
            DataTable dtDetail = new DataTable();

            str      = "Select * from  tbSeparation ";
            str      = str + " inner join tbSpecialPlaylists on tbSeparation.splPlaylistId = tbSpecialPlaylists.splPlaylistId ";
            str      = str + " where tbSeparation.splPlaylistId= " + splPlaylistId + " ";
            dtDetail = objMainClass.fnFillDataTable(str);

            InitilizeGrid();

            if ((dtDetail.Rows.Count > 0))
            {
                for (iCtr = 0; (iCtr <= (dtDetail.Rows.Count - 1)); iCtr++)
                {
                    dgSp.Rows.Add();
                    dgSp.Rows[dgSp.Rows.Count - 1].Cells["splId"].Value = dtDetail.Rows[iCtr]["splPlaylistid"];
                    dgSp.Rows[dgSp.Rows.Count - 1].Cells["pName"].Value = dtDetail.Rows[iCtr]["splPlaylistName"];
                    dgSp.Rows[dgSp.Rows.Count - 1].Cells["sType"].Value = dtDetail.Rows[iCtr]["sType"];
                    dgSp.Rows[dgSp.Rows.Count - 1].Cells["sTime"].Value = dtDetail.Rows[iCtr]["sTime"].ToString() + ' ' + dtDetail.Rows[iCtr]["sBlockType"].ToString();

                    dgSp.Rows[dgSp.Rows.Count - 1].Cells["time1"].Value    = dtDetail.Rows[iCtr]["sTime"];
                    dgSp.Rows[dgSp.Rows.Count - 1].Cells["timeType"].Value = dtDetail.Rows[iCtr]["sBlockType"];
                    dgSp.Rows[dgSp.Rows.Count - 1].Cells["fId"].Value      = dtDetail.Rows[iCtr]["formatid"];
                }
            }
        }
        private void FillAdvertisementData(string sQr)
        {
            DataTable dtDetail = new DataTable();

            InitilizeAdvtGrid();
            dtDetail = objMainClass.fnFillDataTable(sQr);
            if (dtDetail.Rows.Count > 0)
            {
                for (int i = 0; i <= dtDetail.Rows.Count - 1; i++)
                {
                    dgAdvtDetail.Rows.Add();
                    dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells["tId"].Value            = dtDetail.Rows[i]["TokenID"];
                    dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells["tNo"].Value            = dtDetail.Rows[i]["tidNo"];
                    dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells["pName"].Value          = dtDetail.Rows[i]["PersonName"];
                    dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells["cName"].Value          = dtDetail.Rows[i]["CityName"];
                    dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells["sName"].Value          = dtDetail.Rows[i]["StreetName"];
                    dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells["Loc"].Value            = dtDetail.Rows[i]["Location"];
                    dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells["dCode"].Value          = dtDetail.Rows[i]["Dealercode"];
                    dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells["AdvtExpiryDate"].Value = string.Format("{0:dd/MMM/yyyy}", dtDetail.Rows[i]["AdvtExpirydate"]);
                    dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells["PlayerType"].Value     = dtDetail.Rows[i]["PlayerType"];
                }
            }
            foreach (DataGridViewRow row in dgAdvtDetail.Rows)
            {
                row.Height = 30;
            }
        }
예제 #9
0
        private void cmbClientName_SelectedIndexChanged(object sender, EventArgs e)
        {
            txtLogin.Text    = "";
            txtPassword.Text = "";
            if (Convert.ToInt32(cmbClientName.SelectedValue) == 0)
            {
                txtLogin.Text    = "";
                txtPassword.Text = "";
            }
            DataTable dsTotalToken = new DataTable();
            string    sQr          = " ";

            sQr          = "SELECT * from tbdealerlogin ";
            sQr          = sQr + " where  dfclientid =" + Convert.ToInt32(cmbClientName.SelectedValue);
            dsTotalToken = objMainClass.fnFillDataTable(sQr);
            if (dsTotalToken.Rows.Count > 0)
            {
                txtLogin.Text    = dsTotalToken.Rows[0]["LoginName"].ToString();
                txtPassword.Text = dsTotalToken.Rows[0]["LoginPassword"].ToString();
            }
            else
            {
                txtLogin.Text    = "";
                txtPassword.Text = "";
            }
        }
예제 #10
0
        private void GetDealerUserLedger()
        {
            string    str          = "GetUserTokenInformation " + Convert.ToInt32(StaticClass.dealerUserId);
            DataTable dtUserLedger = new DataTable();

            dtUserLedger = objMainClass.fnFillDataTable(str);
            if (dtUserLedger.Rows.Count > 0)
            {
                InitilizeTokenDetailGrid();
                /////////////// Fill User Token Detail //////////////
                for (int i = 0; i <= dtUserLedger.Rows.Count - 1; i++)
                {
                    dgTokenDetail.Rows.Add();
                    dgTokenDetail.Rows[dgTokenDetail.Rows.Count - 1].Cells["tId"].Value    = dtUserLedger.Rows[i]["TokenID"];
                    dgTokenDetail.Rows[dgTokenDetail.Rows.Count - 1].Cells["tNo"].Value    = dtUserLedger.Rows[i]["TokenID"];
                    dgTokenDetail.Rows[dgTokenDetail.Rows.Count - 1].Cells["pName"].Value  = dtUserLedger.Rows[i]["PersonName"];
                    dgTokenDetail.Rows[dgTokenDetail.Rows.Count - 1].Cells["cName"].Value  = dtUserLedger.Rows[i]["CityName"];
                    dgTokenDetail.Rows[dgTokenDetail.Rows.Count - 1].Cells["sName"].Value  = dtUserLedger.Rows[i]["StateName"];
                    dgTokenDetail.Rows[dgTokenDetail.Rows.Count - 1].Cells["Loc"].Value    = dtUserLedger.Rows[i]["Location"];
                    dgTokenDetail.Rows[dgTokenDetail.Rows.Count - 1].Cells["cuName"].Value = dtUserLedger.Rows[i]["CountryName"];
                    dgTokenDetail.Rows[dgTokenDetail.Rows.Count - 1].Cells["uId"].Value    = dtUserLedger.Rows[i]["UserId"];
                    if (Convert.ToBoolean(dtUserLedger.Rows[i]["IsDam"]) == true)
                    {
                        dgTokenDetail.Rows[dgTokenDetail.Rows.Count - 1].Cells["ExpiryDate"].Value = string.Format("{0:dd/MMM/yyyy}", dtUserLedger.Rows[i]["DamExpiryDate"]);
                    }
                    //else if (Convert.ToBoolean(dtUserLedger.Rows[i]["IsSanjivani"]) == true)
                    //{
                    //    dgTokenDetail.Rows[dgTokenDetail.Rows.Count - 1].Cells["ExpiryDate"].Value = string.Format("{0:dd/MMM/yyyy}", dtUserLedger.Rows[i]["SanjivaniExpiryDate"]);
                    //}
                    //else if (Convert.ToBoolean(dtUserLedger.Rows[i]["IsThai"]) == true)
                    //{
                    //    dgTokenDetail.Rows[dgTokenDetail.Rows.Count - 1].Cells["ExpiryDate"].Value = string.Format("{0:dd/MMM/yyyy}", dtUserLedger.Rows[i]["ThaiExpiryDate"]);
                    //}
                    else if (Convert.ToBoolean(dtUserLedger.Rows[i]["isCopyRight"]) == true)
                    {
                        dgTokenDetail.Rows[dgTokenDetail.Rows.Count - 1].Cells["ExpiryDate"].Value = string.Format("{0:dd/MMM/yyyy}", dtUserLedger.Rows[i]["CopyrightExpiryDate"]);
                    }
                    else if (Convert.ToBoolean(dtUserLedger.Rows[i]["IsAsian"]) == true)
                    {
                        dgTokenDetail.Rows[dgTokenDetail.Rows.Count - 1].Cells["ExpiryDate"].Value = string.Format("{0:dd/MMM/yyyy}", dtUserLedger.Rows[i]["AsianExpiryDate"]);
                    }

                    if (Convert.ToBoolean(dtUserLedger.Rows[i]["IsStore"]) == true)
                    {
                        dgTokenDetail.Rows[dgTokenDetail.Rows.Count - 1].Cells["pType"].Value = "Store";
                    }
                    else
                    {
                        dgTokenDetail.Rows[dgTokenDetail.Rows.Count - 1].Cells["pType"].Value = "Stream";
                    }
                }
                dgTokenDetail.ClearSelection();
            }
        }
예제 #11
0
        private void FillLocalPlaylist()
        {
            string    str         = "";
            string    strGetCount = "";
            int       iCtr;
            DataTable dtDetail;
            DataTable dtGetCount;

            str      = "select PlaylistID,ltrim(rtrim(name)) as pName from Playlists  where ispredefined=1 order by name";
            dtDetail = ObjMainClass.fnFillDataTable(str);

            InitilizeLocalGrid();
            if ((dtDetail.Rows.Count > 0))
            {
                for (iCtr = 0; (iCtr <= (dtDetail.Rows.Count - 1)); iCtr++)
                {
                    dgLocalPlaylist.Rows.Add();
                    dgLocalPlaylist.Rows[dgLocalPlaylist.Rows.Count - 1].Cells[0].Value = dtDetail.Rows[iCtr]["PlaylistID"];

                    strGetCount = "select Count(*) as Total from  TitlesInPlaylists where PlaylistID =" + dtDetail.Rows[iCtr]["PlaylistID"] + " ";
                    dtGetCount  = ObjMainClass.fnFillDataTable(strGetCount);

                    dgLocalPlaylist.Rows[dgLocalPlaylist.Rows.Count - 1].Cells[1].Value = dtDetail.Rows[iCtr]["pName"] + "  (" + dtGetCount.Rows[0]["Total"] + ")";
                    dgLocalPlaylist.Rows[dgLocalPlaylist.Rows.Count - 1].Cells[2].Value = "";

                    // dgLocalPlaylist.Rows[dgLocalPlaylist.Rows.Count - 1].Cells[2].Style.Font = new Font("Segoe UI", 10 );
                }
                foreach (DataGridViewRow row in dgLocalPlaylist.Rows)
                {
                    row.Height = 35;
                }
                dgLocalPlaylist.CurrentCell      = dgLocalPlaylist.Rows[0].Cells[1];
                dgLocalPlaylist.Rows[0].Selected = true;
                PopulateInputFileTypeDetail(dgPlaylist, Convert.ToInt32(dgLocalPlaylist.Rows[0].Cells[0].Value));
            }
        }
        private void FillTokenGenerationData(string sQr)
        {
            DataTable dtDetail = new DataTable();

            //------------ New Skpye Id-----------------
            //parastech6
            //seghal123


            InitilizeAccountSettingsGrid();
            dtDetail = objMainClass.fnFillDataTable(sQr);

            if (dtDetail.Rows.Count > 0)
            {
                for (int i = 0; i <= dtDetail.Rows.Count - 1; i++)
                {
                    dgAccountSettings.Rows.Add();

                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells[0].Value = dtDetail.Rows[i]["TokenID"];
                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells[1].Value = dtDetail.Rows[i]["Tokennobkp"].ToString() + ' ' + dtDetail.Rows[i]["TokenID"].ToString();

                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells[2].Value = dtDetail.Rows[i]["IsCopyright"];
                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells[3].Value = string.Format("{0:dd/MMM/yyyy}", dtDetail.Rows[i]["CopyrightExpiryDate"]);

                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells[4].Value = dtDetail.Rows[i]["IsFitness"];
                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells[5].Value = string.Format("{0:dd/MMM/yyyy}", dtDetail.Rows[i]["FitnessExpiryDate"]);

                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells[6].Value = dtDetail.Rows[i]["IsStream"];
                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells[7].Value = string.Format("{0:dd/MMM/yyyy}", dtDetail.Rows[i]["StreamExpiryDate"]);

                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells[8].Value = dtDetail.Rows[i]["IsBlockAdvt"];

                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells[9].Value  = dtDetail.Rows[i]["IsAdvt"];
                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells[10].Value = string.Format("{0:dd/MMM/yyyy}", dtDetail.Rows[i]["AdvtExpiryDate"]);

                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells["cName"].Value = dtDetail.Rows[i]["CityName"];
                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells["sName"].Value = dtDetail.Rows[i]["StreetName"];
                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells["Loc"].Value   = dtDetail.Rows[i]["Location"];
                }
            }
            foreach (DataGridViewRow row in dgAccountSettings.Rows)
            {
                row.Height = 30;
            }
        }
예제 #13
0
        private void FillStreamAppData(Int32 TitleCategoryId)
        {
            string    str;
            int       iCtr;
            DataTable dtDetail;

            str      = "Select * from  tbStreaming_App where dfclientid = " + Convert.ToInt32(cmbSearchCustomer.SelectedValue) + "  order by  StreamNameapp";
            dtDetail = objMainClass.fnFillDataTable(str);
            Image image;

            InitilizeAppStreamGrid();

            if ((dtDetail.Rows.Count > 0))
            {
                for (iCtr = 0; (iCtr <= (dtDetail.Rows.Count - 1)); iCtr++)
                {
                    dgAppStream.Rows.Add();
                    dgAppStream.Rows[dgAppStream.Rows.Count - 1].Cells["Streamid"].Value   = dtDetail.Rows[iCtr]["StreamId"];
                    dgAppStream.Rows[dgAppStream.Rows.Count - 1].Cells["StreamLink"].Value = dtDetail.Rows[iCtr]["StreamLinkapp"];
                    dgAppStream.Rows[dgAppStream.Rows.Count - 1].Cells["StreamName"].Value = dtDetail.Rows[iCtr]["StreamNameapp"];
                    dgAppStream.Rows[dgAppStream.Rows.Count - 1].Cells["ImgPath"].Value    = dtDetail.Rows[iCtr]["ImgPath"];


                    dgAppStream.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
                    var request = WebRequest.Create(dtDetail.Rows[iCtr]["ImgPath"].ToString());
                    using (var response = request.GetResponse())
                        using (var stream = response.GetResponseStream())
                        {
                            image = Bitmap.FromStream(stream);
                        }
                    dgAppStream.Rows[dgAppStream.Rows.Count - 1].Cells["Column_Img"].Value         = image;
                    dgAppStream.Rows[dgAppStream.Rows.Count - 1].Cells["Column_Img"].Style.Padding = new Padding(0, 5, 0, 5);
                    dgAppStream.Columns["Column_Img"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;



                    dgAppStream.Rows[dgAppStream.Rows.Count - 1].Cells["StreamName"].Style.Font = new Font("Segoe UI", 12, System.Drawing.FontStyle.Regular);
                }
            }
        }
        private void FillOtherStreams()
        {
            string    str      = "GetOtherCustomerTokensStreamURL " + Convert.ToInt32(cmbCustomer.SelectedValue);
            DataTable dtDetail = new DataTable();

            dtDetail = objMainClass.fnFillDataTable(str);
            InitilizeStreamGrid();
            if (dtDetail.Rows.Count > 0)
            {
                for (int i = 0; i < dtDetail.Rows.Count; i++)
                {
                    dgStream.Rows.Add();
                    dgStream.Rows[dgStream.Rows.Count - 1].Cells["sName"].Value   = dtDetail.Rows[i]["StreamName"];
                    dgStream.Rows[dgStream.Rows.Count - 1].Cells["dName"].Value   = dtDetail.Rows[i]["ClientName"];
                    dgStream.Rows[dgStream.Rows.Count - 1].Cells["tId"].Value     = dtDetail.Rows[i]["Tokenid"];
                    dgStream.Rows[dgStream.Rows.Count - 1].Cells["lName"].Value   = dtDetail.Rows[i]["location"];
                    dgStream.Rows[dgStream.Rows.Count - 1].Cells["state"].Value   = dtDetail.Rows[i]["statename"];
                    dgStream.Rows[dgStream.Rows.Count - 1].Cells["country"].Value = dtDetail.Rows[i]["countryname"];
                }
            }
            //dtDetail.Rows[i]["Personname"] + "," + dtDetail.Rows[i]["location"] + "," + dtDetail.Rows[i]["streetname"] + "," + dtDetail.Rows[i]["cname"] + "," + dtDetail.Rows[i]["statename"] + "," + dtDetail.Rows[i]["countryname"];
        }
        private void FillTokenGenerationData()
        {
            string sQr = "";

            sQr = " spUserTokenSettingsCopyleft 'Desktop' , " + Convert.ToInt32(cmbUserName.SelectedValue) + " , '" + cmbPlayerVersion.Text + "'";
            DataTable dtDetail = new DataTable();

            InitilizeAccountSettingsGrid();
            dtDetail = objMainClass.fnFillDataTable(sQr);

            if (dtDetail.Rows.Count > 0)
            {
                for (int i = 0; i <= dtDetail.Rows.Count - 1; i++)
                {
                    dgAccountSettings.Rows.Add();

                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells[0].Value       = dtDetail.Rows[i]["TokenID"];
                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells[1].Value       = dtDetail.Rows[i]["Tokennobkp"].ToString() + ' ' + dtDetail.Rows[i]["TokenID"].ToString();
                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells[2].Value       = dtDetail.Rows[i]["IsDam"];
                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells[3].Value       = string.Format("{0:dd/MMM/yyyy}", dtDetail.Rows[i]["DamExpiryDate"]);
                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells[4].Value       = dtDetail.Rows[i]["IsStore"];
                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells[5].Value       = string.Format("{0:dd/MMM/yyyy}", dtDetail.Rows[i]["SanjivaniExpiryDate"]);
                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells[6].Value       = dtDetail.Rows[i]["IsStream"];
                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells[7].Value       = string.Format("{0:dd/MMM/yyyy}", dtDetail.Rows[i]["StreamExpiryDate"]);
                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells[8].Value       = dtDetail.Rows[i]["IsBlockAdvt"];
                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells[9].Value       = dtDetail.Rows[i]["IsAdvt"];
                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells[10].Value      = string.Format("{0:dd/MMM/yyyy}", dtDetail.Rows[i]["AdvtExpiryDate"]);
                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells["cName"].Value = dtDetail.Rows[i]["CityName"];
                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells["sName"].Value = dtDetail.Rows[i]["StreetName"];
                    dgAccountSettings.Rows[dgAccountSettings.Rows.Count - 1].Cells["Loc"].Value   = dtDetail.Rows[i]["Location"];
                }
            }
            foreach (DataGridViewRow row in dgAccountSettings.Rows)
            {
                row.Height = 30;
            }
        }
예제 #16
0
        private void FillAdvertisementData(string sQr)
        {
            DataTable dtDetail = new DataTable();

            InitilizeAdvtGrid();
            dtDetail = objMainClass.fnFillDataTable(sQr);
            if (dtDetail.Rows.Count > 0)
            {
                for (int i = 0; i <= dtDetail.Rows.Count - 1; i++)
                {
                    dgAdvtDetail.Rows.Add();
                    dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells[0].Value = dtDetail.Rows[i]["TokenID"];
                    dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells[1].Value = dtDetail.Rows[i]["ClientName"].ToString();
                    dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells[2].Value = dtDetail.Rows[i]["Dealercode"].ToString();
                    dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells[3].Value = dtDetail.Rows[i]["Playertype"].ToString();
                    dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells[4].Value = string.Format("{0:dd/MMM/yyyy}", dtDetail.Rows[i]["Expirydate"]);
                    dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells[5].Value = dtDetail.Rows[i]["username"].ToString();
                    dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells[6].Value = dtDetail.Rows[i]["Cityname"].ToString();
                    dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells[7].Value = dtDetail.Rows[i]["Location"].ToString();
                    dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells[8].Value = Convert.ToBoolean(dtDetail.Rows[i]["isadvt"]);
                    if ((string.Format("{0:dd/MMM/yyyy}", dtDetail.Rows[i]["advtExpiryDate"])).ToString() != "01-Jan-1900")
                    {
                        //   MessageBox.Show(((string.Format("{0:dd/MMM/yyyy}", dtDetail.Rows[i]["advtExpiryDate"])).ToString()));
                        dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells[9].Value = string.Format("{0:dd/MMM/yyyy}", dtDetail.Rows[i]["advtExpiryDate"]);
                    }
                    else
                    {
                        dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells[9].Value = "- - -";
                    }
                }
            }
            foreach (DataGridViewRow row in dgAdvtDetail.Rows)
            {
                row.Height = 30;
            }
            lblTotalTokens.Text = dgAdvtDetail.Rows.Count.ToString();
        }
예제 #17
0
        private void FillStreamData(Int32 TitleCategoryId)
        {
            string    str;
            int       iCtr;
            DataTable dtDetail = new DataTable();

            if (cmbSearchLinence.Text == "")
            {
                str = "Select * from  tbStreaming where dfclientid = " + Convert.ToInt32(cmbSearchCustomer.SelectedValue) + "   order by  StreamName";
            }
            else
            {
                str = "Select * from  tbStreaming where dealercode='" + cmbSearchLinence.Text + "' and  dfclientid = " + Convert.ToInt32(cmbSearchCustomer.SelectedValue) + "   order by  StreamName";
            }
            dtDetail = objMainClass.fnFillDataTable(str);

            InitilizeStreamGrid();

            if ((dtDetail.Rows.Count > 0))
            {
                for (iCtr = 0; (iCtr <= (dtDetail.Rows.Count - 1)); iCtr++)
                {
                    dgStream.Rows.Add();
                    dgStream.Rows[dgStream.Rows.Count - 1].Cells["StreamId"].Value   = dtDetail.Rows[iCtr]["StreamId"];
                    dgStream.Rows[dgStream.Rows.Count - 1].Cells["StreamLink"].Value = dtDetail.Rows[iCtr]["StreamLink"];
                    dgStream.Rows[dgStream.Rows.Count - 1].Cells["StreamName"].Value = dtDetail.Rows[iCtr]["StreamName"];
                    dgStream.Rows[dgStream.Rows.Count - 1].Cells["TitleCatId"].Value = dtDetail.Rows[iCtr]["titlecategoryId"];
                    dgStream.Rows[dgStream.Rows.Count - 1].Cells["AdminCode"].Value  = dtDetail.Rows[iCtr]["Dealercode"];
                }

                foreach (DataGridViewRow row in dgStream.Rows)
                {
                    row.Height = 35;
                }
            }
        }
        private void FillAdvertisementData(string sQr)
        {
            DataTable dtDetail = new DataTable();

            InitilizeAdvtGrid();
            dtDetail = objMainClass.fnFillDataTable(sQr);
            if (dtDetail.Rows.Count > 0)
            {
                for (int i = 0; i <= dtDetail.Rows.Count - 1; i++)
                {
                    dgAdvtDetail.Rows.Add();
                    dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells["tId"].Value    = dtDetail.Rows[i]["TokenID"];
                    dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells["expD"].Value   = string.Format("{0:dd/MMM/yyyy}", dtDetail.Rows[i]["Expirydate"]);
                    dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells["Name"].Value   = dtDetail.Rows[i]["PersonName"].ToString();
                    dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells["CoName"].Value = dtDetail.Rows[i]["CountryName"].ToString();
                    dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells["sName"].Value  = dtDetail.Rows[i]["StateName"].ToString();

                    dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells["cName"].Value = dtDetail.Rows[i]["CityName"].ToString();
                    dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells["Loc"].Value   = dtDetail.Rows[i]["Location"].ToString();

                    if (Convert.ToBoolean(dtDetail.Rows[i]["IsStore"]) == true)
                    {
                        dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells["ver"].Value = "Store";
                    }
                    else
                    {
                        dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells["ver"].Value = "Stream";
                    }
                    dgAdvtDetail.Rows[dgAdvtDetail.Rows.Count - 1].Cells["userid"].Value = dtDetail.Rows[i]["userid"].ToString();
                }
            }
            foreach (DataGridViewRow row in dgAdvtDetail.Rows)
            {
                row.Height = 30;
            }
        }
예제 #19
0
        private void FillPlaylist()
        {
            string sQr = "";

            sQr = "GetCustomerPlaylistSchedule  'where m.tokenid=" + StaticClass.DealerTokenId.ToString() + " order by StartTime'";

            DataTable dtDetail = new DataTable();

            InitilizeSplGrid();
            dtDetail = objMainClass.fnFillDataTable(sQr);
            if (dtDetail.Rows.Count > 0)
            {
                for (int i = 0; i <= dtDetail.Rows.Count - 1; i++)
                {
                    sQr = "";
                    dgSpl.Rows.Add();
                    dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["Id"].Value      = dtDetail.Rows[i]["pSchid"];
                    dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["cName"].Value   = dtDetail.Rows[i]["cName"].ToString();
                    dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["fName"].Value   = dtDetail.Rows[i]["FormatName"].ToString();
                    dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["pName"].Value   = dtDetail.Rows[i]["pName"].ToString();
                    dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["tokenid"].Value = dtDetail.Rows[i]["MainTokenid"].ToString();
                    dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["sTime"].Value   = string.Format(fi, "{0:HH:mm}", Convert.ToDateTime(dtDetail.Rows[i]["StartTime"]));
                    dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["eTime"].Value   = string.Format(fi, "{0:HH:mm}", Convert.ToDateTime(dtDetail.Rows[i]["EndTime"]));
                    dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["wDay"].Value    = GetWeekName(Convert.ToInt32(dtDetail.Rows[i]["pSchId"]));

                    //dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["fName"].Style.BackColor = Color.FromArgb(Convert.ToInt32(dtDetail.Rows[i]["R"]), Convert.ToInt32(dtDetail.Rows[i]["G"]), Convert.ToInt32(dtDetail.Rows[i]["B"]));
                    //dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["pName"].Style.BackColor = Color.FromArgb(Convert.ToInt32(dtDetail.Rows[i]["R"]), Convert.ToInt32(dtDetail.Rows[i]["G"]), Convert.ToInt32(dtDetail.Rows[i]["B"]));
                    //dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["sTime"].Style.BackColor = Color.FromArgb(Convert.ToInt32(dtDetail.Rows[i]["R"]), Convert.ToInt32(dtDetail.Rows[i]["G"]), Convert.ToInt32(dtDetail.Rows[i]["B"]));
                    //dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["eTime"].Style.BackColor = Color.FromArgb(Convert.ToInt32(dtDetail.Rows[i]["R"]), Convert.ToInt32(dtDetail.Rows[i]["G"]), Convert.ToInt32(dtDetail.Rows[i]["B"]));
                    //dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["wDay"].Style.BackColor = Color.FromArgb(Convert.ToInt32(dtDetail.Rows[i]["R"]), Convert.ToInt32(dtDetail.Rows[i]["G"]), Convert.ToInt32(dtDetail.Rows[i]["B"]));

                    //dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["fName"].Style.SelectionBackColor = Color.FromArgb(Convert.ToInt32(dtDetail.Rows[i]["R"]), Convert.ToInt32(dtDetail.Rows[i]["G"]), Convert.ToInt32(dtDetail.Rows[i]["B"]));
                    //dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["pName"].Style.SelectionBackColor = Color.FromArgb(Convert.ToInt32(dtDetail.Rows[i]["R"]), Convert.ToInt32(dtDetail.Rows[i]["G"]), Convert.ToInt32(dtDetail.Rows[i]["B"]));
                    //dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["sTime"].Style.SelectionBackColor = Color.FromArgb(Convert.ToInt32(dtDetail.Rows[i]["R"]), Convert.ToInt32(dtDetail.Rows[i]["G"]), Convert.ToInt32(dtDetail.Rows[i]["B"]));
                    //dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["eTime"].Style.SelectionBackColor = Color.FromArgb(Convert.ToInt32(dtDetail.Rows[i]["R"]), Convert.ToInt32(dtDetail.Rows[i]["G"]), Convert.ToInt32(dtDetail.Rows[i]["B"]));
                    //dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["wDay"].Style.SelectionBackColor = Color.FromArgb(Convert.ToInt32(dtDetail.Rows[i]["R"]), Convert.ToInt32(dtDetail.Rows[i]["G"]), Convert.ToInt32(dtDetail.Rows[i]["B"]));

                    dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["fName"].Style.BackColor = Color.FromArgb(224, 224, 224);
                    dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["pName"].Style.BackColor = Color.FromArgb(224, 224, 224);
                    dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["sTime"].Style.BackColor = Color.FromArgb(224, 224, 224);
                    dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["eTime"].Style.BackColor = Color.FromArgb(224, 224, 224);
                    dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["wDay"].Style.BackColor  = Color.FromArgb(224, 224, 224);

                    dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["fName"].Style.SelectionBackColor = Color.FromArgb(224, 224, 224);
                    dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["pName"].Style.SelectionBackColor = Color.FromArgb(224, 224, 224);
                    dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["sTime"].Style.SelectionBackColor = Color.FromArgb(224, 224, 224);
                    dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["eTime"].Style.SelectionBackColor = Color.FromArgb(224, 224, 224);
                    dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["wDay"].Style.SelectionBackColor  = Color.FromArgb(224, 224, 224);


                    dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["fName"].Style.SelectionForeColor = Color.Black;
                    dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["pName"].Style.SelectionForeColor = Color.Black;
                    dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["sTime"].Style.SelectionForeColor = Color.Black;
                    dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["eTime"].Style.SelectionForeColor = Color.Black;
                    dgSpl.Rows[dgSpl.Rows.Count - 1].Cells["wDay"].Style.SelectionForeColor  = Color.Black;
                }
            }
            foreach (DataGridViewRow row in dgSpl.Rows)
            {
                row.Height = 30;
            }
        }