コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Request.QueryString["sid"] != null)
         {
             //----------------------------------------------------------------------------------------------------------
             string sid = BZ_Common.BZ_Decrypted(Request.QueryString["sid"].ToString()); //kdQMwcj0lE8=              "5"; //
             ViewState["sid"] = sid;
             //-----------------------------------------------------------------------------------------------------------
             Int64     Count = 0;
             DataTable ds    = MyCommonfile.selectBZ(" Select * From Sync_Need_Logs  Order By LogId ");
             for (int iicouts = 0; iicouts < ds.Rows.Count; iicouts++)
             {
                 Count++;
                 DataTable DTServerID = MyCommonfile.selectBZ(" SELECT DISTINCT dbo.ServerMasterTbl.Id FROM dbo.CompanyMaster INNER JOIN dbo.PricePlanMaster ON dbo.PricePlanMaster.PricePlanId = dbo.CompanyMaster.PricePlanId INNER JOIN dbo.PortalMasterTbl ON dbo.PricePlanMaster.PortalMasterId1 = dbo.PortalMasterTbl.Id INNER JOIN dbo.VersionInfoMaster ON dbo.PricePlanMaster.VersionInfoMasterId = dbo.VersionInfoMaster.VersionInfoId INNER JOIN dbo.ProductMaster ON dbo.VersionInfoMaster.ProductId = dbo.ProductMaster.ProductId INNER JOIN dbo.ClientMaster ON dbo.ProductMaster.ClientMasterId = dbo.ClientMaster.ClientMasterId INNER JOIN dbo.ServerMasterTbl ON dbo.CompanyMaster.ServerId = dbo.ServerMasterTbl.Id Where  dbo.ServerMasterTbl.Status=1 and dbo.CompanyMaster.Active=1 ");
                 for (int iicout = 0; iicout < DTServerID.Rows.Count; iicout++)
                 {
                     Insert_Sync_Need_Logs_AtServer_AddDelUpdtSelect(ds.Rows[iicouts]["LogId"].ToString(), ds.Rows[iicouts]["RecordID"].ToString(), ds.Rows[iicouts]["ACTION"].ToString(), ds.Rows[iicouts]["TableName"].ToString(), false, DTServerID.Rows[iicout]["Id"].ToString());
                 }
                 DELETE__Sync_Need_Logs__AddDelUpdtSelect(ds.Rows[iicouts]["LogId"].ToString());
             }
             lblmsg.Text = Convert.ToString(Count) + " total record updated at Sync_Need_Logs_AtServer";
             TransferAtJbTable(ViewState["sid"].ToString());
         }
     }
 }
コード例 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        // Statik_FullTable();
        string sidd = BZ_Common.BZ_Encrypted("5");

        if (!IsPostBack)
        {
            if (Request.QueryString["sid"] != null && Request.QueryString["tblid"] == null)
            {
                string sid = BZ_Common.BZ_Decrypted(Request.QueryString["sid"].ToString()); //kdQMwcj0lE8=              "5"; //
                ViewState["sid"] = sid;
                //----------------------------------------------------------------------------------------------------------
                //-----------------------------------------------------------------------------------------------------------
                if (!IsPostBack)
                {
                    btnsync_Click(sender, e);
                }
                DataTable dtfindtab = MyCommonfile.selectBZ(@" SELECT Count(dbo.Satelite_Server_Sync_Log_Deatils.ID) as TotalCount
                                                        From    dbo.Satellite_Server_Sync_Job_Details INNER JOIN dbo.ClientProductTableMaster INNER JOIN dbo.SatelliteSyncronisationrequiringTablesMaster ON dbo.SatelliteSyncronisationrequiringTablesMaster.TableID = dbo.ClientProductTableMaster.Id ON  dbo.Satellite_Server_Sync_Job_Details.TableID = dbo.SatelliteSyncronisationrequiringTablesMaster.TableID AND dbo.Satellite_Server_Sync_Job_Details.TableID = dbo.ClientProductTableMaster.Id INNER JOIN dbo.Satelitte_Server_Sync_Job_Master ON  dbo.Satellite_Server_Sync_Job_Details.Satelitte_Server_Sync_Job_Master_ID = dbo.Satelitte_Server_Sync_Job_Master.Id INNER JOIN dbo.ServerMasterTbl ON dbo.Satelitte_Server_Sync_Job_Master.SatelliteServerID = dbo.ServerMasterTbl.Id INNER JOIN dbo.Satelite_Server_Sync_Log_Deatils ON dbo.Satellite_Server_Sync_Job_Details.ID = dbo.Satelite_Server_Sync_Log_Deatils.Satellite_Server_Sync_Job_Details_ID INNER JOIN dbo.SyncActionMaster ON dbo.Satelite_Server_Sync_Log_Deatils.TypeOfOperationDone = dbo.SyncActionMaster.ID
                                                        Where  dbo.Satellite_Server_Sync_Job_Details.SyncedStatus=0  and ServerMasterTbl.Id='" + ViewState["sid"] + "' ");//  and dbo.Satelitte_Server_Sync_Job_Master.Id='" + ViewState["JobID"] + "' and
                lblportmsg.Text = "Please waite for some moment we syncronice " + dtfindtab.Rows[0]["TotalCount"] + " record at server ";
            }
            else
            {
            }
            //Any 1 Table Full Data Transfer
            if (Request.QueryString["sid"] != null && Request.QueryString["tblid"] != null)
            {
                string sid   = BZ_Common.BZ_Decrypted(Request.QueryString["sid"].ToString().Replace(" ", "+"));
                string tblid = BZ_Common.BZ_Decrypted(Request.QueryString["tblid"].ToString().Replace(" ", "+"));
                ViewState["sid"]   = sid;
                ViewState["tblid"] = tblid;
                FullTableSync();
            }
            //All Table All Data Transfer
            if (Request.QueryString["sid"] != null && Request.QueryString["alltable"] != null)
            {
                string sid = BZ_Common.BZ_Decrypted(Request.QueryString["sid"].ToString().Replace(" ", "+"));
                ViewState["sid"] = sid;
                // string tblid = BZ_Common.BZ_Decrypted(Request.QueryString["tblid"].ToString().Replace(" ", "+"));
                DataTable dts1 = MyCommonfile.selectBZ(" SELECT dbo.SatelliteSyncronisationrequiringTablesMaster.* FROM dbo.ClientProductTableMaster INNER JOIN dbo.SatelliteSyncronisationrequiringTablesMaster ON dbo.SatelliteSyncronisationrequiringTablesMaster.TableID = dbo.ClientProductTableMaster.Id WHERE (dbo.SatelliteSyncronisationrequiringTablesMaster.Status = '1' and ClientProductTableMaster.Active=1) ");
                for (int k = 0; k < dts1.Rows.Count; k++)
                {
                    ViewState["tblid"] = dts1.Rows[k]["TableID"].ToString();
                    FullTableSync();
                }
            }
        }
    }
