//Job3-----
    public static Int64 InsertJob3___Satelite_Server_Sync_Log_Deatils(string Satellite_Server_Sync_Job_Details_ID, string RecordID, DateTime Dateandtime, string TypeOfOperationDone, string TyepeOfOperationReqd, Boolean SyncedStatus)
    {
        SqlConnection con      = MyCommonfile.licenseconn();
        Int64         ReturnID = 0;

        if (con.State.ToString() != "Open")
        {
            con.Open();
        }
        SqlCommand cmd = new SqlCommand("Satelite_Server_Sync_Log_Deatils_AddDelUpdtSelect", con);

        cmd.CommandType = CommandType.StoredProcedure;
        cmd.Parameters.AddWithValue("@StatementType", "Insert");
        cmd.Parameters.AddWithValue("@Satellite_Server_Sync_Job_Details_ID", Satellite_Server_Sync_Job_Details_ID);
        cmd.Parameters.AddWithValue("@RecordID", RecordID);
        cmd.Parameters.AddWithValue("@Dateandtime", Dateandtime);
        cmd.Parameters.AddWithValue("@TypeOfOperationDone", TypeOfOperationDone);
        cmd.Parameters.AddWithValue("@TyepeOfOperationReqd", TyepeOfOperationReqd);
        cmd.Parameters.AddWithValue("@SyncedStatus", SyncedStatus);
        object maxprocID = new object();

        maxprocID = cmd.ExecuteScalar();
        ReturnID  = Convert.ToInt64(maxprocID);
        con.Close();
        return(ReturnID);
    }
    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();
    }
Exemple #3
0
    public static Boolean Delete_Satellite_Server_Sync_Job_Details(string Satellite_Server_Sync_Job_DetailsID)
    {
        Boolean Status = false;

        try
        {
            SqlConnection liceco = new SqlConnection();
            liceco = MyCommonfile.licenseconn();
            if (liceco.State.ToString() != "Open")
            {
                liceco.Open();
            }
            SqlCommand cmd = new SqlCommand("Satellite_Server_Sync_Job_Details_AddDelUpdtSelect", liceco);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@StatementType", "DeleteJD");
            cmd.Parameters.AddWithValue("@Satelitte_Server_Sync_Job_Master_ID", Satellite_Server_Sync_Job_DetailsID);
            cmd.ExecuteNonQuery();
            liceco.Close();
            Status = true;
        }
        catch
        {
            Status = false;
        }
        return(Status);
    }
    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 static Boolean Insert_CompanyABCMaster(string CompanyLoginId, string C, string C1, string C2, string C3, string C4, string C5, String ServerId)
    {
        SqlConnection liceco = new SqlConnection();

        liceco = MyCommonfile.licenseconn();
        if (liceco.State.ToString() != "Open")
        {
            liceco.Open();
        }
        SqlCommand cmd = new SqlCommand("CompanyABCMaster_AddDelUpdtSelect", liceco);

        cmd.CommandType = CommandType.StoredProcedure;
        cmd.Parameters.AddWithValue("@StatementType", "Insert");
        cmd.Parameters.AddWithValue("@CompanyLoginId", CompanyLoginId);
        cmd.Parameters.AddWithValue("@C", C);
        cmd.Parameters.AddWithValue("@C1", C1);
        cmd.Parameters.AddWithValue("@C2", C2);
        cmd.Parameters.AddWithValue("@C3", C3);
        cmd.Parameters.AddWithValue("@C4", C4);
        cmd.Parameters.AddWithValue("@C5", C5);

        cmd.Parameters.AddWithValue("@ServerId", ServerId);
        cmd.ExecuteNonQuery();
        liceco.Close();

        return(true);
    }
    public static Int64 Insert___Sync_Need_Logs_AtServer(string LogId, string Rcordid, string ACTION, string TAbleId, Boolean IsRecordTransfer, string sid)
    {
        Int64         ReturnID = 0;
        SqlConnection con      = MyCommonfile.licenseconn();

        if (con.State.ToString() != "Open")
        {
            con.Open();
        }
        SqlCommand cmd = new SqlCommand("Sync_Need_Logs_AtServer_AddDelUpdtSelect", con);

        cmd.CommandType = CommandType.StoredProcedure;
        cmd.Parameters.AddWithValue("@StatementType", "Insert");
        cmd.Parameters.AddWithValue("@LogId", LogId);
        cmd.Parameters.AddWithValue("@Rcordid", Rcordid);
        cmd.Parameters.AddWithValue("@ACTION", ACTION);
        cmd.Parameters.AddWithValue("@TAbleId", TAbleId);
        cmd.Parameters.AddWithValue("@IsRecordTransfer", IsRecordTransfer);
        cmd.Parameters.AddWithValue("@sid", sid);
        object maxprocID = new object();

        maxprocID = cmd.ExecuteScalar();
        ReturnID  = Convert.ToInt64(maxprocID);
        con.Close();
        return(ReturnID);
    }
