The purpose of writing login module in software is to prevent malicious spread of software , Login can be ignored in the internal test phase .

The following is the main source code of login module :

void CLoginDlg::OnBnClickedBtnLogin()
{
// TODO: Add your control notification handler code here
CClerkDataSet lgDataSet;
CString strSQL=L"";
UpdateData(TRUE);
CMFC_Library_RibbonView* pView;
pView=((CMFC_Library_RibbonView*)((CMainFrame*)AfxGetMainWnd())->GetActiveView());
if (m_strName.IsEmpty())
{
MessageBox(L" Please enter a user name !",L" Tips ",MB_ICONWARNING);
return;
}
else if(m_strPWD.IsEmpty())
{
MessageBox(L" Please input a password !",L" Tips ",MB_ICONWARNING);
return;
}
strSQL=L"SELECT * FROM CLERK WHERE NAME='";
strSQL=strSQL+m_strName;
strSQL=strSQL+L"' AND PASSWORD='";
strSQL=strSQL+m_strPWD;
strSQL=strSQL+L"'";
if (!lgDataSet.Open(AFX_DB_USE_DEFAULT_TYPE,strSQL))
{
MessageBox(L" open CLERK Table failed !",L" Tips ",MB_ICONWARNING);
return;
}
if (m_strName=="rong"&&m_strPWD=="123456")
{
m_strUSERID=lgDataSet.m_CLERK_ID;
m_bSuccess=TRUE;
MessageBox(L" Landing successful !",L" success ");
pView->m_strUserId=m_strUSERID;
pView->m_bLogin=m_bSuccess;
pView->m_strUserName=m_strName;
CString name=L" The book management system V1.0- Currently logged in user :"+m_strName;
((CMainFrame *)AfxGetApp()-> m_pMainWnd)->SetWindowText(name);
Invalidate();
CDialog::OnOK();
DestroyWindow();
}
else
{
MessageBox(L" Login failed ! Username or password incorrect !",L" Login failed !",MB_ICONERROR);
SetDlgItemText(IDC_EDIT_USERNAME,L"");
SetDlgItemText(IDC_EDIT_PWD,L"");
GetDlgItem(IDC_EDIT_USERNAME)->SetFocus();
pView->m_strUserName=L"";
pView->m_bLogin=m_bSuccess;
pView->m_strUserId=L"";
return;
}
}

This is the login interface ( Ugly version ):

My personal blog address :http://ler.look.in

LER-Studio The product's official website :http://studio.look.in