コード例 #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Timer1.Enabled      = false;
            img_loading.Visible = false;

            //--Part1------------------------Add Sync_Need_Logs_AtServer Table--------------------------------------------------------------------------------
            if (Request.QueryString["sid"] != null && Request.QueryString["addserjob"] == "1")
            {
                string sid = Request.QueryString["sid"].Replace(" ", "+"); //kdQMwcj0lE8= "5"; //
                sid = BZ_Common.BZ_Decrypted(sid);
                ViewState["sid"] = sid;
                DataTable ds = MyCommonfile.selectBZ(" Select Count(Logid) as id From Sync_Need_Logs ");
                if (Convert.ToInt32(ds.Rows[0]["id"].ToString()) > 0)
                {
                    lbl_Hmsg.Text       = "";// "We finded total " + ds.Rows[0]["id"].ToString() + "  no of changes done at client database right now we need to transfer record at settellite server level ";
                    Timer1.Enabled      = true;
                    img_loading.Visible = true;
                }
                else
                {
                    lbl_Msg.Text = "No any record available for syncronice";
                }
            }
            //---------------------------------------------------------------------------------------------------------------------------------------
            //--Part2------------------------Add Job1-Job2-Job3 Table--------------------------------------------------------------------------------
            if (Request.QueryString["sid"] != null && Request.QueryString["addjob123"] == "1")
            {
                string sid = Request.QueryString["sid"].Replace(" ", "+"); //kdQMwcj0lE8= "5"; //
                sid = BZ_Common.BZ_Decrypted(sid);
                ViewState["sid"] = sid;
                DataTable ds1 = MyCommonfile.selectBZ(" Select Count(id) as id From Sync_Need_Logs_AtServer where sid='" + ViewState["sid"].ToString() + "'   ");
                if (Convert.ToInt32(ds1.Rows[0]["id"].ToString()) > 0)
                {
                    lbl_Hmsg.Text = "";// "We finded total " + ds1.Rows[0]["id"].ToString() + " record that need to be transfer on sattellite server right now we create one job for transfer all record at settellite server";
                    TransferAtJob1Job2(sid);
                    Timer1.Enabled      = true;
                    img_loading.Visible = true;
                }
                else
                {
                    lbl_Msg.Text = "No any record available for create job for syncronice ";
                }
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Timer1.Enabled      = false;
            img_loading.Visible = false;
            if (Request.QueryString["sid"] != null && Request.QueryString["addserjob"] == "1")
            {
                //----------------------------------------------------------------------------------------------------------
                string sid = Request.QueryString["sid"].Replace(" ", "+"); //kdQMwcj0lE8= "5"; //
                sid = BZ_Common.BZ_Decrypted(sid);
                ViewState["sid"] = sid;
                DataTable ds = MyCommonfile.selectBZ(" Select * From Sync_Need_Logs  Order By LogId ");
                if (ds.Rows.Count > 0)
                {
                    Timer1.Enabled      = true;
                    img_loading.Visible = true;
                }
                else
                {
                    lbl_Msg.Text = "No any record available for syncronice";
                }
                //-----------------------------------------------------------------------------------------------------------
            }


            if (Request.QueryString["sid"] != null && Request.QueryString["addjob123"] == "1")
            {
                string sid = Request.QueryString["sid"].Replace(" ", "+"); //kdQMwcj0lE8= "5"; //
                sid = BZ_Common.BZ_Decrypted(sid);
                ViewState["sid"] = sid;
                DataTable ds1 = MyCommonfile.selectBZ(" Select * From Sync_Need_Logs_AtServer where sid='" + ViewState["sid"].ToString() + "'  Order By LogId  ");
                if (ds1.Rows.Count > 0)
                {
                    TransferAtJob1Job2(sid);
                    Timer1.Enabled      = true;
                    img_loading.Visible = true;
                }
                else
                {
                    lbl_Msg.Text = "No any record available for create job for syncronice ";
                }
            }
        }
    }
コード例 #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Timer1.Enabled      = false;
         img_loading.Visible = false;
         //--Part3------------------------Add Job3 Table To Server Database--------------------------------------------------------------------------------
         if (Request.QueryString["sid"] != null && Request.QueryString["Transfer"] == "1")
         {
             string sid = Request.QueryString["sid"].Replace(" ", "+"); //kdQMwcj0lE8= "5"; //
             sid = BZ_Common.BZ_Decrypted(sid);
             ViewState["sid"]    = sid;
             Timer1.Enabled      = true;
             img_loading.Visible = true;
             Count_Job3_Record(ViewState["sid"].ToString());
         }
     }
 }