Exemple #7
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());
         }
     }
 }
Exemple #8
0
    public static Boolean Update_Satellite_Server_Sync_Job_Details(string Satellite_Server_Sync_Job_DetailsID, Boolean SyncedStatus, Boolean CheckingStatus, DateTime CheckedDateTime, Boolean JobFinishFinishStatus, DateTime JobDetailDoneDatandtime)
    {
        Boolean Status = false;

        try
        {
            SqlConnection liceco = new SqlConnection();
            liceco = MyCommonfile.licenseconn();
            if (liceco.State.ToString() != "Open")
            {
                liceco.Open();
            }
            SqlCommand cmd = new SqlCommand("Satellite_Server_Sync_Job_Details_AddDelUpdtSelect", liceco);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@StatementType", "UpdateFinish");

            cmd.Parameters.AddWithValue("@ID", Satellite_Server_Sync_Job_DetailsID);
            cmd.Parameters.AddWithValue("@SyncedStatus", SyncedStatus);
            cmd.Parameters.AddWithValue("@CheckingStatus", CheckingStatus);
            cmd.Parameters.AddWithValue("@CheckedDateTime", CheckedDateTime);
            cmd.Parameters.AddWithValue("@JobFinishFinishStatus", JobFinishFinishStatus);
            cmd.Parameters.AddWithValue("@JobDetailDoneDatandtime", JobDetailDoneDatandtime);
            cmd.ExecuteNonQuery();
            liceco.Close();
            Status = true;
        }
        catch
        {
            Status = false;
        }

        return(Status);
    }
    public static Boolean Delete_CompanyABCMaster(string companyid)
    {
        Boolean Status = false;

        try
        {
            SqlConnection liceco = new SqlConnection();
            liceco = MyCommonfile.licenseconn();
            if (liceco.State.ToString() != "Open")
            {
                liceco.Open();
            }
            SqlCommand cmdDel = new SqlCommand("CompanyABCMaster_AddDelUpdtSelect", liceco);
            cmdDel.CommandType = CommandType.StoredProcedure;
            cmdDel.Parameters.AddWithValue("@StatementType", "Delete");
            cmdDel.Parameters.AddWithValue("@CompanyLoginId", companyid);
            cmdDel.ExecuteNonQuery();
            Status = true;
        }
        catch
        {
            Status = false;
        }
        return(Status);
    }
Exemple #10
0
    public static bool Update_CompanyCreationNeedCode(string id, bool DNSAddingStatus)
    {
        bool          status = true;
        SqlConnection liceco = new SqlConnection();

        try
        {
            liceco = MyCommonfile.licenseconn();
            if (liceco.State.ToString() != "Open")
            {
                liceco.Open();
            }
            SqlCommand cmd = new SqlCommand("CompanyCreationNeedCode_AddDelUpdtSelect", liceco);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@StatementType", "Update_DNSAddingStatus");
            cmd.Parameters.AddWithValue("@id", id);
            cmd.Parameters.AddWithValue("@DNSAddingStatus", DNSAddingStatus);
            cmd.ExecuteNonQuery();
            liceco.Close();
        }
        catch
        {
            status = false;
            liceco.Close();
        }
        return(status);
    }
Exemple #11
0
    public static string Insert_SilentPageRequestTbl(string SilentPageServerID, string PageName, string Datetimeofrequest, string Dateandtimefinish, Boolean Requestfinish, string Randomkeyid, string destinetionUrl)
    {
        string        maxid  = "0";
        SqlConnection liceco = new SqlConnection();

        liceco = MyCommonfile.licenseconn();
        if (liceco.State.ToString() != "Open")
        {
            liceco.Open();
        }
        SqlCommand cmd = new SqlCommand("SilentPageRequestTbl_AddDelUpdtSelect", liceco);

        cmd.CommandType = CommandType.StoredProcedure;
        cmd.Parameters.AddWithValue("@StatementType", "Insert");
        //cmd.Parameters.AddWithValue("@Id", comploginid);
        cmd.Parameters.AddWithValue("@SilentPageServerID", SilentPageServerID);
        cmd.Parameters.AddWithValue("@PageName", PageName);
        cmd.Parameters.AddWithValue("@Datetimeofrequest", Datetimeofrequest);
        cmd.Parameters.AddWithValue("@Dateandtimefinish", Dateandtimefinish);
        cmd.Parameters.AddWithValue("@Requestfinish", false);
        cmd.Parameters.AddWithValue("@Randomkeyid", Randomkeyid);
        cmd.Parameters.AddWithValue("@destinetionUrl", destinetionUrl);
        //  cmd.ExecuteNonQuery();
        object obj = cmd.ExecuteScalar();

        liceco.Close();
        return(obj.ToString());
    }
    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");
            }
        }
    }
