Beispiel #1
0
        //**************************************************************************
        //NAME:      IsEmailNull
        //PURPOSE:  CHECK VALID VALID MAIL OR NOT USE KEY
        //**************************************************************************
        public static bool IsEmailNull(string key)
        {
            string Query = "SELECT  * FROM Dapro_Activation where Activation_Key=@Key and (ISNULL(Org_Email, '') <> '') ";

            AzureSQLHelper.SetParamiterWithValue("Key", key);
            object o = AzureSQLHelper.GetInstance().ExcuteScalar(Query);

            if (o != null)
            {
                return(true);
            }
            return(false);
        }
Beispiel #2
0
        //**********************************************************************************
        //NAME:OutOlnActivationDate
        //DESCRIPTION: GET ONLINE SERVER DATETIME USE KEY(START DATE AND EXPIRE DATE)
        //**********************************************************************************
        public static void OutOlnActivationDate(string key, out string dateFrom, out string dateTo)
        {
            dateFrom = ""; dateTo = "";
            string Query = "SELECT  * FROM Dapro_ActivationInfo where ID=(SELECT MAX(ID) FROM Dapro_ActivationInfo WHERE Activation_Key=@Key)";

            AzureSQLHelper.SetParamiterWithValue("Key", key);
            DataTable dt = AzureSQLHelper.GetInstance().ExcuteNonQuery(Query);

            if (dt.IsValidDataTable())
            {
                dateFrom = dt.Rows[0]["Start_Date"].ToString();
                dateTo   = dt.Rows[0]["Expiry_date"].ToString();
            }
        }
Beispiel #3
0
        //**************************************************************************
        //NAME:      IsValidKey
        //PURPOSE:  CHECK VALID KEY ,THE CONDITION IS IF ACTIVATE=TRUE THE HARDWARE INFO NOT EMTY
        //IF ACTIVATE=FALSE THEN HARDWARE INFO EMPTY
        //**************************************************************************
        public static bool IsValidKey(string key)
        {
            mMotherboard_ID = HardwareInfo.GetBaseBoardSlNo();
            mMAC_Id         = HardwareInfo.GetMACAddress();
            mHDD_No         = HardwareInfo.GetHDDSerialNo();

            string Query = "SELECT  * FROM Dapro_Activation where Activation_Key=@Key  and ((Activated='true' and Motherboard_ID='" + mMotherboard_ID + "' " +
                           "and MAC_Id='" + mMAC_Id + "' and HDD_No='" + mHDD_No + "') or (Activated='false' and (ISNULL(Motherboard_ID, '') = '') and (ISNULL(HDD_No, '') = '') and (ISNULL(MAC_Id, '') = '')))";

            AzureSQLHelper.SetParamiterWithValue("Key", key);
            object o = AzureSQLHelper.GetInstance().ExcuteScalar(Query);

            if (o != null)
            {
                return(true);
            }
            return(false);
        }
Beispiel #4
0
        //**************************************************************************
        //NAME: IsOnlineActivation
        //DESCRIPTION: IT WILL BE DISCUSS HOW TO CONFIGURE ONLINE SERVER DATABSE????
        //**************************************************************************
        public static bool IsOnlineActivation(string activationKey,
                                              string Org_Name, string Org_ContactNo, string Org_Email
                                              , string Remarks)
        {
            #region Variable
            mActivationKey = activationKey;
            mOrg_Name      = Org_Name;
            mOrg_ContactNo = Org_ContactNo;
            mOrg_Email     = Org_Email;
            mRemarks       = Remarks;
            //Arup v1.a.m
            mMotherboard_ID = HardwareInfo.GetBaseBoardSlNo();
            mMAC_Id         = HardwareInfo.GetMACAddress();
            mHDD_No         = HardwareInfo.GetHDDSerialNo();

            mActivated = true;
            //***************TYPE MEANS tRAL OR FULL VERSION********************
            mActivation_Type = true;
            #endregion

            string Query = "SELECT  Activation_Key FROM Dapro_Activation where Activation_Key=@Key and Activated='false' and  " +
                           "(ISNULL(Motherboard_ID, '') = '') and (ISNULL(HDD_No, '') = '') and (ISNULL(MAC_Id, '') = '')";
            AzureSQLHelper.SetParamiterWithValue("Key", activationKey.Trim());
            object o = AzureSQLHelper.GetInstance().ExcuteScalar(Query);
            if (o != null)
            {
                InstallStatus = FirstTimeSaveActivationInfo();
            }
            else
            {
                Query = "SELECT  Activation_Key FROM Dapro_Activation where Activation_Key=@Key and Activated='true' and Motherboard_ID='" + mMotherboard_ID + "' " +
                        "and MAC_Id='" + mMAC_Id + "' and HDD_No='" + mHDD_No + "' and (Expiry_date < CAST(Getdate() AS DATE))";
                AzureSQLHelper.SetParamiterWithValue("Key", activationKey.Trim());
                object obj = AzureSQLHelper.GetInstance().ExcuteScalar(Query);
                if (obj != null)
                {
                    InstallStatus = RenewalSaveActivationInfo();
                }
            }
            return(InstallStatus);
        }