private void Data_Bind()
        {
            DataTable tb = DBase.GetDataTable(Config.DbGetBanList);

            oGrid.DataSource = tb.DefaultView;
            oGrid.DataBind();
        }
        private void GridBindVariant()
        {
            DataTable tb = DBase.GetDataTable(Config.DBGetBotChatVariantList, "@mapid", MapID);

            vGrid.DataSource = tb.DefaultView;
            vGrid.DataBind();
        }
Beispiel #3
0
        private void BindUserSession()
        {
            DataTable tb = DBase.GetDataTable(Config.DbGetClientSessionHistory, "@ID", nUserID);

            oGrid.DataSource = tb.DefaultView;
            oGrid.DataBind();
        }
Beispiel #4
0
        private void GridBind()
        {
            DataTable tb = DBase.GetDataTable(Config.DbGetForcedExitsList);

            oGrid.DataSource = tb.DefaultView;
            oGrid.DataBind();
        }
Beispiel #5
0
        protected override void Page_Load(object sender, System.EventArgs e)
        {
            if (Request["isProcess"] == "1")
            {
                ProcID = int.Parse(Request["ID"]);
            }
            else
            {
                GameID = int.Parse(Request["ID"]);
            }

            if (!IsPostBack)
            {
                hdnSelGame.Value = "0";
                DataTable tb = DBase.GetDataTable("admGetGameProcessList2", "@TournID", ProcID, "@GameProcID", GameID);
                if (tb.Rows.Count > 0)
                {
                    Core.SelectItemByValue(ddGames, tb.Rows[0]["ID"].ToString());
                    hdnSelGame.Value = tb.Rows[0]["ID"].ToString();
                }
                Core.FillList(ddGames, tb);
            }
            if (hdnSelGame.Value == String.Empty)
            {
                Core.SelectItemByValue(ddGames, hdnSelGame.Value);
            }
        }
        protected void BindGrid()
        {
            DataTable oDT = DBase.GetDataTable(Config.DbGetConfig);

            foreach (DataRow oDR in oDT.Rows)
            {
                //create table row
                TableRow oTR = new TableRow();;
                oTR.CssClass = "cssReportItemOdd";
                //create table cell and populate it with text of config name
                TableCell oTC = new TableCell();
                oTC.Text = GetObjectName(oDR);                  //GetObjectName prevents to show the same names several times (first time it will be name, next time it will be &nbsp instead the same name
                oTR.Cells.Add(oTC);
                //create table cell and populate it with text of config detail name
                oTC      = new TableCell();
                oTC.Text = oDR["PropertyName"].ToString();
                oTR.Cells.Add(oTC);
                //create table cell and populate it with config detail value
                oTC = new TableCell();
                int     nID = Utils.GetInt(oDR["id"]);
                TextBox oTB = new TextBox();
                oTB.MaxLength = 7000;
                oTB.Width     = Unit.Percentage(100);
                oTB.ID        = string.Format("edtVal_{0}", nID);
                oTB.Text      = oDR["PropertyValue"].ToString();
                oTC.Controls.Add(oTB);
                oTR.Cells.Add(oTC);
                //add rows to table
                tblMain.Rows.Add(oTR);
            }
        }
        private void DoBindData()
        {
            DataTable oDT = DBase.GetDataTable(Config.DbGetActionDispatchersList);

            oGrid.DataSource = oDT.DefaultView;
            oGrid.DataBind();
        }
        void DoDataBind()
        {
            DataTable tb = DBase.GetDataTable(Config.DbGetPlayPeriod);

            dgPeriod.DataSource = tb.DefaultView;
            try
            {
                dgPeriod.DataBind();
            }
            catch
            {
                if (dgPeriod.CurrentPageIndex < 0)
                {
                    dgPeriod.CurrentPageIndex = 0;
                }
                else if (dgPeriod.CurrentPageIndex > dgPeriod.PageCount - 1)
                {
                    if (dgPeriod.PageCount > 0)
                    {
                        dgPeriod.CurrentPageIndex = dgPeriod.PageCount - 1;
                    }
                    else
                    {
                        dgPeriod.CurrentPageIndex = 0;
                    }
                }
                dgPeriod.DataBind();
            }
        }
        private void GridBind()
        {
            DataTable tb = DBase.GetDataTable(Config.DbGetPushingContentList);

            oGrid.DataSource = tb.DefaultView;
            oGrid.DataBind();
        }
