Esempio n. 1
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);
        }
    }
    protected void FillFrid()
    {
        DataTable dtTemp = new DataTable();

        dtTemp = CreateData();

        DataTable dtfindtab = MyCommonfile.selectBZ(@" SELECT TOP(500) dbo.ClientProductTableMaster.Id AS TableId, dbo.ServerMasterTbl.ServerName,  dbo.ServerMasterTbl.serverloction , dbo.ClientProductTableMaster.TableName,  dbo.ServerMasterTbl.serverloction, dbo.Satellite_Server_Sync_Job_Details.ID,dbo.Satelitte_Server_Sync_Job_Master.JobDateTime,   dbo.Satelitte_Server_Sync_Job_Master.SatelliteServerID, dbo.Satellite_Server_Sync_Job_Details.JobFinishFinishStatus, dbo.Satellite_Server_Sync_Job_Details.SyncedStatus, dbo.Satellite_Server_Sync_Job_Details.CheckingStatus ,  dbo.Satelite_Server_Sync_Log_Deatils.TypeOfOperationDone, dbo.Satelite_Server_Sync_Log_Deatils.ID AS JobReordTableID,dbo.Satelite_Server_Sync_Log_Deatils.RecordID,dbo.Satelite_Server_Sync_Log_Deatils.TypeOfOperationDone, dbo.SyncActionMaster.ActionName
                                                        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

        grdserver.DataSource = dtfindtab;
        grdserver.DataBind();
        if (dtfindtab.Rows.Count == 0)
        {
            // Boolean status2 = Update_Satelitte_Server_Sync_Job_Masters(Convert.ToString(ViewState["JobID"]), true, DateTime.Now);
            pnltransst.Visible  = false;
            lblmsg.Text         = "synchronization successfully";
            Timer1.Enabled      = false;
            pnl_loading.Visible = false;
        }
        else
        {
            pnltransst.Visible  = false;
            Timer1.Enabled      = true;
            pnl_loading.Visible = true;
        }
    }
Esempio n. 3
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());
         }
     }
 }
Esempio n. 4
0
    protected void TransferAtJbTable(string SId)
    {
        Int64     sateserver = 0;
        Int64     tablename  = 0;
        Int64     recordid   = 0;
        DataTable DTServerID = MyCommonfile.selectBZ(" SELECT DISTINCT dbo.ServerMasterTbl.Id,dbo.ServerMasterTbl.ServerName 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 and dbo.ServerMasterTbl.Id=" + SId + " ");//

        for (int iicout = 0; iicout < DTServerID.Rows.Count; iicout++)
        {
            sateserver++;

            Int64 JobID = Insert___Satelitte_Server_Sync_Job_Master(DTServerID.Rows[iicout]["id"].ToString(), "Updation " + DTServerID.Rows[iicout]["ServerName"].ToString() + " on " + Convert.ToString(DateTime.Now), DateTime.Now, false);
            tablename = 0;

            DataTable dsfst = MyCommonfile.selectBZ(" Select DISTINCT TAbleId From Sync_Need_Logs_AtServer where sid='" + DTServerID.Rows[iicout]["id"].ToString() + "' Order By TAbleId ");
            for (int ii = 0; ii < dsfst.Rows.Count; ii++)
            {
                tablename++;
                Int64 JobDetailID = Insert___Satellite_Server_Sync_Job_Details(Convert.ToString(JobID), dsfst.Rows[ii]["TAbleId"].ToString(), false, false, DateTime.Now, true);
            }

            recordid = 0;
            DataTable dstbl = MyCommonfile.selectBZ(" Select DISTINCT TableID,ID From Satellite_Server_Sync_Job_Details where Satelitte_Server_Sync_Job_Master_ID='" + JobID + "' Order By TableID  ");
            for (int ii = 0; ii < dstbl.Rows.Count; ii++)
            {
                DataTable ds = MyCommonfile.selectBZ(" Select * From Sync_Need_Logs_AtServer where sid='" + DTServerID.Rows[iicout]["id"].ToString() + "' and TAbleId='" + dstbl.Rows[ii]["TableID"].ToString() + "' Order By LogId  ");
                for (int iii = 0; iii < ds.Rows.Count; iii++)
                {
                    recordid++;
                    string ID      = ds.Rows[iii]["ID"].ToString();
                    string LogId   = ds.Rows[iii]["LogId"].ToString();
                    string Rcordid = ds.Rows[iii]["Rcordid"].ToString();
                    string TableId = ds.Rows[iii]["TAbleId"].ToString();

                    // Int64 Satallite_Server_Sync_RecordsMasterTblID = Insert___Satallite_Server_Sync_RecordsMasterTbl(DTServerID.Rows[iicout]["id"].ToString(), TableId, DateTime.Now);
                    string action = "1";
                    if (ds.Rows[iii]["ACTION"].ToString() == "INSERT")
                    {
                        action = "1";
                    }
                    else if (ds.Rows[iii]["ACTION"].ToString() == "Updated")
                    {
                        action = "2";
                    }
                    else if (ds.Rows[iii]["ACTION"].ToString() == "Deleted")
                    {
                        action = "3";
                    }
                    // Int64 ReturnID = Insert_Satallite_Server_Sync_RecordsDetailTbl(Convert.ToString(Satallite_Server_Sync_RecordsMasterTblID), Rcordid, DateTime.Now, action, action);
                    Int64 ReturnID2 = Insert___Satelite_Server_Sync_Log_Deatils(dstbl.Rows[ii]["ID"].ToString(), Rcordid, DateTime.Now, action, "", false);

                    DELETE__Sync_Need_Logs_AtServer_AddDelUpdtSelect(ID);
                }
                Boolean status = Update___Satellite_Server_Sync_Job_Details(dstbl.Rows[ii]["ID"].ToString(), false, true, DateTime.Now, true, DateTime.Now);
            }
            Boolean status2 = Update___Satelitte_Server_Sync_Job_Masters(Convert.ToString(JobID), true, DateTime.Now);
        }

        lblmsg1.Text = "In " + Convert.ToString(sateserver) + " server " + Convert.ToString(tablename) + " table's  " + recordid + " records updated for job ";
    }