コード例 #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["licensesilentpagerequesttblid"] != null && Request.QueryString["randomkeyID"] != null && Request.QueryString["sateliteserverrequesttblid"] != null && Request.QueryString["rnkendecke"] != null)//portno
        {
            int    bannn       = 0;
            string rnkendecke  = Request.QueryString["rnkendecke"].ToString();
            string licreqid    = BZ_Common.Decrypted_DasdasdasdadynamicKey(Request.QueryString["licensesilentpagerequesttblid"].ToString().Replace(" ", "+"), rnkendecke);
            string serreqid    = BZ_Common.Decrypted_DasdasdasdadynamicKey(Request.QueryString["sateliteserverrequesttblid"].ToString().Replace(" ", "+"), rnkendecke);
            string randomkeyno = BZ_Common.Decrypted_DasdasdasdadynamicKey(Request.QueryString["randomkeyID"].ToString(), rnkendecke);


            DataTable ds1 = MyCommonfile.selectBZ("select SilentPageServerID from SilentPageRequestTbl where ID= '" + licreqid.ToString() + "'");
            if (ds1.Rows.Count > 0)
            {
                DataTable ds = MyCommonfile.selectBZ("select ServerMasterTbl.* from ServerMasterTbl where ServerMasterTbl.Id= '" + ds1.Rows[0]["SilentPageServerID"].ToString() + "'");
                if (ds.Rows.Count > 0)
                {
                    encstr = Convert.ToString(ds.Rows[0]["Enckey"]);
                    string Comp_serversqlserverip     = ds.Rows[0]["sqlurl"].ToString();
                    string Comp_serversqlinstancename = ds.Rows[0]["DefaultsqlInstance"].ToString();
                    string Comp_serversqlport         = ds.Rows[0]["port"].ToString();
                    string Comp_serversqldbname       = ds.Rows[0]["DefaultDatabaseName"].ToString();
                    string Comp_serversqlpwd          = ds.Rows[0]["Sapassword"].ToString();
                    string Comp_serverweburl          = ds.Rows[0]["Busiwizsatellitesiteurl"].ToString();
                    connCompserver.ConnectionString = @"Data Source =" + Comp_serversqlserverip + "\\" + "\\" + Comp_serversqlinstancename + "," + Comp_serversqlport + "; Initial Catalog=" + Comp_serversqldbname + "; User ID=Sa; Password="******"; Persist Security Info=true;";
                }
                else
                {
                    bannn = 1;
                }
                DataTable dtstatus = MyCommonfile.selectBZ("select * from SilentPageRequestTbl where ID='" + licreqid.ToString() + "' and requestfinish='Yes'");
                if (dtstatus.Rows.Count > 0)
                {
                    bannn = 1;
                }
                else
                {
                    DataTable dtcheck = MyCommonfile.selectBZ("select * from SilentPageRequestTbl where ID='" + licreqid.ToString() + "'");
                    if (dtcheck.Rows.Count > 0)
                    {
                        DateTime dt   = DateTime.Now;
                        DateTime bann = Convert.ToDateTime(dtcheck.Rows[0]["datetimeofrequest"].ToString()).AddHours(1);
                        if (dt <= bann)
                        {
                            string keyvalue = "";
                            if (randomkeyno.ToString() == "0")
                            {
                                keyvalue = BZ_Common.mstrsrvkyreply();
                            }
                            else
                            {
                                string         str132 = "select Securitykey" + randomkeyno + " from Securitykeyforsilentpages where  serverid ='" + ds1.Rows[0]["SilentPageServerID"].ToString() + "'";
                                SqlCommand     cgw    = new SqlCommand(str132, connCompserver);
                                SqlDataAdapter adgw   = new SqlDataAdapter(cgw);
                                DataTable      dt2    = new DataTable();
                                adgw.Fill(dt2);
                                if (dt2.Rows.Count > 0)
                                {
                                    string mystr = Convert.ToString(DateTime.Now.Day);
                                    mystr    = mystr.Substring(0, 1);
                                    keyvalue = "" + dt2.Rows[0][0].ToString() + "" + mystr + "" + DateTime.Now.ToShortDateString() + "";
                                }
                            }
                            string     hh  = "update  SilentPageRequestTbl set randomkeyid='" + randomkeyno + "',dateandtimefinish='" + DateTime.Now.ToString() + "',requestfinish='Yes' where ID='" + licreqid.ToString() + "'";
                            SqlCommand cmd = new SqlCommand(hh, con);
                            con.Open();
                            cmd.ExecuteNonQuery();
                            con.Close();
                            Response.Redirect("http://" + ds.Rows[0]["Busiwizsatellitesiteurl"].ToString() + "/Verifystage2.aspx?sateliteserversilentpagerequesttblid=" + BZ_Common.Encrypted_DasdasdasdadynamicKey(serreqid.ToString(), rnkendecke) + "&randomkeyvalue=" + BZ_Common.Encrypted_DasdasdasdadynamicKey(keyvalue.ToString(), rnkendecke) + "&rnkendecke=" + Request.QueryString["rnkendecke"] + "");
                        }
                        else
                        {
                            SqlCommand cmd = new SqlCommand("delete from  SilentPageRequestTbl where ID='" + licreqid.ToString() + "')", con);
                            con.Open();
                            cmd.ExecuteNonQuery();
                            con.Close();
                        }
                    }
                    else
                    {
                        bannn = 1;
                    }
                }
            }
            else
            {
            }
        }
    }
コード例 #7
0
    //Close Port
    protected void ClosePort()
    {
        DataTable ds = MyCommonfile.selectBZ(" Select  dbo.ClientMaster.ClientURL,dbo.ServerMasterTbl.* From  dbo.ServerMasterTbl INNER JOIN  dbo.ClientMaster ON dbo.ServerMasterTbl.Id = dbo.ClientMaster.ServerId  Where dbo.ServerMasterTbl.Id='" + lblsid.Text + "' ");

        if (ds.Rows.Count > 0)
        {
            string sqlCompport28     = ds.Rows[0]["PortforCompanymastersqlistance"].ToString();//2810
            string Comp_serverweburl = ds.Rows[0]["Busiwizsatellitesiteurl"].ToString();
            string sqlserverport     = ds.Rows[0]["port"].ToString();


            string mycurrenturlX = Request.Url.AbsoluteUri;
            Random random        = new Random();
            int    randomNumber  = random.Next(1, 10);
            string Randomkeyid   = Convert.ToString(randomNumber);

            string ClientURL = ds.Rows[0]["ClientURL"].ToString();

            string pagenamemainY = "Satelliteservfunction.aspx?CP=ClosePort&PortNo=" + BZ_Common.Encrypted_satsrvencryky(sqlserverport) + "";//&SilentPageRequestTblID=" + PageMgmt.Encrypted(SilentPageRequestTblID) + "

            string SilentPageRequestTblID = CompanyRelated.Insert_SilentPageRequestTbl(lblsid.Text, pagenamemainY, DateTime.Now.ToString(), "", false, Randomkeyid, mycurrenturlX);

            string url = "";
            url = "http://" + Comp_serverweburl + "/vfysrv.aspx?licensesilentpagerequesttblid=" + BZ_Common.Encrypted_satsrvencryky(SilentPageRequestTblID) + "&pageredirecturl=" + BZ_Common.Encrypted_satsrvencryky(pagenamemainY) + "&mstrsrvky=" + BZ_Common.Encrypted_satsrvencryky(BZ_Common.satsrvencryky()) + "&returnurl=" + BZ_Common.Encrypted_satsrvencryky(ClientURL) + "";

            ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "window.open('" + url + "');", true);
        }
    }
コード例 #8
0
 protected void GridView2_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "backup")
     {
         GridViewRow row        = (GridViewRow)(((Control)e.CommandSource).NamingContainer);
         Label       lblTableId = row.FindControl("lblTableId") as Label;
         lblTableId.Text = lblTableId.Text;
         Response.Redirect("http://license.busiwiz.com/Silent_Sync_Need_DailySync.aspx?sid=" + BZ_Common.BZ_Encrypted(ddlserver.SelectedValue) + "&tblid=" + BZ_Common.BZ_Encrypted(lblTableId.Text) + "");
     }
 }