Beispiel #10
0
        private void Bind_Grid()
        {
            DataTable tb = DBase.GetDataTable(Config.DbGetAvatarsList, "@StatusID", int.Parse(ddStatus.SelectedValue));

            Session["Avatars_DT"] = tb.Copy();
            DataView dv = tb.DefaultView;

            oGrid.DataSource = tb.DefaultView;
            oGrid.DataBind();
        }
        private void GridBind()
        {
            DataTable tb = DBase.GetDataTable(Config.DbGetPushingContentProcessesList, "@PushingContentID", ContentID);

            oGrid.DataSource = tb.DefaultView;
            oGrid.DataBind();
            tb = DBase.GetDataTable(Config.DbGetProcessesForPushigContent, "@PushingContentID", ContentID);
            oGridForAdd.DataSource = tb.DefaultView;
            oGridForAdd.DataBind();
        }
        private void GridBindVariant()
        {
            DataTable      tb;
            DropDownColumn DDC = null;

            DDC              = (DropDownColumn)vGrid.Columns[4];
            tb               = DBase.GetDataTable(Config.DbGetPushingContentTypes);
            DDC.DataSource   = tb.DefaultView;
            tb               = DBase.GetDataTable(Config.DbGetPushingContentFilesList, "@Contentid", MapID);
            vGrid.DataSource = tb.DefaultView;
            vGrid.DataBind();
        }
        private void Page_Load(object sender, System.EventArgs e)
        {
            int SK_ID = Utils.GetInt(Request["SkinsID"]);

            if (SK_ID > 0)
            {
                DataTable tb = DBase.GetDataTable(Config.DbGetSkinsDetails, "@ID", SK_ID);
                if (tb == null || tb.Rows.Count <= 0)
                {
                    return;
                }
                m_skSuppEmail = tb.Rows[0]["EmailSupport"].ToString();
            }
        }
Beispiel #14
0
        public void btnSearch_Click(object sender, System.EventArgs e)
        {
            lbInfo.Text      = "";
            oGrid.DataSource = null;
            DataTable tb = DBase.GetDataTable(Config.DbFindFinishedTournaments, "@TournName", txtTrnName.Text,
                                              "@CurrencyType", int.Parse(ddCurrency.SelectedValue),
                                              "@LoginName", txtLoginName.Text,
                                              "@dbFrom", Common.Utils.GetDbDate(txtStFrom.Text),
                                              "@dbTo", Common.Utils.GetDbDate(txtTo.Text),
                                              "@deFrom", Common.Utils.GetDbDate(txtEndFrom.Text),
                                              "@deTo", Common.Utils.GetDbDate(txtEndTo.Text));

            oGrid.DataSource = tb.DefaultView;
            oGrid.DataBind();
        }
        private void BindData()
        {
            DataTable oDT = DBase.GetDataTable(Config.DbGetLoyalityPoints);

            foreach (DataRow oDR in oDT.Rows)
            {
                //create table row
                TableRow oTR = new TableRow();;
                oTR.CssClass = "cssReportItemOdd";
                //create table cell and populate it with text of config name
                TableCell oTC = new TableCell();
                oTC.Text = oDR["Name"].ToString();
                oTR.Cells.Add(oTC);

                oTC = new TableCell();
                int     nID = Utils.GetInt(oDR["id"]);
                TextBox oTB = new TextBox();
                oTB.MaxLength = 30;
                oTB.Width     = Unit.Percentage(100);
                oTB.ID        = string.Format("MinValueForPoint_{0}", nID);
                oTB.Text      = oDR["MinValueForPoint"].ToString();
                oTC.Controls.Add(oTB);
                oTR.Cells.Add(oTC);

                oTC           = new TableCell();
                nID           = Utils.GetInt(oDR["id"]);
                oTB           = new TextBox();
                oTB.MaxLength = 30;
                oTB.Width     = Unit.Percentage(100);
                oTB.ID        = string.Format("PointsValue_{0}", nID);
                oTB.Text      = oDR["PointsValue"].ToString();
                oTC.Controls.Add(oTB);
                oTR.Cells.Add(oTC);

                oTC           = new TableCell();
                nID           = Utils.GetInt(oDR["id"]);
                oTB           = new TextBox();
                oTB.MaxLength = 50;
                oTB.Width     = Unit.Percentage(100);
                oTB.ID        = string.Format("NameSQLProcedure_{0}", nID);
                oTB.Text      = oDR["NameSQLProcedure"].ToString();
                oTC.Controls.Add(oTB);
                oTR.Cells.Add(oTC);

                //add rows to table
                tblMain.Rows.Add(oTR);
            }
        }