Esempio n. 5
0
    protected void FillFrid(string sid)
    {
        string str = " ";

        str += " and dbo.ServerMasterTbl.Id=" + sid + "";
        DataTable dtTemp = new DataTable();

        dtTemp = CreateData();
        conn   = new SqlConnection();
        DataTable dtfindtab = MyCommonfile.selectBZ(@" SELECT DISTINCT dbo.ClientProductTableMaster.Id AS TableId, dbo.ServerMasterTbl.ServerName,  dbo.ServerMasterTbl.serverloction 
                                                     , dbo.ClientProductTableMaster.TableName,  dbo.ServerMasterTbl.serverloction, dbo.Satellite_Server_Sync_Job_Details.ID,dbo.Satelitte_Server_Sync_Job_Master.JobDateTime,   dbo.Satelitte_Server_Sync_Job_Master.SatelliteServerID, dbo.Satellite_Server_Sync_Job_Details.JobFinishFinishStatus, dbo.Satellite_Server_Sync_Job_Details.SyncedStatus, dbo.Satellite_Server_Sync_Job_Details.CheckingStatus ,  dbo.Satelite_Server_Sync_Log_Deatils.TypeOfOperationDone, dbo.Satelite_Server_Sync_Log_Deatils.ID AS JobReordTableID,dbo.Satelite_Server_Sync_Log_Deatils.RecordID,dbo.Satelite_Server_Sync_Log_Deatils.TypeOfOperationDone, dbo.SyncActionMaster.ActionName
                                                        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  " + str + "");// and ServerMasterTbl.Id='" + serid + "' and dbo.Satelitte_Server_Sync_Job_Master.Id='" + ViewState["JobID"] + "' and

        grdserver.DataSource = dtfindtab;
        grdserver.DataBind();
        if (dtfindtab.Rows.Count == 0)
        {
            lblmsg.Text = "No any recrd for syncronice";
        }
        else
        {
            openconne(sid);
        }
    }
    protected void Create___Job3_From_Job2(string SId, string Job1ID)
    {
        Int64     recordid = 0;
        DataTable dstbl    = MyCommonfile.selectBZ(" SELECT DISTINCT TOP(1)  dbo.Satellite_Server_Sync_Job_Details.TableID, dbo.Satellite_Server_Sync_Job_Details.ID FROM dbo.Satellite_Server_Sync_Job_Details 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 where Satelitte_Server_Sync_Job_Master.SatelliteServerID='" + SId + "' and CheckingStatus=0 Order By TableID  ");

        if (dstbl.Rows.Count > 0)
        {
            DataTable DTTable = MyCommonfile.selectBZ(@" SELECT DISTINCT dbo.ClientProductTableMaster.Id AS TableId, dbo.ClientProductTableMaster.TableName, dbo.SatelliteSyncronisationrequiringTablesMaster_SerWhere.PKTableName, dbo.SatelliteSyncronisationrequiringTablesMaster_SerWhere.PKIdName, dbo.SatelliteSyncronisationrequiringTablesMaster_SerWhere.Select_Query FROM dbo.ClientProductTableMaster INNER JOIN dbo.SatelliteSyncronisationrequiringTablesMaster ON dbo.SatelliteSyncronisationrequiringTablesMaster.TableID = dbo.ClientProductTableMaster.Id INNER JOIN dbo.SatelliteSyncronisationrequiringTablesMaster_SerWhere ON dbo.SatelliteSyncronisationrequiringTablesMaster.TableID = dbo.SatelliteSyncronisationrequiringTablesMaster_SerWhere.TableId Where dbo.ClientProductTableMaster.Id='" + dstbl.Rows[0]["TableId"].ToString() + "' ");
            if (dstbl.Rows.Count > 0)
            {
                recordid++;
                CreateTableDesign(DTTable.Rows[0]["TableName"].ToString(), SId);
                Int64 RecordInserted = Syncro_Tables.InsertJob3____AllRecord__Satelite_Server_Sync_Log_Deatils(dstbl.Rows[0]["ID"].ToString(), DTTable.Rows[0]["TableName"].ToString(), DTTable.Rows[0]["TableId"].ToString(), SId, DTTable.Rows[0]["PKTableName"].ToString(), DTTable.Rows[0]["PKIdName"].ToString(), DTTable.Rows[0]["Select_Query"].ToString());
                lbl_Msg.Text += "<br> From " + DTTable.Rows[0]["TableName"].ToString() + " Total " + RecordInserted + " Record Are Inseted In Job Table ";
                Boolean jobc2heckstatus = Syncro_Tables.UpdateJob2___Satellite_Server_Sync_Job_Details(dstbl.Rows[0]["ID"].ToString(), false, true, DateTime.Now, false, DateTime.Now);
            }
        }
        else
        {
            Boolean status2 = Syncro_Tables.UpdateJob1___Satelitte_Server_Sync_Job_Master(Convert.ToString(Job1ID), true, DateTime.Now);
            img_loading.Visible = false;
            lbl_Msg.Text       += "<br> Job Done Successfully " + DateTime.Now.ToString();
            Timer1.Enabled      = false;
            if (Request.QueryString["2"] == "Transfer" || Request.QueryString["comid"] != null)
            {
                Response.Redirect("Syncro.aspx?comid=" + Request.QueryString["comid"] + "&sid=" + Request.QueryString["sid"].ToString() + "&1=Transfer");
            }
        }
    }
    protected void fillmenu()
    {
        string strcln = "";

        DropDownList1.Items.Clear();
        if (ddlProductname.SelectedIndex > 0)
        {
            if (chk_activelistonly.Checked == true)
            {
                strcln = " and MainMenuMaster.Active=1 ";
            }
            if (DDLmasterpageL.SelectedIndex > 0)
            {
                strcln += " and MainMenuMaster.MasterPage_Id='" + DDLmasterpageL.SelectedValue + "'";
            }
            if (DDLCategoryS.SelectedIndex > 0)
            {
                strcln += " and MainMenuMaster.MainMenucatId='" + DDLCategoryS.SelectedValue + "'";
            }
            //DataTable dtcln = MyCommonfile.selectBZ(" SELECT distinct MainMenuMaster.*, MainMenuMaster.MainMenuTitle as Page_Name from MainMenuMaster  inner join MasterPageMaster on MasterPageMaster.MasterPageId=MainMenuMaster.MasterPage_Id inner join WebsiteSection on WebsiteSection.WebsiteSectionId=MasterPageMaster.WebsiteSectionId inner join WebsiteMaster on WebsiteMaster.ID=WebsiteSection.WebsiteMasterId inner join VersionInfoMaster on WebsiteMaster.VersionInfoId=VersionInfoMaster.VersionInfoId where VersionInfoMaster.VersionInfoId='" + ddlProductname.SelectedValue + "' "+strcln+" Order by MainMenuMaster.MainMenuName ");
            DataTable dtcln = MyCommonfile.selectBZ(" SELECT DISTINCT dbo.MainMenuMaster.MainMenuId, dbo.MainMenuMaster.MainMenuName, dbo.WebsiteSection.WebsiteMasterId FROM dbo.MainMenuMaster INNER JOIN dbo.PageMaster ON dbo.PageMaster.MainMenuId = dbo.MainMenuMaster.MainMenuId INNER JOIN dbo.MasterPageMaster ON dbo.MainMenuMaster.MasterPage_Id = dbo.MasterPageMaster.MasterPageId INNER JOIN dbo.WebsiteSection ON dbo.MasterPageMaster.WebsiteSectionId = dbo.WebsiteSection.WebsiteSectionId Where WebsiteSection.WebsiteMasterId='" + DDLWebsiteC.SelectedValue + "' Order by dbo.MainMenuMaster.MainMenuName ");
            DropDownList1.DataSource     = dtcln;
            DropDownList1.DataValueField = "MainMenuId";
            DropDownList1.DataTextField  = "MainMenuName";
            DropDownList1.DataBind();
        }
        DropDownList1.Items.Insert(0, "-Select-");
        DropDownList1.Items[0].Value = "0";
    }
    public Boolean CheckDbConn()
    {
        Boolean   status        = false;
        DataTable dtdatabaseins = MyCommonfile.selectBZ(@"SELECT dbo.CodeTypeTbl.Instancename, dbo.CodeTypeTbl.ID, dbo.CodeTypeTbl.ProductCodeDetailId, dbo.ClientMaster.ServerId FROM dbo.CodeTypeTbl INNER JOIN dbo.ClientMaster INNER JOIN dbo.ProductMaster ON dbo.ClientMaster.ClientMasterId = dbo.ProductMaster.ClientMasterId INNER JOIN dbo.VersionInfoMaster ON dbo.ProductMaster.ProductId = dbo.VersionInfoMaster.ProductId ON dbo.CodeTypeTbl.ProductVersionId = dbo.VersionInfoMaster.VersionInfoId where dbo.CodeTypeTbl.ProductCodeDetailId='" + ddlctype.SelectedValue + "'");

        if (dtdatabaseins.Rows.Count > 0)
        {
            string serverid = dtdatabaseins.Rows[0]["ServerId"].ToString();
            string serversqlinstancename = dtdatabaseins.Rows[0]["Instancename"].ToString();
            conn1 = new SqlConnection();
            conn1 = ServerWizard.ServerDatabaseFromInstanceTCP(serverid, serversqlinstancename, ddlctype.SelectedItem.Text);
            try
            {
                if (conn1.State.ToString() != "Open")
                {
                    conn1.Open();
                    status = true;
                    img_dbconn.ImageUrl = "~/images/DatabaseConnection/DatabaseConnTrue.png";
                    img_dbconn.Visible  = true;
                    conn1.Close();
                }
            }
            catch
            {
                img_dbconn.ImageUrl = "~/images/DatabaseConnection/DatabaseConnFalse.png";
                img_dbconn.Visible  = true;
            }
        }
        return(status);
    }
    protected void ddlpriceplancatagory_SelectedIndexChanged(object sender, EventArgs e)
    {
        DataTable Dt        = MyCommonfile.selectBZ(" Select * From PagePricePlanCategoryAccess Where PricePlanCategoryId='" + ddlpriceplancatagory.SelectedValue + "'");
        DataTable DtVersion = MyCommonfile.selectBZ(" SELECT dbo.PagePricePlanCategoryAccess.Id, dbo.PagePricePlanCategoryAccess.Pageid FROM dbo.Priceplancategory INNER JOIN dbo.PortalMasterTbl ON dbo.Priceplancategory.PortalId = dbo.PortalMasterTbl.Id INNER JOIN dbo.PagePricePlanCategoryAccess ON dbo.Priceplancategory.ID = dbo.PagePricePlanCategoryAccess.PricePlanCategoryId INNER JOIN dbo.VersionInfoMaster ON dbo.PortalMasterTbl.ProductId = dbo.VersionInfoMaster.ProductId Where VersionInfoMaster.VersionInfoId='" + ddlProductname.SelectedValue + "' ");

        if (Dt.Rows.Count > 0 || DtVersion.Rows.Count == 0)
        {
            Rbtn_CopyAccess.Visible = false;
            lbl_CopyAccess.Visible  = false;
            ddlpriceplancatagoryCopyFrom.Visible = false;
            panelem.Visible = true;

            Label1.Text = "";
        }
        else
        {
            Rbtn_CopyAccess.Visible = true;
            lbl_CopyAccess.Visible  = true;
            ddlpriceplancatagoryCopyFrom.Visible = false;
            panelem.Visible = Visible = true;

            if (Rbtn_CopyAccess.SelectedValue == "1")
            {
                ddlpriceplancatagoryCopyFrom.Visible = true;
                fillplancategoryCopyFrom();
            }
        }
        FillGrid();
    }
Esempio n. 10
0
    protected void Count_Job3_Record(string SId)
    {
        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='" + SId + "' ");//  and dbo.Satelitte_Server_Sync_Job_Master.Id='" + ViewState["JobID"] + "' and

        lbl_Msg.Text = " Please waite for some moment we syncronice " + dtfindtab.Rows[0]["TotalCount"] + " record at server ";
    }
Esempio n. 11
0
    protected void DynamicalyTable(string tanlename, string recordid)
    {
        string    Temp2    = " INSERT INTO " + tanlename + "(  ";
        string    Temp3val = "";
        DataTable dts1     = MyCommonfile.selectBZ(" select column_name,data_type,CHARACTER_MAXIMUM_LENGTH from INFORMATION_SCHEMA.COLUMNS where table_name='" + tanlename + "'");

        for (int k = 0; k < dts1.Rows.Count; k++)
        {
            Temp2 += ("" + dts1.Rows[k]["column_name"] + " ,");
        }
        Temp2  = Temp2.Remove(Temp2.Length - 1);
        Temp2 += ") VAlues";

        DataTable maxiddesid = MyCommonfile.selectBZ(" select column_name,data_type,CHARACTER_MAXIMUM_LENGTH from INFORMATION_SCHEMA.COLUMNS where table_name='" + tanlename + "'");
        DataTable dtr        = MyCommonfile.selectBZ(" Select * From " + tanlename + " where " + dts1.Rows[0]["column_name"] + "=" + recordid + " ");
        int       c          = 0;

        foreach (DataRow itm in dtr.Rows)
        {
            string    cccd   = "(";
            DataTable dtsccc = MyCommonfile.selectBZ("select column_name,data_type,CHARACTER_MAXIMUM_LENGTH from INFORMATION_SCHEMA.COLUMNS where table_name='" + tanlename + "'");
            for (int k = 0; k < dtsccc.Rows.Count; k++)
            {
                cccd += "'" + Encrypted(Convert.ToString(itm["" + dtsccc.Rows[k]["column_name"] + ""])) + "' ,";
            }
            cccd  = cccd.Remove(cccd.Length - 1);
            cccd += " )";
            c++;
            if (c == 199)
            {
                c = 0;
                if (Temp3val.Length > 0)
                {
                    Temp3val += ",";
                }
                Temp3val += cccd;
                if (Temp3val.Length > 0)
                {
                    string     tempstr = Temp2 + Temp3val;
                    SqlCommand ccm     = new SqlCommand(tempstr, conn);
                    ccm.ExecuteNonQuery();
                }
                cccd     = "";
                Temp3val = "";
            }
            if (Temp3val.Length > 0)
            {
                Temp3val += ",";
            }
            Temp3val += cccd;
        }
        if (Temp3val.Length > 0)
        {
            Temp2 += Temp3val;
            SqlCommand ccm = new SqlCommand(Temp2, conn);
            ccm.ExecuteNonQuery();
        }
    }
Esempio n. 12
0
    protected void FillServer()
    {
        DataTable DTServer = MyCommonfile.selectBZ(" SELECT DISTINCT dbo.ServerMasterTbl.Id,dbo.ServerMasterTbl.ServerName 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 ");//and dbo.ServerMasterTbl.Id=5

        ddlserver.DataSource     = DTServer;
        ddlserver.DataTextField  = "ServerName";
        ddlserver.DataValueField = "Id";
        ddlserver.DataBind();
    }
    protected void fillfiltercodetype()
    {
        DataTable dtcln = MyCommonfile.selectBZ("SELECT DISTINCT dbo.ProductCodeDetailTbl.Id, dbo.ProductCodeDetailTbl.ProductId, dbo.ProductCodeDetailTbl.CodeTypeName FROM dbo.CodeTypeTbl INNER JOIN dbo.CodeTypeCategory ON dbo.CodeTypeCategory.CodeMasterNo = dbo.CodeTypeTbl.CodeTypeCategoryId INNER JOIN dbo.ProductCodeDetailTbl ON dbo.CodeTypeTbl.ProductCodeDetailId = dbo.ProductCodeDetailTbl.Id where  ProductCodeDetailTbl.Active='1' and CodeTypeTbl.ProductVersionId='" + FilterProductname.SelectedValue + "' and dbo.CodeTypeTbl.CodeTypeCategoryId='2'  order  by dbo.ProductCodeDetailTbl.CodeTypeName ");

        ddlctype.DataSource     = dtcln;
        ddlctype.DataValueField = "Id";
        ddlctype.DataTextField  = "CodeTypeName";
        ddlctype.DataBind();
        ddlctype.Items.Insert(0, "All");
        ddlctype.Items[0].Value = "0";
    }
    protected void FillProduct()
    {
        DataTable dtcln = MyCommonfile.selectBZ(" SELECT distinct ProductMaster.ProductId, VersionInfoMaster.VersionInfoId,ProductMaster.ProductName + ' : ' + VersionInfoMaster.VersionInfoName as productversion FROM dbo.ClientProductTableMaster INNER JOIN dbo.ProductMaster INNER JOIN dbo.VersionInfoMaster ON dbo.ProductMaster.ProductId = dbo.VersionInfoMaster.ProductId INNER JOIN dbo.ProductDetail ON dbo.ProductDetail.VersionNo = dbo.VersionInfoMaster.VersionInfoName ON dbo.ClientProductTableMaster.VersionInfoId = dbo.VersionInfoMaster.VersionInfoId INNER JOIN dbo.ProductCodeDetailTbl ON dbo.ClientProductTableMaster.Databaseid = dbo.ProductCodeDetailTbl.Id where ClientMasterId=" + Session["ClientId"].ToString() + " and ProductDetail.Active =1 order  by productversion ");

        ddlProductname.DataSource     = dtcln;
        ddlProductname.DataValueField = "VersionInfoId";
        ddlProductname.DataTextField  = "productversion";
        ddlProductname.DataBind();
        ddlProductname.Items.Insert(0, "-Select-");
        ddlProductname.Items[0].Value = "0";
    }
Esempio n. 15
0
    //



    protected void FillLBTable()
    {
        DataTable dtcln = MyCommonfile.selectBZ(" SELECT dbo.ClientProductTableMaster.TableName , dbo.ClientProductTableMaster.Id, dbo.SatelliteSyncronisationrequiringTablesMaster.Id AS syncId FROM dbo.SatelliteSyncronisationrequiringTablesMaster INNER JOIN dbo.ClientProductTableMaster ON dbo.SatelliteSyncronisationrequiringTablesMaster.TableID = dbo.ClientProductTableMaster.Id where ClientProductTableMaster.active=1  order by ClientProductTableMaster.TableName ");// and ClientProductTableMaster.Databaseid='" + LBproductDB + "'

        DDLLiceTableName.DataSource     = dtcln;
        DDLLiceTableName.DataValueField = "Id";
        DDLLiceTableName.DataTextField  = "TableName";
        DDLLiceTableName.DataBind();
        DDLLiceTableName.Items.Insert(0, "--Select--");
        DDLLiceTableName.Items[0].Value = "0";
    }
    protected void SatelliteSyncronisationrequiringTablesMaster(string verid, string TableID)
    {
        SqlCommand cmdrX = new SqlCommand(" Delete  from  SatelliteSyncronisationrequiringTablesMaster where TableID='" + TableID + "'", conn);

        conn.Open();
        cmdrX.ExecuteNonQuery();
        conn.Close();
        string    Temp3val = "";
        string    temp     = "";
        string    Temp2    = "INSERT INTO SatelliteSyncronisationrequiringTablesMaster(Id,ProductVersionID,TableID,Name,Status,TableName)Values ";
        DataTable dtr      = MyCommonfile.selectBZ(" Select Distinct * from SatelliteSyncronisationrequiringTablesMaster where status='1' and ProductVersionID='" + verid + "'");

        temp = Temp3val;
        int jk = 0;

        foreach (DataRow itm in dtr.Rows)
        {
            if (Temp3val.Length > 0)
            {
                Temp3val += ",";
            }
            Temp3val += "('" + Convert.ToString(itm["Id"]) + "','" + Convert.ToString(itm["ProductVersionID"]) + "','" + Convert.ToString(itm["TableID"]) + "'," +
                        " '" + Convert.ToString(itm["Name"]) + "','" + Convert.ToString(itm["Status"]) + "','" + Convert.ToString(itm["TableName"]) + "')";
            if (jk > 700)
            {
                temp = Temp2 + Temp3val;
                SqlCommand ccm = new SqlCommand(temp, conn);
                if (conn.State.ToString() != "Open")
                {
                    conn.Open();
                }
                ccm.ExecuteNonQuery();
                conn.Close();
                Temp3val = "";
                temp     = "";
                jk       = 0;
            }
            else
            {
                jk += 1;
            }
        }
        if (Temp3val.Length > 0)
        {
            temp = Temp2 + Temp3val;
            SqlCommand ccm = new SqlCommand(temp, conn);
            if (conn.State.ToString() != "Open")
            {
                conn.Open();
            }
            ccm.ExecuteNonQuery();
            conn.Close();
        }
    }
    protected void FillProduct()
    {
        DataTable dtcln = MyCommonfile.selectBZ(" SELECT distinct ProductMaster.ProductId,ProductMaster.ProductName,ProductMaster.ProductName +':'+ VersionInfoMaster.VersionInfoName as aa,VersionInfoMaster.VersionInfoId  FROM ProductMaster inner join ProductDetail on ProductDetail.ProductId=ProductMaster.ProductId inner join VersionInfoMaster on VersionInfoMaster.ProductId=ProductMaster.ProductId where ClientMasterId=" + Session["ClientId"].ToString() + " and ProductDetail.Active='1'  and VersionInfoMaster.Active='1'  order  by ProductName");

        FilterProductname.DataSource     = dtcln;
        FilterProductname.DataValueField = "VersionInfoId";
        FilterProductname.DataTextField  = "ProductName";
        FilterProductname.DataBind();
        FilterProductname.Items.Insert(0, "All");
        FilterProductname.Items[0].Value = "0";
    }
    protected void SyncronisationrequiredTbl(string verid, string TableId)
    {
        SqlCommand cmdrX = new SqlCommand(" Delete  from  SyncronisationrequiredTbl where SatelliteSyncronisationrequiringTablesMasterID='" + TableId + "' ", conn);

        conn.Open();
        cmdrX.ExecuteNonQuery();
        conn.Close();
        string    Temp3val = "";
        string    temp     = "";
        string    Temp2    = " INSERT INTO SyncronisationrequiredTbl (ID,SatelliteSyncronisationrequiringTablesMasterID,DateandTime) Values ";
        DataTable dtr      = MyCommonfile.selectBZ(" Select Distinct SyncronisationrequiredTbl.*   from  SyncronisationrequiredTbl inner join SatelliteSyncronisationrequiringTablesMaster on SatelliteSyncronisationrequiringTablesMaster.Id=SyncronisationrequiredTbl.SatelliteSyncronisationrequiringTablesMasterID where ProductVersionID='" + verid + "' and SyncronisationrequiredTbl.SatelliteSyncronisationrequiringTablesMasterID='" + TableId + "' ");

        temp = Temp3val;
        int jk = 0;

        foreach (DataRow itm in dtr.Rows)
        {
            if (Temp3val.Length > 0)
            {
                Temp3val += ",";
            }
            Temp3val += "('" + Convert.ToString(itm["ID"]) + "','" + Convert.ToString(itm["SatelliteSyncronisationrequiringTablesMasterID"]) + "','" + Convert.ToString(itm["DateandTime"]) + "')";
            if (jk > 700)
            {
                temp = Temp2 + Temp3val;
                SqlCommand ccm = new SqlCommand(temp, conn);
                if (conn.State.ToString() != "Open")
                {
                    conn.Open();
                }
                ccm.ExecuteNonQuery();
                conn.Close();
                Temp3val = "";
                temp     = "";
                jk       = 0;
            }
            else
            {
                jk += 1;
            }
        }
        if (Temp3val.Length > 0)
        {
            temp = Temp2 + Temp3val;
            SqlCommand ccm = new SqlCommand(temp, conn);
            if (conn.State.ToString() != "Open")
            {
                conn.Open();
            }
            ccm.ExecuteNonQuery();
            conn.Close();
        }
    }
Esempio n. 19
0
    protected void FillDefault()
    {
        DataTable dtclnn = MyCommonfile.selectBZ(" SELECT TOP(1) * From SatelliteSyncronisationrequiringTablesMaster where ServerProductVersionID IS NOT NULL AND ServerDatabaseID IS NOT NULL ");

        if (dtclnn.Rows.Count > 0)
        {
            FillProduct();
            ddlProductname.SelectedValue = dtclnn.Rows[0]["ServerProductVersionID"].ToString();
            fillCodetype();
            ddlcodetype.SelectedValue = dtclnn.Rows[0]["ServerDatabaseID"].ToString();
            FillGrid();
        }
    }
Esempio n. 20
0
 protected void Gv_Com_Cre_Need_Code_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         Label     lbl_id             = (Label)e.Row.FindControl("lbl_id");
         Label     lbl_CompanyLoginId = (Label)e.Row.FindControl("lbl_CompanyLoginId");
         DataTable dtneedcode         = MyCommonfile.selectBZ(" SELECT * From CompanyCreationNeedCode Where ID='" + lbl_id.Text + "'");
         if (dtneedcode.Rows.Count > 0)
         {
             Boolean successfullyuploaded = Convert.ToBoolean(dtneedcode.Rows[0]["Successfullyuploadedtoserver"].ToString());
         }
     }
 }
 protected void fillportal()
 {
     ddlportal.Items.Clear();
     if (ddlProductname.SelectedIndex > 0)
     {
         string    strcln1 = " ";
         DataTable dtcln   = MyCommonfile.selectBZ(" Select * from PortalMasterTbl  inner join ProductMaster on ProductMaster.ProductId= PortalMasterTbl.ProductId inner join VersionInfoMaster on VersionInfoMaster.ProductId=ProductMaster.ProductId where VersionInfoMaster.VersionInfoId='" + ddlProductname.SelectedValue + "' order by PortalName ");
         ddlportal.DataSource     = dtcln;
         ddlportal.DataValueField = "Id";
         ddlportal.DataTextField  = "PortalName";
         ddlportal.DataBind();
     }
     ddlportal.Items.Insert(0, "-Select-");
 }
 protected void fillMasterPageSearch()
 {
     DDLmasterpageL.Items.Clear();
     if (DDLWebsiteC.SelectedIndex > 0)
     {
         string    strcln1 = " ";
         DataTable dtcln   = MyCommonfile.selectBZ(" SELECT dbo.MasterPageMaster.MasterPageId, dbo.MasterPageMaster.MasterPageName, dbo.MasterPageMaster.MasterPageDescription, dbo.MasterPageMaster.WebsiteSectionId FROM dbo.MasterPageMaster INNER JOIN dbo.WebsiteSection ON dbo.MasterPageMaster.WebsiteSectionId = dbo.WebsiteSection.WebsiteSectionId Where WebsiteSection.WebsiteMasterId='" + DDLWebsiteC.SelectedValue + "' ");
         DDLmasterpageL.DataSource     = dtcln;
         DDLmasterpageL.DataValueField = "MasterPageId";
         DDLmasterpageL.DataTextField  = "MasterPageName";
         DDLmasterpageL.DataBind();
     }
     DDLmasterpageL.Items.Insert(0, "-Select-");
 }