IDE Development <LER-Studio>(2):: More articles about the login module

  1. Qt Of IDE development environment (KDevelop,MonKey Studio,QDevlop,Dev-cpp,Cobras,Edyuk)

    speak of Qt Of IDE development environment , I have been Windows Next use VC6.0 + Qt4.3.1 Development procedure . But go to Linux Next , Use Fedora The built-in KDevelop + Qt4.3.1 Development procedure . I've been doing Q ...

  2. be based on localStorge Development login module remember password and automatic login

    the front || I'm happy to share , A bird's nest for communication First write an article about the login module remember password and automatic login module . Bird's nest wechat :jkxx123321 About the origin of this module function module , It's big bird's first show , Why do you say that ? One day in a group , One ...

  3. Move IM Development of guidelines 3: How to optimize the login module

    < Move IM Development of guidelines > The series will introduce a IM APP In every way , Including technology selection . Login optimization, etc . Besides , The author of this article will combine his many years in Netease Yunxin iOS IM SDK Development experience , In depth analysis of various common questions in the actual development ...

  4. iPad Development --QQ Spatial layout , Login module

    One . Login module Login logic - (IBAction)loginClick:(UIButton *)sender { self.view.userInteractionEnabled = NO; [self ...

  5. From wechat app to Hongmeng js Development 【08】—— Form components &amp; Sign up for the login module

    Catalog : 1. Login module 2. Registration module 3. Introduction to the series of articles The year of the ox is coming , I wish you all the best bug, Page so easy- In the wechat applet , Provides form Components , Can be input.picker.slider.button ...

  6. javaweb Learning summary ( Twenty-two )—— be based on Servlet+JSP+JavaBean Development mode user login registration

    One .Servlet+JSP+JavaBean Development mode (MVC) Introduce Servlet+JSP+JavaBean Pattern (MVC) Suitable for developing complex web application , In this mode ,servlet Responsible for processing user requests ,jsp ...

  7. Web Design and implementation of multi-user privilege control in application system - Login module 【4】

    Through the introduction of the first three modules , hold web Basic classes needed for permission system development ,Css file ,EasyUI When the frame is ready , You can start coding the system . The login module is the key to the privilege processing system , According to the information of the input user , Can be automatically loaded from the database ...

  8. Virtual machine installation Fedora14 and C/C++IDE development environment

    Virtual machine installation Fedora14 and C/C++IDE development environment  2010-12-05 00:15:58 label : chinese Fedora14 IDE  development environment  C/C++ Original works , Allowed to reprint , Please be sure to use hyperlinks when reprinting ...

  9. Github Open source : Use .NET WinForm Develop what you see is what you get IDE development environment (Sheng.Winform.IDE)【2. Brief description of the source code 】

    GitHub:https://github.com/iccb1013/Sheng.Winform.IDE In the last article , A brief introduction to  Sheng.Winform.IDE The basic functions and goals to be achieved : ...

Random recommendation

  1. C# Several implementations of overloading

    Algorithm reuse is a very common requirement , stay C# You can use the following means to achieve , It's simple , Record for yourself , Convenient query . Take a small function as an example to illustrate : Print 1-5 this 5 Number , and A-E this 5 Characters . Overload mode static void Ma ...

  2. clickheat brief introduction

    Installed a wappalyzer, What kind of framework are you interested in ... And then in qunar.com Yes clickheat. I've only heard of plug-ins like this before , I didn't expect to use it . ClickHeat is a ...

  3. Hibernate The project with Maven establish ( turn )

    This article will use Maven3.Hibernate3.6.Oracle10g Integrate , As an example . Environmental inventory : 1.Maven3.0.5 2.Hibernate3.6.5 Final 3.JDK1.7.0.11 4. ...

  4. Python The first lesson

    Python Language features : grace , clear , Simple Suitable for development : Web Network and various network services System tools and scripts As glue language, it is convenient to package the modules developed by other languages Python2.7.10 Installation (path environment variable )   ...

  5. swift + xcode Newbie on the road

    Useful reference posts : Video tutorial : How to create the first iPhone App - HelloWorldHelloWorld be familiar with xcode: http://www.cocoachina.com/swift/201 ...

  6. 【 translate 】The Accidental DBA:Troubleshooting Performance

    Recently, I've reread The Accidental DBA, take Troubleshooting Performance I'll sort out some of them , For future reference . This article is Part 2Part 1:The Accidental DB ...

  7. 20.Module The grammar of

    Module The grammar of Module The grammar of summary In the history of ,JavaScript There has been no module (module) system , Cannot split a large program into interdependent small files , Put them together in a simple way . It's available in other languages , ...

  8. BZOJ 2463: [ Zhongshan City 2009] Who can win ?( Intelligence quotient (IQ) )

    Time Limit: 10 Sec  Memory Limit: 128 MBSubmit: 3110  Solved: 2250[Submit][Status][Discuss] Descript ...

  9. JSTLView Fast internationalization (SpringMVC)

    JSTLView: Fast internationalization : Just import jstl Of jar package , Previously created by default InternalResouceView Will be used jstlView replace :     New steps to internationalization :           1). Write well ...

  10. python3 The process of cooperation

    1. The concept of synergy coroutines , Also called tasklet , fibers . English name Coroutine. Threads are system level they are scheduled by the operating system , And the process is the program level by the program according to the needs of their own scheduling . There are many functions in a thread , We call these functions subroutines , ...