Пример #1
0
        public List <Rcbp1> Get_rcbp1_List(Rcbp request)
        {
            List <Rcbp1> Result = null;

            try
            {
                using (var db = DbConnectionFactory.OpenDbConnection("TMS"))
                {
                    if (!string.IsNullOrEmpty(request.BookingNo))
                    {
                        string strSQL = "select isnull(Rcbp1.Handphone1, '') as Handphone1,isnull(Rcbp1.Telephone, '') as Telephone from Rcbp1 left join csbk1 on  Rcbp1.BusinessPartyCode=csbk1.BookingCustomerCode  where csbk1.BookingNo='" + request.BookingNo + "'";
                        Result = db.Select <Rcbp1>(strSQL);
                    }
                }
            }
            catch { throw; }
            return(Result);
        }
Пример #2
0
        public List <Rcbp1> Get_rcbp1_List(Rcbp request)
        {
            List <Rcbp1> Result = null;

            try
            {
                using (var db = DbConnectionFactory.OpenDbConnection("TMS"))
                {
                    if (!string.IsNullOrEmpty(request.BusinessPartyName))
                    {
                        if (!string.IsNullOrEmpty(request.BusinessPartyName))
                        {
                            //string strSQL = "select DISTINCT CustomerCode as BusinessPartyCode ,CustomerName as  BusinessPartyName  from tjms1 where IsNUll(StatusCode,'')<>'DEL' And CustomerCode LIKE '" + request.BusinessPartyName + "%' Order By tjms1.CustomerCode Asc";

                            string strSQL = "Select Top 10 *,(Select Top 1 CountryName From Rccy1 Where CountryCode=Rcbp1.CountryCode) AS CountryName From Rcbp1 Where IsNUll(StatusCode,'')<>'DEL' And BusinessPartyName LIKE '" + request.BusinessPartyName + "%' Order By BusinessPartyCode Asc";
                            Result = db.Select <Rcbp1>(strSQL);
                        }
                    }
                }
            }
            catch { throw; }
            return(Result);
        }