Esempio n. 23
0
    protected void DDLWebsiteC_SelectedIndexChanged(object sender, EventArgs e)
    {
        DataTable dtv = MyCommonfile.selectBZ(" SELECT DISTINCT dbo.PageMaster.PageName + '<=>' + dbo.PageMaster.PageTitle AS PageName, dbo.PageMaster.PageName AS PageNameval FROM            dbo.PageMaster INNER JOIN dbo.VersionInfoMaster ON dbo.VersionInfoMaster.VersionInfoId = dbo.PageMaster.VersionInfoMasterId INNER JOIN dbo.MainMenuMaster ON dbo.PageMaster.MainMenuId = dbo.MainMenuMaster.MainMenuId INNER JOIN dbo.MasterPageMaster ON dbo.MainMenuMaster.MasterPage_Id = dbo.MasterPageMaster.MasterPageId INNER JOIN dbo.WebsiteSection ON dbo.MasterPageMaster.WebsiteSectionId = dbo.WebsiteSection.WebsiteSectionId INNER JOIN dbo.pageplaneaccesstbl ON dbo.PageMaster.PageId = dbo.pageplaneaccesstbl.Pageid where  WebsiteSection.WebsiteMasterId='" + DDLWebsiteC.SelectedValue + "' ");

        ddlpage.DataSource     = dtv;
        ddlpage.DataValueField = "PageNameval";
        ddlpage.DataTextField  = "PageName";
        ddlpage.DataBind();

        ddlafterloginpage.DataSource     = dtv;
        ddlafterloginpage.DataValueField = "PageNameval";
        ddlafterloginpage.DataTextField  = "PageName";
        ddlafterloginpage.DataBind();
    }
