| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Data.SqlClient; |
| | | using System.Linq; |
| | | using System.Net; |
| | | using System.Net.Http; |
| | |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | //LogService.Write("测试1:"+ DBUtility.ClsPub.sExeReturnInfo); |
| | | string FCusName = oSystemParameter.GetSingleSystemParameter("WMS_CampanyName", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //LogService.Write("测试2:" + DBUtility.ClsPub.sExeReturnInfo); |
| | | //LogService.Write(FCusName); |
| | | LogService.Write(FCusName); |
| | | LogService.Write("DBUtility.ClsPub.StrToPsd(PassWord.Trim()):" + DBUtility.ClsPub.StrToPsd(PassWord.Trim())); |
| | | if (FCusName == "夏宝电器") |
| | | ds = oUser.CheckMainID(UserName.Trim(), DBUtility.ClsPub.StrToPsd(PassWord.Trim())); |
| | | ds = CheckMainID(UserName.Trim(), DBUtility.ClsPub.StrToPsd(PassWord.Trim())); |
| | | else |
| | | ds = oUser.CheckCzymc(UserName.Trim(), DBUtility.ClsPub.StrToPsd(PassWord.Trim())); |
| | | ds = CheckCzymc(UserName.Trim(), DBUtility.ClsPub.StrToPsd(PassWord.Trim())); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | return objJsonResult; ; |
| | | } |
| | | } |
| | | public DataSet CheckMainID(string MainID, string sPsd) |
| | | { |
| | | DataSet DS; |
| | | try |
| | | { |
| | | SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM(); |
| | | DS = oCn.RunProcReturn("select * from Gy_Czygl where Czybm='" + MainID + "' and Czmm='" + sPsd + "' ", "Gy_Czygl"); |
| | | if (DS.Tables[0].Rows.Count == 0) |
| | | return null; |
| | | else |
| | | { |
| | | return DS; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw (e); |
| | | } |
| | | } |
| | | public DataSet CheckCzymc(string sUser, string sPsd) |
| | | { |
| | | SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM(); |
| | | SqlParameter[] prams ={oCn.MakeInParam("@Czymc",SqlDbType.VarChar,100,sUser ), |
| | | oCn.MakeInParam("@Czmm",SqlDbType.VarChar ,100,sPsd ), |
| | | }; |
| | | return oCn.RunProcReturn("select * from Gy_Czygl where Czymc='" + sUser + "' and Czmm='" + sPsd + "' ", prams, "Gy_Czygl"); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 修改密码 |
| | | /// </summary> |