コード例 #9
0
 protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "backup")
     {
         GridViewRow row     = (GridViewRow)(((Control)e.CommandSource).NamingContainer);
         Label       lbl_sId = row.FindControl("lbl_sId") as Label;
         lbl_sId.Text = lbl_sId.Text;
         Response.Redirect("http://license.busiwiz.com/BeforeLogin/Silent_Sync_RequirDailyUpdationTable.aspx?sid=" + BZ_Common.BZ_Encrypted(lbl_sId.Text) + "&addjob123=1");
     }
 }
コード例 #10
0
    protected void btnsyncsilent_Click(object sender, EventArgs e)
    {
        DataTable ds = MyCommonfile.selectBZ(" Select  dbo.ClientMaster.ClientURL,dbo.ServerMasterTbl.* From  dbo.ServerMasterTbl INNER JOIN  dbo.ClientMaster ON dbo.ServerMasterTbl.Id = dbo.ClientMaster.ServerId  Where dbo.ServerMasterTbl.Id='" + ddlserver.SelectedValue + "' ");

        if (ds.Rows.Count > 0)
        {
            lblmsg.Text = "";
            //Timer1.Enabled = true;
            //Paneldoc.Visible = true;

            string sqlCompport28     = ds.Rows[0]["PortforCompanymastersqlistance"].ToString();//2810
            string Comp_serverweburl = ds.Rows[0]["Busiwizsatellitesiteurl"].ToString();
            string sqlserverport     = ds.Rows[0]["port"].ToString();

            string mycurrenturlX = Request.Url.AbsoluteUri;
            Random random        = new Random();
            int    randomNumber  = random.Next(1, 10);
            string Randomkeyid   = Convert.ToString(randomNumber);

            string ClientURL = ds.Rows[0]["ClientURL"].ToString();

            string pagenamemainY = "Satelliteservfunction.aspx?PO=OpenPort&PortNo=" + BZ_Common.Encrypted_satsrvencryky(sqlserverport) + "";//&SilentPageRequestTblID=" + PageMgmt.Encrypted(SilentPageRequestTblID) + "

            string SilentPageRequestTblID = CompanyRelated.Insert_SilentPageRequestTbl(ddlserver.SelectedValue, pagenamemainY, DateTime.Now.ToString(), "", false, Randomkeyid, mycurrenturlX);
            //Page X
            string url = "";
            url = "http://" + Comp_serverweburl + "/vfysrv.aspx?licensesilentpagerequesttblid=" + BZ_Common.Encrypted_satsrvencryky(SilentPageRequestTblID) + "&pageredirecturl=" + BZ_Common.Encrypted_satsrvencryky(pagenamemainY) + "&mstrsrvky=" + BZ_Common.Encrypted_satsrvencryky(BZ_Common.satsrvencryky()) + "&returnurl=" + BZ_Common.Encrypted_satsrvencryky(ClientURL) + "";
            //Response.Redirect("" + url + "");
            ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "window.open('" + url + "');", true);

            Response.Redirect("http://license.busiwiz.com/BeforeLogin/Silent_SyncData_WithServer.aspx?sid=" + BZ_Common.BZ_Encrypted(ddlserver.SelectedValue) + "Transfer=1");
            // Response.Redirect("http://license.busiwiz.com/Silent_Sync_Need_DailySync.aspx?sid=" +BZ_Common.BZ_Encrypted(ddlserver.SelectedValue) + "");
        }
        else
        {
            lblmsg.Text = "Server no available";
        }
    }