Esempio n. 24
0
    // protected void Create__Job3_From_Log2(string SId,string Job1ID)
    //{
    //    Int64 recordid = 0;
    //        recordid = 0;
    //        DataTable dstbl = MyCommonfile.selectBZ(" SELECT DISTINCT TOP (1) dbo.Satellite_Server_Sync_Job_Details.TableID, dbo.Satellite_Server_Sync_Job_Details.ID, dbo.ClientProductTableMaster.TableName FROM dbo.Satellite_Server_Sync_Job_Details INNER JOIN dbo.ClientProductTableMaster ON dbo.Satellite_Server_Sync_Job_Details.TableID = dbo.ClientProductTableMaster.Id where Satelitte_Server_Sync_Job_Master_ID='" + Job1ID + "' and CheckingStatus=0 Order By TableID  ");
    //        if (dstbl.Rows.Count>0)
    //        {
    //            DataTable ds = MyCommonfile.selectBZ(" Select * From Sync_Need_Logs_AtServer where sid='" + SId + "' and TAbleId='" + dstbl.Rows[0]["TableID"].ToString() + "' Order By LogId ");
    //            for (int iii = 0; iii < ds.Rows.Count; iii++)
    //            {
    //                recordid++;
    //                string ID = ds.Rows[iii]["ID"].ToString();
    //                string LogId = ds.Rows[iii]["LogId"].ToString();
    //                string Rcordid = ds.Rows[iii]["Rcordid"].ToString();
    //                string TableId = ds.Rows[iii]["TAbleId"].ToString();
    //                string action = "1";
    //                if (ds.Rows[iii]["ACTION"].ToString() == "INSERT")
    //                {
    //                    action = "1";
    //                }
    //                else if (ds.Rows[iii]["ACTION"].ToString() == "Updated")
    //                {
    //                    action = "2";
    //                }
    //                else if (ds.Rows[iii]["ACTION"].ToString() == "Deleted")
    //                {
    //                    action = "3";
    //                }
    //                // Int64 ReturnID = Insert_Satallite_Server_Sync_RecordsDetailTbl(Convert.ToString(Satallite_Server_Sync_RecordsMasterTblID), Rcordid, DateTime.Now, action, action);
    //                Int64 ReturnID2 =Syncro_Tables.InsertJob3___Satelite_Server_Sync_Log_Deatils(dstbl.Rows[0]["ID"].ToString(), Rcordid, DateTime.Now, action, "", false);
    //                Syncro_Tables.DELETE___Sync_Need_Logs_AtServer(ID);
    //            }
    //             lbl_Msg.Text += "<br> Total " + recordid + " Record Are Inseted In " + dstbl.Rows[0]["TableName"].ToString() + " Table ";
    //            Boolean jobc2heckstatus = Syncro_Tables.UpdateJob2___Satellite_Server_Sync_Job_Details(dstbl.Rows[0]["ID"].ToString(), false, true, DateTime.Now, false, DateTime.Now);
    //        }
    //        else
    //        {
    //            img_loading.Visible = false;
    //            lbl_Msg.Text += "<br> Job Done Successfully ";
    //            Boolean status2 = Syncro_Tables.UpdateJob1___Satelitte_Server_Sync_Job_Master(Convert.ToString(Job1ID), true, DateTime.Now);
    //            Timer1.Enabled = false;
    //        }
    //}



    protected void GetSync_Create_Serv_List___InsertAtLog2(string ServerID)
    {
        DataTable DTTable = MyCommonfile.selectBZ(@" SELECT DISTINCT dbo.ClientProductTableMaster.Id AS TableId, dbo.ClientProductTableMaster.TableName, dbo.SatelliteSyncronisationrequiringTablesMaster_SerWhere.PKTableName, dbo.SatelliteSyncronisationrequiringTablesMaster_SerWhere.PKIdName, dbo.SatelliteSyncronisationrequiringTablesMaster_SerWhere.Select_Query FROM dbo.ClientProductTableMaster INNER JOIN dbo.SatelliteSyncronisationrequiringTablesMaster ON dbo.SatelliteSyncronisationrequiringTablesMaster.TableID = dbo.ClientProductTableMaster.Id INNER JOIN dbo.SatelliteSyncronisationrequiringTablesMaster_SerWhere ON dbo.SatelliteSyncronisationrequiringTablesMaster.TableID = dbo.SatelliteSyncronisationrequiringTablesMaster_SerWhere.TableId ");

        for (int iicouts = 0; iicouts < DTTable.Rows.Count; iicouts++)
        {
            Int64 RecordInserted = Table_DatabaseSQL.All_Table_All_Record__InsertAtLog2(DTTable.Rows[iicouts]["TableName"].ToString(), DTTable.Rows[iicouts]["TableId"].ToString(), ServerID, DTTable.Rows[iicouts]["PKTableName"].ToString(), DTTable.Rows[iicouts]["PKIdName"].ToString(), DTTable.Rows[iicouts]["Select_Query"].ToString());
            lbl_Msg.Text = "Total " + RecordInserted + " Record Are Inseted In " + DTTable.Rows[iicouts]["TableName"].ToString() + " Table ";
            //pnl_loading.Visible = true;
            //Timer1.Enabled = true;
        }
        lblContentThreeDate.Text = "All Table Record Inserted Successfully";
        // Response.Redirect("Silent_Synchronoze.aspx?sid=" + ServerID + "&job=yes");
    }