Beispiel #16
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            if (Session["AffiliateSignup_SkinsID"] == null)
            {
                return;
            }
            int       skID = Utils.GetInt(Session["AffiliateSignup_SkinsID"]);
            DataTable tb   = DBase.GetDataTable(Config.DbGetSkinsDetails, "@ID", skID);

            if (tb == null || tb.Rows.Count <= 0)
            {
                return;
            }
            m_skDomain    = tb.Rows[0]["SkinsDomain"].ToString();
            m_skSuppEmail = tb.Rows[0]["EmailSupport"].ToString();
        }
Beispiel #17
0
        protected void btnReport_Click(object sender, System.EventArgs e)
        {
            DataTable tb = null;

            dgAllAffil.Visible               = false;
            dgAffilPeriod.Visible            = false;
            dgAffilPeriod.Columns[0].Visible = true;
            dgAffilPeriod.Columns[1].Visible = true;
            lbRakeSum.Text       = "0";
            lbRakeSum.Visible    = false;
            lbSumCaption.Visible = false;

            if (!CheckDate(txtDateFrom.Text) || !CheckDate(txtDateTo.Text))
            {
                lbMessage.Text = "Enter correct values for [Date] fields, please";
                return;
            }

            if (chAllAffiliates.Checked && chSummary.Checked)
            {
                tb = DBase.GetDataTable(Config.DbGetAffiliateInfoForAll, new object[] { "@DateFrom", txtDateFrom.Text, "@DateTo", txtDateTo.Text });
                dgAllAffil.Visible    = true;
                dgAllAffil.DataSource = tb.DefaultView;
                dgAllAffil.DataBind();
            }
            if (chAllAffiliates.Checked && !chSummary.Checked)
            {
                tb = DBase.GetDataTable(Config.DbGetAffiliateInfo, new object[] { "@DateFrom", txtDateFrom.Text, "@DateTo", txtDateTo.Text });
                dgAffilPeriod.Visible    = true;
                dgAffilPeriod.DataSource = tb.DefaultView;
                dgAffilPeriod.DataBind();
            }
            if (!chAllAffiliates.Checked && !chSummary.Checked)
            {
                tb = DBase.GetDataTable(Config.DbGetAffiliateInfo, new object[] { "@AffiliateID", ddAffiliates.SelectedValue, "@DateFrom", txtDateFrom.Text, "@DateTo", txtDateTo.Text });
                dgAffilPeriod.Columns[0].Visible = false;
                dgAffilPeriod.Columns[1].Visible = false;
                dgAffilPeriod.Visible            = true;
                dgAffilPeriod.DataSource         = tb.DefaultView;
                dgAffilPeriod.DataBind();
            }
            lbRakeSum.Visible              = true;
            lbSumCaption.Visible           = true;
            Session["AffiliateReportData"] = tb;
        }
