Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            // string sidd = BZ_Common.BZ_Encrypted("5");
            if (Request.QueryString["Cid"] != null)
            {
                string companyid = Request.QueryString["Cid"];
                lblcid.Text = companyid;
                Boolean Comp__Actve__Status = CompanyWizard.Company_Active_Status(companyid);
                Boolean Comp__Licen__Active = CompanyWizard.Company_LicenseExpire_Status(companyid);
                Boolean Server__Active      = ServerWizard.Server_Active_Status(companyid);

                if (Comp__Actve__Status == true && Comp__Licen__Active == true && Server__Active == true)
                {
                    DataTable DTGetSid = CompanyWizard.SelectCompanyInfo(companyid);
                    string    sid      = DTGetSid.Rows[0]["ServerId"].ToString();
                    lblsid.Text = sid;
                    FillFrid(lblsid.Text);
                }
                else if (Comp__Actve__Status == false)
                {
                    lblmsg.Text = "Company not active ";
                }
                else if (Comp__Licen__Active == false)
                {
                    lblmsg.Text = "License Expired";
                }
                else if (Server__Active == false)
                {
                    lblmsg.Text = "Server Inactive";
                }
            }
            else
            {
                lblmsg.Text = "No any recrd for company";
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        string ss      = BZ_Common.BZ_Decrypted("d2fu/WL5XmM=");
        string ssdd    = BZ_Common.BZ_Decrypted("member");
        string ssddfdf = BZ_Common.BZ_Encrypted("member");

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

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

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

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

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

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

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

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

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

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

                            //Response.Redirect("http://" + Busiwizsatellitesiteurl + "/Satelliteservfunction.aspx?Compid=" + BZ_Common.BZ_Encrypted(companyid) + "&E1=" + BZ_Common.BZ_Encrypted(E1) + "&E2=" + BZ_Common.BZ_Encrypted(E2) + "&E3=" + BZ_Common.BZ_Encrypted(E3) + "&E4=" + BZ_Common.BZ_Encrypted(E4) + "&E5=" + BZ_Common.BZ_Encrypted(E5) + "&D1=" + BZ_Common.BZ_Encrypted(D1) + "&D2=" + BZ_Common.BZ_Encrypted(D2) + "&D3=" + BZ_Common.BZ_Encrypted(D3) + "&D4=" + BZ_Common.BZ_Encrypted(D4) + "&D5=" + BZ_Common.BZ_Encrypted(D5) + "&Z=" + BZ_Common.BZ_Encrypted(Z) + "&F1=" + BZ_Common.BZ_Encrypted(F1) + "&F2=" + BZ_Common.BZ_Encrypted(F2) + "&F3=" + BZ_Common.BZ_Encrypted(F3) + "&F4=" + BZ_Common.BZ_Encrypted(F4) + "&F5=" + BZ_Common.BZ_Encrypted(F5) + "");
                            Response.Redirect("http://" + Busiwizsatellitesiteurl + "/Satelliteservfunction.aspx?Compid=" + BZ_Common.BZ_Encrypted(companyid) + "&E1=" + E1 + "&E2=" + E2 + "&E3=" + E3 + "&E4=" + E4 + "&E5=" + E5 + "&D1=" + D1 + "&D2=" + D2 + "&D3=" + D3 + "&D4=" + D4 + "&D5=" + D5 + "&Z=" + Z + "&F1=" + F1 + "&F2=" + F2 + "&F3=" + F3 + "&F4=" + F4 + "&F5=" + F5 + "&returl=" + Request.QueryString["returl"] + "");
                        }
                        lbl_msg.Text = "Successfully ";
                    }
                    else
                    {
                        lbl_msg.Text = "Some problem when we try to adding records in database ";
                    }
                }
                else if (Comp__Actve__Status == false)
                {
                    lbl_msg.Text = "Company not active ";
                }
                else if (Comp__Licen__Active == false)
                {
                    lbl_msg.Text = "License Expired";
                }
                else if (Server__Active == false)
                {
                    lbl_msg.Text = "Server Inactive";
                }
            }
        }
    }