コード例 #11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["sid"] != null && Request.QueryString["compid"] != null)
            {
                string sid = Request.QueryString["sid"].ToString().Replace(" ", "+");
                sid = PageMgmt.Decrypted(sid);
                // string versionid = PageMgmt.Decrypted(Request.QueryString["versionid"]);
                //  string compid =PageMgmt.Decrypted(Request.QueryString["compid"].ToString());
                string compidaa = Request.QueryString["compid"].ToString().Replace(" ", "+");
                string compid   = PageMgmt.Decrypted(compidaa.ToString());
                //sid = "5";
                //compid = "aswathy";
                DataTable ds = MyCommonfile.selectBZ(" SELECT TOP (1) dbo.PortalMasterTbl.Id AS portlID, dbo.PortalMasterTbl.PortalName, dbo.PricePlanMaster.VersionInfoMasterId,dbo.PricePlanMaster.Producthostclientserver,dbo.ClientMaster.ClientURL, dbo.ClientMaster.ServerId AS ClientServerid, dbo.ServerMasterTbl.*, dbo.CompanyMaster.ServerId FROM dbo.CompanyMaster INNER JOIN dbo.PricePlanMaster ON dbo.PricePlanMaster.PricePlanId = dbo.CompanyMaster.PricePlanId INNER JOIN dbo.PortalMasterTbl ON dbo.PricePlanMaster.PortalMasterId1 = dbo.PortalMasterTbl.Id INNER JOIN dbo.VersionInfoMaster ON dbo.PricePlanMaster.VersionInfoMasterId = dbo.VersionInfoMaster.VersionInfoId INNER JOIN dbo.ProductMaster ON dbo.VersionInfoMaster.ProductId = dbo.ProductMaster.ProductId INNER JOIN dbo.ClientMaster ON dbo.ProductMaster.ClientMasterId = dbo.ClientMaster.ClientMasterId INNER JOIN dbo.ServerMasterTbl ON dbo.CompanyMaster.ServerId = dbo.ServerMasterTbl.Id  where CompanyLoginId='" + compid + "' ");
                if (ds.Rows.Count > 0)
                {
                    string ComServerId = ds.Rows[0]["ServerId"].ToString();
                    string versionid   = ds.Rows[0]["VersionInfoMasterId"].ToString();

                    lbl_serverurl.Text = ds.Rows[0]["Busiwizsatellitesiteurl"].ToString();
                    string sqlservernameip            = ds.Rows[0]["PublicIp"].ToString();
                    string Comp_serversqlinstancename = ds.Rows[0]["DefaultsqlInstance"].ToString();
                    string sqlinstancename            = ds.Rows[0]["Sqlinstancename"].ToString();


                    string DefaultMdfpath = ds.Rows[0]["DefaultMdfpath"].ToString();
                    string DefaultLdfpath = ds.Rows[0]["DefaultLdfpath"].ToString();
                    string iispath        = ds.Rows[0]["serverdefaultpathforiis"].ToString();

                    string Comp_Ser_Masterpath    = ds.Rows[0]["folderpathformastercode"].ToString();
                    string Comp_Ser_iispath       = ds.Rows[0]["serverdefaultpathforiis"].ToString();
                    string Comp_ServEnckey        = ds.Rows[0]["Enckey"].ToString();
                    string Comp_serversqlserverip = ds.Rows[0]["sqlurl"].ToString();

                    // string Comp_serversqlport = ds.Rows[0]["port"].ToString();
                    string Comp_serversqldbname = ds.Rows[0]["DefaultDatabaseName"].ToString();
                    //  string Comp_serversqlpwd = ds.Rows[0]["Sapassword"].ToString();
                    Comp_serverweburl = ds.Rows[0]["Busiwizsatellitesiteurl"].ToString();
                    sqlserverport     = ds.Rows[0]["port"].ToString();

                    string sqlCompport28  = ds.Rows[0]["PortforCompanymastersqlistance"].ToString();//2810
                    string ClientServerid = ds.Rows[0]["ClientServerid"].ToString();
                    string ClientURL      = ds.Rows[0]["ClientURL"].ToString();



                    DataTable DTclientServerid = MyCommonfile.selectBZ(" Select * From ServerMasterTbl Where id='" + ClientServerid + "'");
                    clientServerfolderpathformastercode = DTclientServerid.Rows[0]["folderpathformastercode"].ToString();
                    FTP         = DTclientServerid.Rows[0]["FTPforMastercode"].ToString();
                    FTPUserName = DTclientServerid.Rows[0]["FTPuseridforDefaultIISpath"].ToString();
                    FTPPassword = DTclientServerid.Rows[0]["FtpPasswordforDefaultIISpath"].ToString();
                    FTPport     = DTclientServerid.Rows[0]["FTPportfordefaultIISpath"].ToString();

                    bool SerConnstatust = false;
                    int  timeconncheck  = 1;

                    connCompserver = ServerWizard.ServerDefaultInstanceConnetionTCP(compid);
                    string Compserverconnnstr = connCompserver.ConnectionString;
                    while ((!SerConnstatust) && (timeconncheck < 2))
                    {
                        try
                        {
                            if (connCompserver.State.ToString() != "Open")
                            {
                                connCompserver.Open();
                                SerConnstatust = true;
                            }
                            else
                            {
                                SerConnstatust = true;
                            }
                        }
                        catch
                        {
                            timeconncheck++;
                            //Port Open
                            //Page Y
                            string pagenamemainY = "Satelliteservfunction.aspx?PO=OpenPort&PortNo=" + BZ_Common.Encrypted_satsrvencryky(sqlserverport) + "&Port2No=" + BZ_Common.Encrypted_satsrvencryky(sqlCompport28) + "";//&SilentPageRequestTblID=" + PageMgmt.Encrypted(SilentPageRequestTblID) + "
                            //Page X
                            string mycurrenturlX          = Request.Url.AbsoluteUri;
                            Random random                 = new Random();
                            int    randomNumber           = random.Next(1, 10);
                            string Randomkeyid            = Convert.ToString(randomNumber);
                            string SilentPageRequestTblID = CompanyRelated.Insert_SilentPageRequestTbl(ComServerId, pagenamemainY, DateTime.Now.ToString(), "", false, Randomkeyid, mycurrenturlX);
                            string url = "";
                            url = "http://" + Comp_serverweburl + "/vfysrv.aspx?licensesilentpagerequesttblid=" + BZ_Common.Encrypted_satsrvencryky(SilentPageRequestTblID) + "&pageredirecturl=" + BZ_Common.Encrypted_satsrvencryky(pagenamemainY) + "&mstrsrvky=" + BZ_Common.Encrypted_satsrvencryky(BZ_Common.satsrvencryky()) + "&returnurl=" + BZ_Common.Encrypted_satsrvencryky(ClientURL) + "";
                            Response.Redirect("" + url + "");
                        }
                    }

                    if (SerConnstatust == true)//if conn open (port open)
                    {
                        InsertServerMaster(sid);

                        Database_Latest_Code_Insert(compid, sid, versionid, Compserverconnnstr, Comp_Ser_iispath, Comp_Ser_Masterpath, Comp_serverweburl, ClientServerid, DefaultMdfpath, DefaultLdfpath, sqlservernameip, sqlinstancename);

                        Website_Latest_Code_Insert(sid, versionid, compid, Compserverconnnstr, iispath, Comp_ServEnckey, Comp_Ser_Masterpath, Comp_serverweburl, iispath);

                        lbl_compid.Text = compid;
                        string pagenames = "";
                        pagenames = "http://" + Comp_serverweburl + "/Satelliteservfunction.aspx?ftpurl=" + BZ_Common.BZ_Encrypted(FTP) + "&userid=" + BZ_Common.BZ_Encrypted(FTPUserName) + "&password="******"&portno=" + BZ_Common.BZ_Encrypted(FTPport) + "&Compid=" + BZ_Common.BZ_Encrypted(compid) + "&ServerID=" + BZ_Common.BZ_Encrypted(sid) + "&PortSecID=1";
                        Response.Redirect("" + pagenames + "");
                        // FillGrid_ComCreNeedCode();
                    }
                    else
                    {
                        lblmsg.Text = "Connecting to server database problem";
                    }
                }
                else
                {
                    lblmsg.Text = "No record available for  ";
                }
            }
        }
    }