Beispiel #18
0
        protected string GenerateXML()
        {
            string nodeRootName  = PrizeTable.nodeRootName;
            string nodeColName   = PrizeTable.nodeColName;
            string nodeRowName   = PrizeTable.nodeRowName;
            string nodeValueName = PrizeTable.nodeValueName;

            string BetCount = "";
            string Points   = "";
            string Rate     = "";

            string oldValue = "";
            string retXml   = "";

            retXml = "<" + nodeRootName + ">";
            DataTable oDT = DBase.GetDataTable(Config.DbGetCategoryTeaserList, "@CategoryID", nCategoryID);

            if (oDT.Rows.Count <= 0)
            {
                return("");
            }
            foreach (DataRow oDR in oDT.Rows)
            {
                BetCount = "'" + oDR["BetCount"].ToString() + "'";
                Points   = "'" + oDR["Points"].ToString() + "'";
                Rate     = "'" + oDR["Rate"].ToString() + "'";
                if (oldValue != Points)
                {
                    if (oldValue != "")
                    {
                        retXml += "</" + nodeColName + ">";
                    }
                    retXml += "<" + nodeColName + " from=" + Points + " to=" + Points + ">";
                }
                retXml  += "<" + nodeRowName + " from=" + BetCount + " to=" + BetCount + " " + nodeValueName + "=" + Rate + "/>";
                oldValue = Points;
            }
            if (oldValue != "")
            {
                retXml += "</" + nodeColName + ">";
            }
            retXml += "</" + nodeRootName + ">";
            return(retXml);
        }
Beispiel #19
0
/*		<!--			<asp:BoundColumn DataField="InitialMoneyUsersCount" HeaderText="Initial Money Users"></asp:BoundColumn>
 *              <asp:BoundColumn DataField="QualifiedUsersCount" HeaderText="Qualified Users"></asp:BoundColumn>-->*/

        protected void BindGrid()
        {
            nSexID = Utils.GetInt(comboSex.Items[comboSex.SelectedIndex].Value);
            //	nQualificationID = Utils.GetInt(comboQualification.Items[comboQualification.SelectedIndex].Value);
            int    nEmailVerified   = Utils.GetInt(comboEmailVerified.Items[comboEmailVerified.SelectedIndex].Value);
            object objEmailVerified = nEmailVerified;

            if (nEmailVerified < -1)
            {
                objEmailVerified = System.DBNull.Value;
            }
            DataTable oDT = DBase.GetDataTable(Config.DbGetReportUserDetail,
                                               "@SexID", ToDBNull(nSexID),
                                               //		"@QualificationID", ToDBNull(nQualificationID),
                                               "@IsEmailVerified", objEmailVerified);

            oSGridPager.DataSource = oDT;
            oSGridPager.BindGrid(oDT);
        }
        private void btFill_Click(object sender, System.EventArgs e)
        {
            if (ddTmpl.Items.Count <= 0)
            {
                return;
            }
            DataTable tb = DBase.GetDataTable(Config.DbGetEmailTemplateDetails, "@ID", int.Parse(ddTmpl.SelectedValue));

            if (tb == null)
            {
                return;
            }
            if (tb.Rows.Count <= 0)
            {
                return;
            }
            txtSubject.Text = tb.Rows[0]["subject"].ToString();
            txtmessage.Text = tb.Rows[0]["body"].ToString();
        }
Beispiel #21
0
        private void btReport_Click(object sender, System.EventArgs e)
        {
            DataTable tb = null;

            dgAffilPeriod.Columns[0].Visible = true;
            dgAffilPeriod.Columns[1].Visible = true;
            lbRakeSum.Text = "0";

            if (!CheckDate(txtDateFrom.Text) || !CheckDate(txtDateTo.Text))
            {
                return;
            }

            tb = DBase.GetDataTable(Config.DbGetAffiliateInfo, new object[] { "@AffiliateID", Utils.GetInt(hdnAffID.Value), "@DateFrom", txtDateFrom.Text, "@DateTo", txtDateTo.Text });
            dgAffilPeriod.Columns[0].Visible = false;
            dgAffilPeriod.Columns[1].Visible = false;
            dgAffilPeriod.DataSource         = tb.DefaultView;
            dgAffilPeriod.DataBind();
            Session["ReportData"] = tb;
        }
        private void GridBind()
        {
            DropDownColumn DDC = null;

            DDC = (DropDownColumn)oGrid.Columns[3];
            ArrayList AL = new ArrayList();

            AL.Add("CHIT-CHAT");
            AL.Add("BCP_JOIN_TABLE");
            AL.Add("BCP_SIT_DOWN");
            AL.Add("BCP_FOLDS");
            AL.Add("BCP_GOES_ALL_IN");
            AL.Add("BCP_SIT_OUT");
            AL.Add("BCP_LEAVE_TABLE");
            DDC.DataSource = AL;

            DataTable tb = DBase.GetDataTable(Config.DBGetBotChatListMap);

            oGrid.DataSource = tb.DefaultView;
            oGrid.DataBind();
        }