Exemple #13
0
    public static bool Insert_CompanyCreationStep4SubStatustbl(string StatusMasterId, string CompanyLoginId, Boolean FinishStatus)
    {
        bool          status = true;
        SqlConnection liceco = new SqlConnection();

        try
        {
            liceco = MyCommonfile.licenseconn();
            if (liceco.State.ToString() != "Open")
            {
                liceco.Open();
            }
            SqlCommand cmd = new SqlCommand("CompanyCreationStep4SubStatustbl_AddDelUpdtSelect", liceco);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@StatementType", "Insert");
            cmd.Parameters.AddWithValue("@StatusMasterId", StatusMasterId);
            cmd.Parameters.AddWithValue("@CompanyLoginId", CompanyLoginId);
            cmd.Parameters.AddWithValue("@FinishStatus", FinishStatus);
            cmd.Parameters.AddWithValue("@DateTime", DateTime.Now.ToString());
            cmd.ExecuteNonQuery();
            liceco.Close();
        }
        catch
        {
            status = false;
            liceco.Close();
        }
        return(status);
    }
    //DELETE FROM Satelitte_Server_Sync_Job_Master WHERE ID =@ID
    //Job2---
    public static Int64 InsertJob2___Satellite_Server_Sync_Job_Details(string Satelitte_Server_Sync_Job_Master_ID, string TableID, Boolean SyncedStatus, Boolean CheckingStatus, DateTime CheckedDateTime, Boolean NeedTocreateTblatSatServer)
    {
        Int64         ReturnID = 0;
        SqlConnection con      = MyCommonfile.licenseconn();

        if (con.State.ToString() != "Open")
        {
            con.Open();
        }
        SqlCommand cmd = new SqlCommand("Satellite_Server_Sync_Job_Details_AddDelUpdtSelect", con);

        cmd.CommandType = CommandType.StoredProcedure;
        cmd.Parameters.AddWithValue("@StatementType", "Insert");
        cmd.Parameters.AddWithValue("@Satelitte_Server_Sync_Job_Master_ID", Satelitte_Server_Sync_Job_Master_ID);
        cmd.Parameters.AddWithValue("@TableID", TableID);
        cmd.Parameters.AddWithValue("@SyncedStatus", SyncedStatus);
        cmd.Parameters.AddWithValue("@CheckingStatus", CheckingStatus);
        cmd.Parameters.AddWithValue("@CheckedDateTime", CheckedDateTime);
        cmd.Parameters.AddWithValue("@NeedTocreateTblatSatServer", NeedTocreateTblatSatServer);
        object maxprocID = new object();

        maxprocID = cmd.ExecuteScalar();
        con.Close();
        ReturnID = Convert.ToInt64(maxprocID);
        return(ReturnID);
    }
    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);
    }
Exemple #16
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 ";
    }
Exemple #17
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;
        }
    }
Exemple #19
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);
        }
    }
    //--------------------------Sync_Need_Logs_AtServer_AddDelUpdtSelect------------------------
    public Boolean DELETE__Sync_Need_Logs_AtServer_AddDelUpdtSelect(string LogId)
    {
        Boolean       ReturnID = true;
        SqlConnection liceco   = new SqlConnection();

        liceco = MyCommonfile.licenseconn();
        try
        {
            if (liceco.State.ToString() != "Open")
            {
                liceco.Open();
            }
            SqlCommand cmd = new SqlCommand("Sync_Need_Logs_AtServer_AddDelUpdtSelect", con);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@StatementType", "DeleteLogId");
            cmd.Parameters.AddWithValue("@LogId", LogId);
            cmd.ExecuteNonQuery();
            liceco.Close();
        }
        catch
        {
            ReturnID = false;
            liceco.Close();
        }
        return(ReturnID);
    }
Exemple #21
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 ";
    }
Exemple #22
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();
        }
    }
Exemple #23
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 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";
    }
    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 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 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();
        }
    }
Exemple #28
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 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();
        }
    }
Exemple #30
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();
        }
    }