예제 #1
0
        public string GetUserInfo(Event_Login request)
        {
            string Result = "";

            try
            {
                using (var db = DbConnectionFactory.OpenDbConnection("TMS"))
                {
                    Result = db.QuerySingle <string>("Select Top 1 ISNULL(DriverName,'') From Jmjm4 Where PhoneNumber=" + Modfunction.SQLSafeValue(request.PhoneNumber));
                }
            }
            catch { throw; }
            return(Result);
        }
예제 #2
0
        public int LoginCheck(Event_Login request)
        {
            int Result = -1;

            try
            {
                using (var db = DbConnectionFactory.OpenDbConnection("TMS"))
                {
                    if (request.PhoneNumber != null && request.PhoneNumber.Length > 0)
                    {
                        Result = db.Scalar <int>("Select count(*) From Jmjm4 Where PhoneNumber='" + request.PhoneNumber + "'");
                    }
                    else if (request.CustomerCode != null && request.CustomerCode.Length > 0 && request.JobNo != null && request.JobNo.Length > 0)
                    {
                        Result = db.Scalar <int>("Select count(*) From Jmjm6 Left Join Jmjm1 on Jmjm6.JobNo=Jmjm1.JobNo Where Jmjm1.StatusCode<>'DEL' and Jmjm1.JobNo='" + request.JobNo + "'");
                    }
                }
            }
            catch { throw; }
            return(Result);
        }