Beispiel #23
0
        protected void btnSave_Click(object sender, System.EventArgs e)
        {
            string tranName = "SaveAffiliate";

            DBase.BeginTransaction(tranName);
            bool rez = false;

            lblInfo.Text      = "";
            lblInfo.ForeColor = Color.Red;

            try
            {
                if (chDeny.Checked)
                {
                    DBase.Execute(Config.DbDeleteAffiliate, new object[] { "@IDs", nAffiliateID.ToString() });
                    btnReturn_Click(null, null);
                    return;
                }

                //1. Save/Update affiliate in DB
                int nRes = DBase.ExecuteReturnInt(Config.DbSaveAffiliateDetails,
                                                  "@ID", nAffiliateID, "@Name", txtName.Text, "@EmailFrom", txtEmail.Text, "@StatusID", int.Parse(ddStatus.SelectedValue),
                                                  "@SkinsID", int.Parse(ddSkins.SelectedValue), "@Password", txtPassword.Text, "@BeneficiaryName", txtBeneficiaryName.Text, "@MailingAddress",
                                                  txtAddress.Text, "@City", txtCity.Text, "@StateID", int.Parse(ddState.SelectedValue), "@Zip", txtZip.Text,
                                                  "@CountryID", int.Parse(ddCountry.SelectedValue), "@FirstName", txtFirstName.Text,
                                                  "@LastName", txtLastName.Text, "@Title", txtTitle.Text, "@Phone", txtPhone.Text, "@Fax", txtFax.Text);
                if (nRes <= 0)
                {
                    switch (nRes)
                    {
                    case -1:
                        lblInfo.Text = "Such Affiliate name already exists";
                        break;

                    default:
                        lblInfo.Text = "Database error occured";
                        break;
                    }
                    DBase.RollbackTransaction(tranName);
                    return;
                }
                // Everything is Ok
                DBase.CommitTransaction(tranName);
                nAffiliateID         = nRes;
                hdnAffiliateID.Value = nRes.ToString();
                StoreBackID(nRes);
                lblInfo.Text      = "Affiliate has been saved";
                lblInfo.ForeColor = Color.Green;

                if (hdnState.Value != ddStatus.SelectedValue && ddStatus.SelectedValue == "4")
                {
                    string val = Config.GetDbConfigValue(DBase, 18);                   //Template name for affiliates
                    if (val == String.Empty)
                    {
                        rez = true;
                        return;
                    }
                    DataTable tb = DBase.GetDataTable(Config.DbGetEmailTemplateDetailsByName, "@Name", val);
                    if (tb == null)
                    {
                        rez = true;
                        return;
                    }
                    if (tb.Rows.Count <= 0)
                    {
                        rez = true;
                        return;
                    }
                    val = Config.GetDbConfigValue(DBase, 1);                  // Admin Email
                    if (val == String.Empty)
                    {
                        rez = true;
                        return;
                    }
                    CommonUse.CSentMail.Send(DBase, txtEmail.Text, val, tb.Rows[0]["subject"].ToString(),                    //Send message as autoresponder
                                             tb.Rows[0]["body"].ToString().Replace("<BR>", "\n").Replace("<br>", "\n").Replace("&nbsp;", " "), 3, MailFormat.Text);
                }
            }
            catch (Exception ex)
            {
                Common.Log.Write(this, ex);
                DBase.RollbackTransaction(tranName);
                lblInfo.Text      = "Error occured";
                lblInfo.ForeColor = Color.Red;
            }
            finally
            {
                if (rez)
                {
                    lblInfo.Text     += "  Error send Email";
                    lblInfo.ForeColor = Color.Red;
                }
                if (lblInfo.ForeColor != Color.Red)
                {
                    btnReturn_Click(null, null);
                }
            }
        }
        protected void btnSave_Click(object sender, System.EventArgs e)
        {
            string tranName = "SaveAffiliate";

            DBase.BeginTransaction(tranName);
            bool rez = false;

            lblInfo.Text      = "";
            lblInfo.ForeColor = Color.Red;

            try
            {
                if (chDeny.Checked)
                {
                    DBase.Execute(Config.DbDeleteSkin, new object[] { "@IDs", nAffiliateID.ToString() });
                    btnReturn_Click(null, null);
                    return;
                }

                //1. Save/Update affiliate in DB
                int nRes = DBase.ExecuteReturnInt(Config.DbSaveSkinsDetails,
                                                  "@ID", nAffiliateID, "@Name", txtName.Text, "@EmailFrom", txtEmail.Text, "@StatusID", int.Parse(ddStatus.SelectedValue),
                                                  "@SkinsDomain", txtDomain.Text, "@EmailSupport", txtSuppEmail.Text);
                if (nRes <= 0)
                {
                    switch (nRes)
                    {
                    case -1:
                        lblInfo.Text = "Such Skins name already exists";
                        break;

                    default:
                        lblInfo.Text = "Database error occured";
                        break;
                    }
                    DBase.RollbackTransaction(tranName);
                    return;
                }

                /*
                 *                      //2. Create installation files
                 *                      Admin.CommonUse.Affiliate oAffiliate = new Admin.CommonUse.Affiliate(Page);
                 *                      bool bRes = oAffiliate.CreateAffiliate(nRes);
                 *                      if (!bRes)
                 *                      {
                 *                              lblInfo.Text = "Affiliate install shield error occured";
                 *                              DBase.RollbackTransaction(tranName);
                 *                              return;
                 *                      }
                 */
                // Everything is Ok
                DBase.CommitTransaction(tranName);
                nAffiliateID         = nRes;
                hdnAffiliateID.Value = nRes.ToString();
                StoreBackID(nRes);
                lblInfo.Text      = "Skin has been saved";
                lblInfo.ForeColor = Color.Green;

                if (hdnState.Value != ddStatus.SelectedValue && ddStatus.SelectedValue == "4")
                {
                    string val = Config.GetDbConfigValue(DBase, 18);                   //Template name for affiliates
                    if (val == String.Empty)
                    {
                        rez = true;
                        return;
                    }
                    DataTable tb = DBase.GetDataTable(Config.DbGetEmailTemplateDetailsByName, "@Name", val);
                    if (tb == null)
                    {
                        rez = true;
                        return;
                    }
                    if (tb.Rows.Count <= 0)
                    {
                        rez = true;
                        return;
                    }
                    val = Config.GetDbConfigValue(DBase, 1);                  // Admin Email
                    if (val == String.Empty)
                    {
                        rez = true;
                        return;
                    }
                    CommonUse.CSentMail.Send(DBase, txtEmail.Text, val, tb.Rows[0]["subject"].ToString(),                    //Send message as autoresponder
                                             tb.Rows[0]["body"].ToString().Replace("<BR>", "\n").Replace("<br>", "\n").Replace("&nbsp;", " "), 3, MailFormat.Text);
                }
            }
            catch (Exception ex)
            {
                Common.Log.Write(this, ex);
                DBase.RollbackTransaction(tranName);
                lblInfo.Text      = "Error occured";
                lblInfo.ForeColor = Color.Red;
            }
            finally
            {
                if (rez)
                {
                    lblInfo.Text     += "  Error send Email";
                    lblInfo.ForeColor = Color.Red;
                }
                if (lblInfo.ForeColor != Color.Red)
                {
                    btnReturn_Click(null, null);
                }
            }
        }