Esempio n. 25
0
    protected void Fillgrid2()
    {
        DataTable dtTemp = new DataTable();

        dtTemp = CreateData();
        conn   = new SqlConnection();
        DataTable dtfindtab = MyCommonfile.selectBZ(@" SELECT DISTINCT dbo.ClientProductTableMaster.Id AS TableId, dbo.ClientProductTableMaster.TableTitle, dbo.SatelliteSyncronisationrequiringTablesMaster.Id, dbo.ClientProductTableMaster.TableName FROM dbo.ClientProductTableMaster INNER JOIN dbo.SatelliteSyncronisationrequiringTablesMaster ON dbo.SatelliteSyncronisationrequiringTablesMaster.TableID = dbo.ClientProductTableMaster.Id  ");

        GridView2.DataSource = dtfindtab;
        GridView2.DataBind();
        DataTable dtr;

        foreach (GridViewRow item in GridView2.Rows)
        {
            Label lblTableId = (Label)item.FindControl("lblTableId");
            Label lbltabname = (Label)item.FindControl("lbltabname");
            Label lbl_total_record_for_ser = (Label)item.FindControl("lbl_total_record_for_ser");
            lbl_total_record_for_ser.Text = "";
            Label lbl_total_record_in_license_table = (Label)item.FindControl("lbl_total_record_in_license_table");
            lbl_total_record_in_license_table.Text = "";
            try
            {
                DataTable DtWhere = MyCommonfile.selectBZ(" Select * FROM SatelliteSyncronisationrequiringTablesMaster_SerWhere Where TableId='" + lblTableId.Text + "'");
                if (DtWhere.Rows.Count > 0)
                {
                    //Select_Query
                    string PKTableName  = DtWhere.Rows[0]["PKTableName"].ToString();
                    string PKIdName     = DtWhere.Rows[0]["PKIdName"].ToString();
                    string Select_Query = DtWhere.Rows[0]["Select_Query"].ToString();
                    string WhereForPKID = "";
                    // WhereForPKID = " Where " + PKTableName + "." + PKIdName + "=" + RecordID;
                    string SelectWhere2 = " Where PricePlanMaster.PricePlanId IN ( Select PricePlanId From  CompanyMaster Where active=1 and ServerId=" + ddlserver.SelectedValue + ") ";
                    Select_Query = Select_Query + WhereForPKID + SelectWhere2;
                    dtr          = MyCommonfile.selectBZ("" + Select_Query + " ");
                    lbl_total_record_for_ser.Text = Convert.ToString(dtr.Rows.Count);
                }
                else
                {
                    dtr = MyCommonfile.selectBZ(" Select * From " + lbltabname.Text + "");
                    lbl_total_record_for_ser.Text = Convert.ToString(dtr.Rows.Count);
                }
                dtr = MyCommonfile.selectBZ(" Select * From " + lbltabname.Text + "");
                lbl_total_record_in_license_table.Text = Convert.ToString(dtr.Rows.Count);
            }
            catch
            {
            }
        }
    }
