private static Boolean clsinit() { Boolean mret = true; String mconnstr = @"Data Source=PL\clsSQL,7000;Initial Catalog=clsms;User ID=1111;password=2222;"; clsmain.clsconn = new SqlConnection(mconnstr); try { clsmain.clsconn.Open(); SqlCommand msqlcmd = new SqlCommand("select licdate from customer", clsmain.clsconn); SqlDataReader msqldat = msqlcmd.ExecuteReader(); msqldat.Read(); if (DateTime.Now.Date > Convert.ToDateTime(msqldat["licdate"]).Date) { MessageBox.Show("Authentication Restricted."); mret = false; } else { clsmain.clsconn.Close(); if (!pychk()) { MessageBox.Show("Authentication Failed"); mret = false; } } } catch { clsmain.oclsmsgmgr.showmsg("Error connecting Server...!|.", mret = false; } finally { clsmain.clsconn.Close(); } loadcls mfrm = new loadcls(); mfrm.ShowDialog(); return mret; }
mfrm.ShowDialog();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)