Пример #1
0
        private void mdi_Load(object sender, EventArgs e)
        {
            String str1 = GetProcessorID();
            String str2 = GetHarddiskID();

            str1 = str1.Substring(0, 7);
            str2 = str2.Substring(0, 7);
            String    auth = str1 + str2;
            String    str  = "select flag from client where authenticate_code = '" + auth + "' and flag=2";
            DataSet   ds   = new DataSet();
            DataLayer dl   = new DataLayer();

            ds = dl.GetDataSet(str);
            if (ds.Tables[0].Rows.Count > 0)
            {
            }
            else
            {
                MessageBox.Show("Your trail peroid has expired. Please register your product.");
            }
            panel1.Visible = false;
            Serial_key frm = new Serial_key();

            frm.MdiParent = this;
            frm.Show();
        }
Пример #2
0
        private void registerProductToolStripMenuItem_Click(object sender, EventArgs e)
        {
            panel1.Visible = false;
            String str1 = GetProcessorID();
            String str2 = GetHarddiskID();

            str1 = str1.Substring(0, 7);
            str2 = str2.Substring(0, 7);
            String    auth = str1 + str2;
            String    str  = "select flag from client where authenticate_code = '" + auth + "' and flag=2";
            DataSet   ds   = new DataSet();
            DataLayer dl   = new DataLayer();

            ds = dl.GetDataSet(str);
            if (ds.Tables[0].Rows.Count > 0)
            {
                MessageBox.Show("You have been already registered");
            }
            else
            {
                Serial_key frm = new Serial_key();
                frm.MdiParent = this;
                frm.Show();
            }
        }