Esempio n. 26
0
    protected void CreateJob3(string SId)
    {
        Int64 recordid = 0;

        recordid = 0;
        DataTable ds32 = MyCommonfile.selectBZ(" Select Count(id) as id From Sync_Need_Logs_AtServer where sid='" + SId + "'   ");
        DataTable ds3  = MyCommonfile.selectBZ(" Select TOP(1) * From Sync_Need_Logs_AtServer where sid='" + SId + "'   ");

        if (Convert.ToInt32(ds32.Rows[0]["id"].ToString()) > 0)
        {
            Label1.Text = ds32.Rows[0]["id"].ToString() + " total record remaining for create job";
            DataTable dstbl = MyCommonfile.selectBZ(" SELECT DISTINCT TOP(1) dbo.Satellite_Server_Sync_Job_Details.TableID, dbo.Satellite_Server_Sync_Job_Details.ID, Satelitte_Server_Sync_Job_Master.Id  FROM            dbo.Satellite_Server_Sync_Job_Details 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 where Satelitte_Server_Sync_Job_Master.SatelliteServerID='" + SId + "' and Satellite_Server_Sync_Job_Details.TableID='" + ds3.Rows[0]["TableID"].ToString() + "'  ");
            for (int ii = 0; ii < dstbl.Rows.Count; ii++)
            {
                DataTable ds = MyCommonfile.selectBZ(" Select TOP(50)* From Sync_Need_Logs_AtServer where sid='" + SId + "' and TAbleId='" + dstbl.Rows[ii]["TableID"].ToString() + "' Order By LogId  ");
                for (int iii = 0; iii < ds.Rows.Count; iii++)
                {
                    recordid++;
                    string ID      = ds.Rows[iii]["ID"].ToString();
                    string LogId   = ds.Rows[iii]["LogId"].ToString();
                    string Rcordid = ds.Rows[iii]["Rcordid"].ToString();
                    string TableId = ds.Rows[iii]["TAbleId"].ToString();
                    // Int64 Satallite_Server_Sync_RecordsMasterTblID = Insert___Satallite_Server_Sync_RecordsMasterTbl(DTServerID.Rows[iicout]["id"].ToString(), TableId, DateTime.Now);
                    string action = "1";
                    if (ds.Rows[iii]["ACTION"].ToString() == "INSERT")
                    {
                        action = "1";
                    }
                    else if (ds.Rows[iii]["ACTION"].ToString() == "Updated")
                    {
                        action = "2";
                    }
                    else if (ds.Rows[iii]["ACTION"].ToString() == "Deleted")
                    {
                        action = "3";
                    }
                    Int64 Job3DID = Syncro_Tables.InsertJob3___Satelite_Server_Sync_Log_Deatils(dstbl.Rows[ii]["ID"].ToString(), Rcordid, DateTime.Now, action, "", false);
                    Syncro_Tables.DELETE___Sync_Need_Logs_AtServer(ID);
                }
            }
        }
        DataTable ds1 = MyCommonfile.selectBZ(" Select TOP(1)* From Sync_Need_Logs_AtServer where sid='" + SId + "' ");

        if (ds1.Rows.Count == 0)
        {
            Timer1.Enabled      = false;
            img_loading.Visible = false;
        }
    }
    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();
                }
            }
        }
    }