コード例 #12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string ss      = BZ_Common.BZ_Decrypted("d2fu/WL5XmM=");
        string ssdd    = BZ_Common.BZ_Decrypted("member");
        string ssddfdf = BZ_Common.BZ_Encrypted("member");

        //ABC Key Insert At Server DB
        if (Request.QueryString["comid"] != null && Request.QueryString["ABCenckey"] != null && Request.QueryString["returl"] != null)
        {
            //string hh = BZ_Common.BZ_Decrypted(Request.QueryString["comid"].ToString().Replace(" ", "+"));
            string companyid = BZ_Common.BZ_Decrypted(Request.QueryString["comid"].ToString().Replace(" ", "+"));

            DataTable DtServid = MyCommonfile.selectBZ(" Select ServerMasterTbl.Busiwizsatellitesiteurl,CompanyMaster.CompanyLoginId,ServerMasterTbl.Id FROM dbo.ServerMasterTbl INNER JOIN dbo.CompanyMaster ON dbo.ServerMasterTbl.Id = dbo.CompanyMaster.ServerId Where CompanyMaster.CompanyLoginId='" + companyid + "' ");
            if (DtServid.Rows.Count > 0)
            {
                string  Busiwizsatellitesiteurl = DtServid.Rows[0]["Busiwizsatellitesiteurl"].ToString();
                string  ServerId            = DtServid.Rows[0]["Id"].ToString();
                Boolean Comp__Actve__Status = CompanyWizard.Company_Active_Status(companyid);
                Boolean Comp__Licen__Active = CompanyWizard.Company_LicenseExpire_Status(companyid);
                Boolean Server__Active      = ServerWizard.Server_Active_Status(companyid);
                if (Comp__Actve__Status == true && Comp__Licen__Active == true && Server__Active == true)
                {
                    Boolean Insert_Today_Key = CompKeyIns.BtnABCKey(companyid, ServerId);
                    if (Insert_Today_Key == true)
                    {
                        string Z  = "";
                        string D1 = "";
                        string D2 = "";
                        string D3 = "";
                        string D4 = "";
                        string D5 = "";

                        string E1 = "";
                        string E2 = "";
                        string E3 = "";
                        string E4 = "";
                        string E5 = "";

                        string    F1 = "";
                        string    F2 = "";
                        string    F3 = "";
                        string    F4 = "";
                        string    F5 = "";
                        DataTable Dt = MyCommonfile.selectBZ(" Select TOP(15)* From CompanyABCDetail Where CompanyLoginId='" + companyid + "' Order By Id Desc ");
                        foreach (DataRow drmaxdb in Dt.Rows)
                        {
                            Z += drmaxdb["Z"].ToString() + ",";

                            D1 += drmaxdb["D1"].ToString() + ",";
                            D2 += drmaxdb["D2"].ToString() + ",";
                            D3 += drmaxdb["D3"].ToString() + ",";
                            D4 += drmaxdb["D4"].ToString() + ",";
                            D5 += drmaxdb["D5"].ToString() + ",";

                            E1 += drmaxdb["E1"].ToString() + ",";
                            E2 += drmaxdb["E2"].ToString() + ",";
                            E3 += drmaxdb["E3"].ToString() + ",";
                            E4 += drmaxdb["E4"].ToString() + ",";
                            E5 += drmaxdb["E5"].ToString() + ",";

                            F1 += drmaxdb["F1"].ToString() + ",";
                            F2 += drmaxdb["F2"].ToString() + ",";
                            F3 += drmaxdb["F3"].ToString() + ",";
                            F4 += drmaxdb["F4"].ToString() + ",";
                            F5 += drmaxdb["F5"].ToString() + ",";
                        }
                        if (Dt.Rows.Count > 0)
                        {
                            Z = Z.Remove(Z.Length - 1);

                            D1 = D1.Remove(D1.Length - 1);
                            D2 = D2.Remove(D2.Length - 1);
                            D3 = D3.Remove(D3.Length - 1);
                            D4 = D4.Remove(D4.Length - 1);
                            D5 = D5.Remove(D5.Length - 1);

                            E1 = E1.Remove(E1.Length - 1);
                            E2 = E2.Remove(E2.Length - 1);
                            E3 = E3.Remove(E3.Length - 1);
                            E4 = E4.Remove(E4.Length - 1);
                            E5 = E5.Remove(E5.Length - 1);

                            F1 = F1.Remove(F1.Length - 1);
                            F2 = F2.Remove(F2.Length - 1);
                            F3 = F3.Remove(F3.Length - 1);
                            F4 = F4.Remove(F4.Length - 1);
                            F5 = F5.Remove(F5.Length - 1);

                            //Response.Redirect("http://" + Busiwizsatellitesiteurl + "/Satelliteservfunction.aspx?Compid=" + BZ_Common.BZ_Encrypted(companyid) + "&E1=" + BZ_Common.BZ_Encrypted(E1) + "&E2=" + BZ_Common.BZ_Encrypted(E2) + "&E3=" + BZ_Common.BZ_Encrypted(E3) + "&E4=" + BZ_Common.BZ_Encrypted(E4) + "&E5=" + BZ_Common.BZ_Encrypted(E5) + "&D1=" + BZ_Common.BZ_Encrypted(D1) + "&D2=" + BZ_Common.BZ_Encrypted(D2) + "&D3=" + BZ_Common.BZ_Encrypted(D3) + "&D4=" + BZ_Common.BZ_Encrypted(D4) + "&D5=" + BZ_Common.BZ_Encrypted(D5) + "&Z=" + BZ_Common.BZ_Encrypted(Z) + "&F1=" + BZ_Common.BZ_Encrypted(F1) + "&F2=" + BZ_Common.BZ_Encrypted(F2) + "&F3=" + BZ_Common.BZ_Encrypted(F3) + "&F4=" + BZ_Common.BZ_Encrypted(F4) + "&F5=" + BZ_Common.BZ_Encrypted(F5) + "");
                            Response.Redirect("http://" + Busiwizsatellitesiteurl + "/Satelliteservfunction.aspx?Compid=" + BZ_Common.BZ_Encrypted(companyid) + "&E1=" + E1 + "&E2=" + E2 + "&E3=" + E3 + "&E4=" + E4 + "&E5=" + E5 + "&D1=" + D1 + "&D2=" + D2 + "&D3=" + D3 + "&D4=" + D4 + "&D5=" + D5 + "&Z=" + Z + "&F1=" + F1 + "&F2=" + F2 + "&F3=" + F3 + "&F4=" + F4 + "&F5=" + F5 + "&returl=" + Request.QueryString["returl"] + "");
                        }
                        lbl_msg.Text = "Successfully ";
                    }
                    else
                    {
                        lbl_msg.Text = "Some problem when we try to adding records in database ";
                    }
                }
                else if (Comp__Actve__Status == false)
                {
                    lbl_msg.Text = "Company not active ";
                }
                else if (Comp__Licen__Active == false)
                {
                    lbl_msg.Text = "License Expired";
                }
                else if (Server__Active == false)
                {
                    lbl_msg.Text = "Server Inactive";
                }
            }
        }
    }
