我有用户名和密码文本框,我想检查用户何时输入任何登录名,登录名是字符串还是数字。如果登录名是字符串,则此函数调用其他函数调用。
**Login Function**
public DataTable mlogin(string username, string password)
{
string constring = ConfigurationManager.ConnectionStrings["Real"].ConnectionString;
using (SqlConnection con = new SqlConnection(constring))
{
password = Cryptographer.Encrypt(password);
con.Open();
using (SqlCommand cmd = new SqlCommand("select MD.MembershipID, MembershipName, address, ISNULL(FD.FileID,'') as FileID,ISNULL(Sec.SectorName, '') as SectorName, ISNULL(I.PlotNo, '') as PlotNo, MD.ClientPic from MemberMaster MM " +
" inner join MembersDetail MD on MD.MemberShipID = MM.MemberShipID and MD.Srno = 1 " +
" inner join MasterFileDetail FD on FD.MembershipID = MM.MemberShipID and FD.IsOwner = 1 and FD.IsTransfered = 1 " +
" inner join MasterFile FM on FM.FileID = FD.FileID and FM.Cancel = 0 " +
" inner join Sectors Sec on Sec.Phase_ID = FM.PhaseId and Sec.Sector_ID = FM.Sector_ID " +
" inner join PlotsInventory I on I.Phase_ID = FM.PhaseId and I.Plot_ID = FM.Plot_ID " +
" where MM.MemberShipID = '" + username + "' and MM.IsApproved = 1 and RTRIM(MM.LoginPwd) = '" + password + "' and MM.IsActive = 1 " +
" order by FD.FileID", con)
}
}
}
慕哥6287543
米脂
相关分类