Esempio n. 28
0
    protected void fillCodetype()
    {
        ddlcodetype.DataSource = null;
        ddlcodetype.DataBind();

        DataTable dtcln = MyCommonfile.selectBZ(" SELECT DISTINCT TOP (100) PERCENT dbo.ProductCodeDetailTbl.Id, dbo.ProductCodeDetailTbl.ProductId, dbo.ProductCodeDetailTbl.CodeTypeName,dbo.CodeTypeTbl.CodeTypeCategoryId FROM dbo.CodeTypeTbl INNER JOIN dbo.CodeTypeCategory ON dbo.CodeTypeCategory.CodeMasterNo = dbo.CodeTypeTbl.CodeTypeCategoryId INNER JOIN dbo.ProductCodeDetailTbl ON dbo.CodeTypeTbl.ProductCodeDetailId = dbo.ProductCodeDetailTbl.Id  where  ProductCodeDetailTbl.Active='1' and CodeTypeTbl.ProductVersionId='" + ddlProductname.SelectedValue + "' and CodeTypeCategory.Id='2'  order  by dbo.ProductCodeDetailTbl.CodeTypeName ");

        ddlcodetype.DataSource     = dtcln;
        ddlcodetype.DataValueField = "Id";
        ddlcodetype.DataTextField  = "CodeTypeName";
        ddlcodetype.DataBind();
        ddlcodetype.Items.Insert(0, "--Select--");
        ddlcodetype.Items[0].Value = "0";
        ddlcodetype.SelectedIndex  = 0;
    }