コード例 #13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //string comid = BZ_Common.BZ_Encrypted("zzzzpp");
        if (!IsPostBack)
        {
            if (Request.QueryString["uid"] != null && Request.QueryString["pwd"] != null && Request.QueryString["cid"] != null)
            {
                //http://license.busiwiz.com/DNSentry.aspx?uid=6CAPiQfUhC7BELibxx9a8Q==&pwd=6CAPiQfUhC7BELibxx9a8Q==&cid=6CAPiQfUhC7BELibxx9a8Q==
                string cid = Request.QueryString["cid"].ToString().ToString().Replace(" ", "+");
                // cid = BZ_Common.BZ_Decrypted(cid);

                string uid = Request.QueryString["uid"].ToString().ToString().Replace(" ", "+");
                // uid = BZ_Common.BZ_Decrypted(uid);

                string pwd = Request.QueryString["pwd"].ToString().ToString().Replace(" ", "+");
                // pwd = BZ_Common.BZ_Decrypted(pwd);


                if (Request.QueryString["Id"] != null && Request.QueryString["status"] != null)
                {
                    string idNeedCode = Request.QueryString["Id"].ToString().ToString().Replace(" ", "+");
                    // idNeedCode = BZ_Common.BZ_Encrypted(cid);
                    SqlCommand cmd = new SqlCommand(" update CompanyCreationNeedCode  set DNSAddingStatus='" + Request.QueryString["status"] + "' where id='" + idNeedCode + "'", con);
                    con.Open();
                    cmd.ExecuteNonQuery();
                    con.Close();
                }


                string    ipaddress          = "";                                                                                                                                                                                            // "72.38.84.98";
                string    dnsServerName      = Environment.MachineName;                                                                                                                                                                       // c3
                string    dnsentryservername = "";                                                                                                                                                                                            //c3.safestserver.com
                DataTable dtserver           = MyCommonfile.selectBZ("Select ServerMasterTbl.* from CompanyMaster inner join ServerMasterTbl on ServerMasterTbl.Id=CompanyMaster.ServerId where CompanyMaster.CompanyLoginId='" + cid + "'"); //serverdetail(cid);
                if (dtserver.Rows.Count > 0)
                {
                    ipaddress          = dtserver.Rows[0]["ipaddress"].ToString();//Publicip
                    dnsentryservername = dtserver.Rows[0]["Busiwizsatellitesiteurl"].ToString();

                    string sqlservername       = dtserver.Rows[0]["sqlurl"].ToString();
                    string defaultinstancename = dtserver.Rows[0]["DefaultsqlInstance"].ToString();
                    string sqlserverport       = dtserver.Rows[0]["port"].ToString();
                    string defaultdatabasename = dtserver.Rows[0]["DefaultDatabaseName"].ToString();
                    string sapassword          = PageMgmt.Decrypted(dtserver.Rows[0]["Sapassword"].ToString());
                    condefaultinstance = new SqlConnection();

                    condefaultinstance.ConnectionString = @"Data Source =" + sqlservername + "\\" + defaultinstancename + "," + sqlserverport + "; Initial Catalog = " + defaultdatabasename + "; User ID=sa; Password="******"; Persist Security Info=true; ";
                    condefaultinstance.Close();
                    // condefaultinstance.ConnectionString = @"Data Source =192.168.2.100,40000; Initial Catalog = C3SATELLITESERVER; User ID=sa; Password=06De1963++; Persist Security Info=true; ";
                    if (condefaultinstance.State.ToString() != "Open")
                    {
                        condefaultinstance.Open();
                    }
                    condefaultinstance.Close();
                    ipaddress = dtserver.Rows[0]["PublicIp"].ToString();
                    DataTable dtzoneweb = MyCommonfile.selectBZ(" Select Top(1) * From CompanyCreationNeedCode where CodeTypeCategoryId=1 and CompanyLoginId='" + cid + "' and (DNSAddingStatus IS NULL OR  DNSAddingStatus=0)");// SearchDNS(cid);
                    foreach (DataRow dr in dtzoneweb.Rows)
                    {
                        string    CodeDetailId   = dr["CodeDetailId"].ToString();
                        DataTable DNSWebsiteName = MyCommonfile.selectBZ(" SELECT Top(1) dbo.WebsiteMaster.ID, dbo.ClientMaster.ClientURL,dbo.ServerMasterTbl.Id as sid, dbo.CodeTypeTbl.ID AS CodeTypeID, dbo.ProductCodeDetailTbl.Id AS CodeDetailID, dbo.WebsiteMaster.DNSserver, dbo.WebsiteMaster.DNSname, dbo.ServerMasterTbl.Busiwizsatellitesiteurl,dbo.ServerMasterTbl.PublicIp,dbo.ServerMasterTbl.Ipaddress FROM dbo.VersionInfoMaster INNER JOIN dbo.ProductMaster ON dbo.VersionInfoMaster.ProductId = dbo.ProductMaster.ProductId INNER JOIN dbo.WebsiteMaster INNER JOIN dbo.CodeTypeTbl ON dbo.WebsiteMaster.ID = dbo.CodeTypeTbl.WebsiteID INNER JOIN dbo.ProductCodeDetailTbl ON dbo.CodeTypeTbl.ProductCodeDetailId = dbo.ProductCodeDetailTbl.Id INNER JOIN dbo.ServerMasterTbl ON dbo.WebsiteMaster.DNSserver = dbo.ServerMasterTbl.Id ON dbo.VersionInfoMaster.VersionInfoId = dbo.CodeTypeTbl.ProductVersionId INNER JOIN dbo.ClientMaster ON dbo.ProductMaster.ClientMasterId = dbo.ClientMaster.ClientMasterId Where ProductCodeDetailTbl.ID='" + CodeDetailId + "' ");
                        if (DNSWebsiteName.Rows.Count > 0)
                        {
                            string ds_Com_ServerId   = DNSWebsiteName.Rows[0]["sid"].ToString();
                            string domainName        = DNSWebsiteName.Rows[0]["DNSname"].ToString();
                            string arecord           = cid;
                            string ipDestination     = DNSWebsiteName.Rows[0]["PublicIp"].ToString();
                            string ipaddres          = DNSWebsiteName.Rows[0]["Ipaddress"].ToString();
                            string Comp_serverweburl = DNSWebsiteName.Rows[0]["Busiwizsatellitesiteurl"].ToString();
                            string sateliteserversilentpagerequesttblid = "0";
                            //bool update = CompanyRelated.Update_CompanyCreationNeedCode(dr["Id"].ToString(), true);

                            string pagename = "http://" + Comp_serverweburl + "/Satelliteservfunction.aspx?domainName=" + BZ_Common.BZ_Encrypted(domainName) + "&arecord=" + BZ_Common.BZ_Encrypted(arecord) + "&ipDestination=" + BZ_Common.BZ_Encrypted(ipDestination) + "&ipaddres=" + BZ_Common.BZ_Encrypted(ipaddres) + "&sateliteserversilentpagerequesttblid=" + sateliteserversilentpagerequesttblid + "&uid=" + Request.QueryString["uid"] + "&pwd=" + Request.QueryString["pwd"] + "&cid=" + Request.QueryString["cid"] + "&Id=" + dr["Id"].ToString() + "";
                            // Response.Redirect("" + pagename + "");

                            string ClientURL     = DNSWebsiteName.Rows[0]["ClientURL"].ToString() + "//Silent_CompanyCreationDNSInfoUpdate.aspx?p2=" + dr["Id"].ToString();
                            string pagenamemainY = "Satelliteservfunction.aspx?domainName=" + BZ_Common.BZ_Encrypted(domainName) + "&arecord=" + BZ_Common.BZ_Encrypted(arecord) + "&ipDestination=" + BZ_Common.BZ_Encrypted(ipDestination) + "&ipaddres=" + BZ_Common.BZ_Encrypted(ipaddres) + "&sateliteserversilentpagerequesttblid=" + BZ_Common.BZ_Encrypted(sateliteserversilentpagerequesttblid) + "&uid=" + Request.QueryString["uid"] + "&pwd=" + Request.QueryString["pwd"] + "&cid=" + Request.QueryString["cid"] + "&Id=" + dr["Id"].ToString() + "";
                            //Page X
                            string mycurrenturlX          = Request.Url.AbsoluteUri;
                            Random random                 = new Random();
                            int    randomNumber           = random.Next(1, 10);
                            string Randomkeyid            = Convert.ToString(randomNumber);
                            string SilentPageRequestTblID = CompanyRelated.Insert_SilentPageRequestTbl(ds_Com_ServerId, pagenamemainY, DateTime.Now.ToString(), "", false, Randomkeyid, mycurrenturlX);
                            string url = "";
                            //Decrypted_DasdasdasdadynamicKey
                            url = "http://" + Comp_serverweburl + "/vfysrv.aspx?licensesilentpagerequesttblid=" + BZ_Common.Encrypted_DasdasdasdadynamicKey(SilentPageRequestTblID, Randomkeyid) + "&pageredirecturl=" + BZ_Common.Encrypted_DasdasdasdadynamicKey(pagenamemainY, Randomkeyid) + "&mstrsrvky=" + BZ_Common.Encrypted_DasdasdasdadynamicKey(BZ_Common.satsrvencryky(), Randomkeyid) + "&returnurl=" + ClientURL + "&rnkendecke=" + Randomkeyid + "";
                            Response.Redirect("" + pagename + "");

                            //ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "window.open( '" + pagename + "');", true);
                        }
                        else
                        {
                            lblmsg.Text = "Need to refress again ";
                        }
                    }
                }
                else
                {
                    lblmsg.Text = "No Record found for " + cid + " compay";
                }
                DataTable dtzoneweb1 = MyCommonfile.selectBZ(" Select Top(1) * From CompanyCreationNeedCode where AdditionalPageInserted=1 and CompanyLoginId='" + cid + "'");// SearchDNS(cid);
                foreach (DataRow dr in dtzoneweb1.Rows)
                {
                    string    CodeDetailId    = dr["CodeDetailId"].ToString();
                    string    DNSname         = dr["DNSname"].ToString();
                    DataTable DNSWebsiteName2 = MyCommonfile.selectBZ(" SELECT Top(1) dbo.WebsiteMaster.ID, dbo.ClientMaster.ClientURL,dbo.ServerMasterTbl.Id as sid, dbo.CodeTypeTbl.ID AS CodeTypeID, dbo.ProductCodeDetailTbl.Id AS CodeDetailID, dbo.WebsiteMaster.DNSserver, dbo.WebsiteMaster.DNSname, dbo.ServerMasterTbl.Busiwizsatellitesiteurl,dbo.ServerMasterTbl.PublicIp,dbo.ServerMasterTbl.Ipaddress FROM dbo.VersionInfoMaster INNER JOIN dbo.ProductMaster ON dbo.VersionInfoMaster.ProductId = dbo.ProductMaster.ProductId INNER JOIN dbo.WebsiteMaster INNER JOIN dbo.CodeTypeTbl ON dbo.WebsiteMaster.ID = dbo.CodeTypeTbl.WebsiteID INNER JOIN dbo.ProductCodeDetailTbl ON dbo.CodeTypeTbl.ProductCodeDetailId = dbo.ProductCodeDetailTbl.Id INNER JOIN dbo.ServerMasterTbl ON dbo.WebsiteMaster.DNSserver = dbo.ServerMasterTbl.Id ON dbo.VersionInfoMaster.VersionInfoId = dbo.CodeTypeTbl.ProductVersionId INNER JOIN dbo.ClientMaster ON dbo.ProductMaster.ClientMasterId = dbo.ClientMaster.ClientMasterId Where ProductCodeDetailTbl.ID='" + CodeDetailId + "' ");
                    DataTable DNSWebsiteName  = MyCommonfile.selectBZ(" SELECT dbo.CompanyMaster.CompanyName, dbo.CompanyMaster.YourDomaiUrl,  dbo.CompanyMaster.CompanyLoginId, dbo.PortalMasterTbl.PortalName FROM dbo.CompanyMaster INNER JOIN dbo.PricePlanMaster ON dbo.PricePlanMaster.PricePlanId = dbo.CompanyMaster.PricePlanId INNER JOIN dbo.Priceplancategory ON dbo.PricePlanMaster.PriceplancatId = dbo.Priceplancategory.ID INNER JOIN dbo.PortalMasterTbl ON dbo.Priceplancategory.PortalId = dbo.PortalMasterTbl.Id where  CompanyMaster.CompanyLoginId='" + cid + "'");
                    if (DNSWebsiteName.Rows.Count > 0)
                    {
                        string PortalName = DNSWebsiteName.Rows[0]["PortalName"].ToString();
                    }
                }

                //string str = " SELECT CompanyMaster.*, PortalMasterTbl.PortalName,PricePlanMaster.VersionInfoMasterId,PricePlanMaster.Producthostclientserver from CompanyMaster inner join PricePlanMaster on PricePlanMaster.PricePlanId=CompanyMaster.PricePlanId inner join PortalMasterTbl on PricePlanMaster.PortalMasterId1 = PortalMasterTbl.id where CompanyLoginId='" + cid + "' ";
                //SqlCommand cmd = new SqlCommand(str, con);
                //SqlDataAdapter adp = new SqlDataAdapter(cmd);
                //DataTable ds = new DataTable();
                //adp.Fill(ds);
                //string portalnamezone = ds.Rows[0]["PortalName"].ToString();
                //DataTable dtzone = companydetail(cid);
                //if (dtzone.Rows.Count > 0)
                //{
                //    foreach (DataRow dr in dtzone.Rows)
                //    {
                //        string zone = dr["WebsiteURL"].ToString();//
                //        try
                //        {
                //            AddARecord(cid.ToString(), zone, ipaddress, dnsServerName, dnsentryservername);
                //            AddARecordportal(cid.ToString(), portalnamezone, ipaddress, dnsServerName, dnsentryservername);
                //        }
                //        catch
                //        {
                //        }
                //    }
                //}
                //DataTable dtmainurl = maincompanyurl(cid);
                //if (dtmainurl.Rows.Count > 0)
                //{
                //    string compnayurl = dtmainurl.Rows[0]["CodeType"].ToString();
                //}
                insertstatus("8", "1", cid);
                Response.Redirect("http://members.busiwiz.com/Companyconfigureinfo.aspx?comid=" + PageMgmt.Encrypted(cid) + "");
            }
            else
            {
                lblmsg.Text = "Need to refress again ";
            }
        }
    }