Esempio n. 29
0
    protected void TransferAtJob1Job2(string SId)
    {
        Int64 tablename = 0;
        Int64 JobID     = Syncro_Tables.InsertJob1___Satelitte_Server_Sync_Job_Master(SId, "Updation " + SId + " on " + Convert.ToString(DateTime.Now), DateTime.Now, false);

        tablename = 0;
        DataTable dsfst = MyCommonfile.selectBZ(" Select DISTINCT TAbleId From Sync_Need_Logs_AtServer where sid='" + SId + "' Order By TAbleId ");

        for (int ii = 0; ii < dsfst.Rows.Count; ii++)
        {
            tablename++;
            Int64 JobDetailID = Syncro_Tables.InsertJob2___Satellite_Server_Sync_Job_Details(Convert.ToString(JobID), dsfst.Rows[ii]["TAbleId"].ToString(), false, false, DateTime.Now, true);
        }
        // lbl_Msg.Text = Convert.ToString(tablename) + " tables added for create job ";
    }
    protected void FillProduct()
    {
        //string strcln = " SELECT distinct ProductMaster.ProductId, VersionInfoMaster.VersionInfoId,ProductMaster.ProductName + ' : ' + VersionInfoMaster.VersionInfoName as productversion FROM ProductMaster  inner join VersionInfoMaster on ProductMaster.ProductId=VersionInfoMaster.ProductId inner join ProductDetail on ProductDetail.VersionNo=VersionInfoMaster.VersionInfoName    where ClientMasterId=" + Session["ClientId"].ToString() + " and ProductDetail.Active ='True' order  by productversion";
        //SqlCommand cmdcln = new SqlCommand(strcln, con);
        //DataTable dtcln = new DataTable();
        //SqlDataAdapter adpcln = new SqlDataAdapter(cmdcln);
        //adpcln.Fill(dtcln);
        DataTable dtcln = MyCommonfile.selectBZ(" SELECT distinct ProductMaster.ProductId, VersionInfoMaster.VersionInfoId,ProductMaster.ProductName + ' : ' + VersionInfoMaster.VersionInfoName as productversion FROM dbo.ClientProductTableMaster INNER JOIN dbo.ProductMaster INNER JOIN dbo.VersionInfoMaster ON dbo.ProductMaster.ProductId = dbo.VersionInfoMaster.ProductId INNER JOIN dbo.ProductDetail ON dbo.ProductDetail.VersionNo = dbo.VersionInfoMaster.VersionInfoName ON dbo.ClientProductTableMaster.VersionInfoId = dbo.VersionInfoMaster.VersionInfoId INNER JOIN dbo.ProductCodeDetailTbl ON dbo.ClientProductTableMaster.Databaseid = dbo.ProductCodeDetailTbl.Id where ClientMasterId=" + Session["ClientId"].ToString() + " and ProductDetail.Active =1 order  by productversion ");

        ddlProductname.DataSource     = dtcln;
        ddlProductname.DataValueField = "VersionInfoId";
        ddlProductname.DataTextField  = "productversion";
        ddlProductname.DataBind();
        ddlProductname.Items.Insert(0, "-Select-");
    }