Exemplo n.º 1
0
        public static UserEntity getSignByPhoneForCC(UserEntity userEntity)
        {
            string DataString = string.Empty;
            UserDBEntity dbParm = (userEntity.UserDBEntity.Count > 0) ? userEntity.UserDBEntity[0] : new UserDBEntity();

            DataString = "{\"mobile\":\"" + dbParm.LoginMobile + "\"," + "\"isUpdate\":\"" + "1" + "\"}";

            string SaveCashBackRequestUrl = JsonRequestURLBuilder.getSignByPhoneForCCV2();// +PostSignKey(DataString);
            CallWebPage callWebPage = new CallWebPage();
            string strSaveCashBack = callWebPage.CallWebByURL(SaveCashBackRequestUrl, DataString);
            JObject oSaveCashBack = JObject.Parse(strSaveCashBack);

            if ("success".Equals(JsonRequestURLBuilder.GetJsonStringValue(oSaveCashBack, "message").Trim('"')))
            {
                userEntity.Result = 1;
                userEntity.UserDBEntity[0].SignKey = JsonRequestURLBuilder.GetJsonStringValue(oSaveCashBack, "result").Trim('"');
                //string oIDs = oSaveCashBack.SelectToken("result").ToString();
                //JObject oID = JObject.Parse(oIDs);
                //userEntity.UserDBEntity[0].SignKey = oID.SelectToken("sn").ToString().Trim('"');
            }
            else
            {
                string ErrorMSG = JsonRequestURLBuilder.GetJsonStringValue(oSaveCashBack, "message").Trim('"');
                userEntity.ErrorMSG = ErrorMSG;
                userEntity.Result = 2;
            }
            return userEntity;
        }
Exemplo n.º 2
0
        public static int DeleteConsultRoomUser(UserEntity userEntity)
        {
            userEntity.LogMessages.MsgType = MessageType.INFO;
            userEntity.LogMessages.Content = _nameSpaceClass + "DeleteConsultRoomUser";
            LoggerHelper.LogWriter(userEntity.LogMessages);

            try
            {
                return UserGroupDA.DeleteConsultRoomUser(userEntity);
            }
            catch (Exception ex)
            {
                userEntity.LogMessages.MsgType = MessageType.ERROR;
                userEntity.LogMessages.Content = _nameSpaceClass + "DeleteConsultRoomUser  Error: " + ex.Message;
                LoggerHelper.LogWriter(userEntity.LogMessages);
                throw ex;
            }
        }
Exemplo n.º 3
0
        public static UserEntity GetPlatFormList(UserEntity userEntity)
        {
            userEntity.LogMessages.MsgType = MessageType.INFO;
            userEntity.LogMessages.Content = _nameSpaceClass + "CommonSelect";
            LoggerHelper.LogWriter(userEntity.LogMessages);

            try
            {
                return UserSearchDA.GetPlatFormList(userEntity);
            }
            catch (Exception ex)
            {
                userEntity.LogMessages.MsgType = MessageType.ERROR;
                userEntity.LogMessages.Content = _nameSpaceClass + "CommonSelect  Error: " + ex.Message;
                LoggerHelper.LogWriter(userEntity.LogMessages);
                throw ex;
            }
        }
Exemplo n.º 4
0
        public static UserEntity ReviewSelectCount(UserEntity userEntity)
        {
            UserDBEntity dbParm = (userEntity.UserDBEntity.Count > 0) ? userEntity.UserDBEntity[0] : new UserDBEntity();
            string SqlString = "t_lm_user_review_count";
            if (String.IsNullOrEmpty(dbParm.TicketType))
            {
                OracleParameter[] parm ={
                                    new OracleParameter("UserID",OracleType.VarChar),
                                    new OracleParameter("RegistStart",OracleType.VarChar),
                                    new OracleParameter("RegistEnd",OracleType.VarChar),
                                    new OracleParameter("RegChannelID",OracleType.VarChar),
                                    new OracleParameter("PlatformID",OracleType.VarChar),
                                    new OracleParameter("OrderFrom",OracleType.VarChar),
                                    new OracleParameter("OrderTo",OracleType.VarChar),
                                    new OracleParameter("OrderSucFrom",OracleType.VarChar),
                                    new OracleParameter("OrderSucTo",OracleType.VarChar),
                                    new OracleParameter("LoginStart",OracleType.VarChar),
                                    new OracleParameter("LoginEnd",OracleType.VarChar),
                                    new OracleParameter("LoginSizeStart",OracleType.VarChar),
                                    new OracleParameter("LoginSizeEnd",OracleType.VarChar)
                                };

                if (String.IsNullOrEmpty(dbParm.UserID))
                {
                    parm[0].Value = DBNull.Value;
                }
                else
                {
                    parm[0].Value = dbParm.UserID;
                    SqlString = "t_lm_user_review_user_count";
                }

                if (String.IsNullOrEmpty(dbParm.RegistStart))
                {
                    parm[1].Value = DBNull.Value;
                }
                else
                {
                    parm[1].Value = dbParm.RegistStart;
                }

                if (String.IsNullOrEmpty(dbParm.RegistEnd))
                {
                    parm[2].Value = DBNull.Value;
                }
                else
                {
                    parm[2].Value = dbParm.RegistEnd;
                }

                if (String.IsNullOrEmpty(dbParm.RegChannelID))
                {
                    parm[3].Value = DBNull.Value;
                }
                else
                {
                    parm[3].Value = dbParm.RegChannelID;
                }

                if (String.IsNullOrEmpty(dbParm.PlatformID))
                {
                    parm[4].Value = DBNull.Value;
                }
                else
                {
                    parm[4].Value = dbParm.PlatformID;
                }

                if (String.IsNullOrEmpty(dbParm.OrderFrom))
                {
                    parm[5].Value = DBNull.Value;
                }
                else
                {
                    parm[5].Value = dbParm.OrderFrom;
                }

                if (String.IsNullOrEmpty(dbParm.OrderTo))
                {
                    parm[6].Value = DBNull.Value;
                }
                else
                {
                    parm[6].Value = dbParm.OrderTo;
                }

                if (String.IsNullOrEmpty(dbParm.OrderSucFrom))
                {
                    parm[7].Value = DBNull.Value;
                }
                else
                {
                    parm[7].Value = dbParm.OrderSucFrom;
                }

                if (String.IsNullOrEmpty(dbParm.OrderSucTo))
                {
                    parm[8].Value = DBNull.Value;
                }
                else
                {
                    parm[8].Value = dbParm.OrderSucTo;
                }

                if (String.IsNullOrEmpty(dbParm.LoginStart))
                {
                    parm[9].Value = DBNull.Value;
                }
                else
                {
                    parm[9].Value = dbParm.LoginStart;
                }

                if (String.IsNullOrEmpty(dbParm.LoginEnd))
                {
                    parm[10].Value = DBNull.Value;
                }
                else
                {
                    parm[10].Value = dbParm.LoginEnd;
                }

                if (String.IsNullOrEmpty(dbParm.LoginSizeStart))
                {
                    parm[11].Value = DBNull.Value;
                }
                else
                {
                    parm[11].Value = dbParm.LoginSizeStart;
                }

                if (String.IsNullOrEmpty(dbParm.LoginSizeEnd))
                {
                    parm[12].Value = DBNull.Value;
                }
                else
                {
                    parm[12].Value = dbParm.LoginSizeEnd;
                }

                if (String.IsNullOrEmpty(dbParm.OrderFrom) && String.IsNullOrEmpty(dbParm.OrderTo) && String.IsNullOrEmpty(dbParm.OrderSucFrom) && String.IsNullOrEmpty(dbParm.OrderSucTo))
                {
                    SqlString = ("t_lm_user_review_count".Equals(SqlString)) ? "t_lm_user_review_no_order_count" : "t_lm_user_review_user_no_order_count";
                }
                userEntity.QueryResult = DbManager.Query("User", SqlString , true, parm);
            }
            else
            {
                OracleParameter[] parm ={
                                     new OracleParameter("PACKAGENAME",OracleType.VarChar),
                                    new OracleParameter("AMOUNTFROM",OracleType.Int32),
                                    new OracleParameter("AMOUNTTO",OracleType.Int32),
                                    new OracleParameter("STARTDATE",OracleType.VarChar),
                                    new OracleParameter("ENDDATE",OracleType.VarChar),
                                    new OracleParameter("PACKAGETYPE",OracleType.VarChar),
                                    new OracleParameter("TICKETDT",OracleType.VarChar)
                                };
                if (String.IsNullOrEmpty(dbParm.PackageName))
                {
                    parm[0].Value = DBNull.Value;
                }
                else
                {
                    parm[0].Value = dbParm.PackageName;
                }

                if (String.IsNullOrEmpty(dbParm.AmountFrom))
                {
                    parm[1].Value = DBNull.Value;
                }
                else
                {
                    parm[1].Value = dbParm.AmountFrom;
                }

                if (String.IsNullOrEmpty(dbParm.AmountTo))
                {
                    parm[2].Value = DBNull.Value;
                }
                else
                {
                    parm[2].Value = dbParm.AmountTo;
                }

                if (String.IsNullOrEmpty(dbParm.PickfromDate))
                {
                    parm[3].Value = DBNull.Value;
                }
                else
                {
                    parm[3].Value = dbParm.PickfromDate;
                }

                if (String.IsNullOrEmpty(dbParm.PicktoDate))
                {
                    parm[4].Value = DBNull.Value;
                }
                else
                {
                    parm[4].Value = dbParm.PicktoDate;
                }

                if (String.IsNullOrEmpty(dbParm.TicketType))
                {
                    parm[5].Value = DBNull.Value;
                }
                else
                {
                    parm[5].Value = dbParm.TicketType;
                }

                if (String.IsNullOrEmpty(dbParm.TicketTime))
                {
                    parm[6].Value = DBNull.Value;
                }
                else
                {
                    parm[6].Value = dbParm.TicketTime;
                }

                //if (String.IsNullOrEmpty(dbParm.TicketType))
                //{
                //    parm[0].Value = DBNull.Value;
                //}
                //else
                //{
                //    parm[0].Value = dbParm.TicketType;
                //}

                string strSql = "";
                if ("1".Equals(dbParm.TicketData))
                {
                    strSql = "t_lm_user_review_ticketype_ord_count";
                }
                else
                {
                    strSql = "t_lm_user_review_ticketype_all_count";
                }
                userEntity.QueryResult = DbManager.Query("User", strSql, true, parm);
            }
            return userEntity;
        }
Exemplo n.º 5
0
        public static UserEntity ReviewConsultRoomUserSelect(UserEntity paymentEntity)
        {
            OracleParameter[] parm ={
                                    new OracleParameter("USERID",OracleType.VarChar)
                                };
            UserDBEntity dbParm = (paymentEntity.UserDBEntity.Count > 0) ? paymentEntity.UserDBEntity[0] : new UserDBEntity();

            if (String.IsNullOrEmpty(dbParm.UserID))
            {
                parm[0].Value = DBNull.Value;
            }
            else
            {
                parm[0].Value = dbParm.UserID;
            }

            DataSet dsResult = DbManager.Query("User", "t_lm_consult_room_user_main_select", true, parm);

            if (dsResult.Tables.Count > 0 && dsResult.Tables[0].Rows.Count > 0 && dsResult.Tables[0].Select("CONSULTTYPE='销售'").Length > 0)
            {
                for (int i = 0; i < dsResult.Tables[0].Rows.Count; i++)
                {
                    if ("销售".Equals(dsResult.Tables[0].Rows[i]["CONSULTTYPE"].ToString().Trim()))
                    {
                        dsResult.Tables[0].Rows[i]["CONSULTVAL"] = GetSalesName(dsResult.Tables[0].Rows[i]["CONSULTVAL"].ToString().Trim());
                    }
                }
            }

            paymentEntity.QueryResult = dsResult;
            return paymentEntity;
        }
Exemplo n.º 6
0
        public static UserEntity ReviewConsultRoomUserDetail(UserEntity paymentEntity)
        {
            OracleParameter[] parm ={
                                    new OracleParameter("KEYID",OracleType.VarChar)
                                };
            UserDBEntity dbParm = (paymentEntity.UserDBEntity.Count > 0) ? paymentEntity.UserDBEntity[0] : new UserDBEntity();

            if (String.IsNullOrEmpty(dbParm.UserNo))
            {
                parm[0].Value = DBNull.Value;
            }
            else
            {
                parm[0].Value = dbParm.UserNo;
            }

            paymentEntity.QueryResult = DbManager.Query("User", "t_lm_consult_room_user_detail_select", true, parm);
            return paymentEntity;
        }
Exemplo n.º 7
0
        public static UserEntity ReviewConsultPOrderUserSelect(UserEntity paymentEntity)
        {
            OracleParameter[] parm ={
                                    new OracleParameter("USERID",OracleType.VarChar)
                                };
            UserDBEntity dbParm = (paymentEntity.UserDBEntity.Count > 0) ? paymentEntity.UserDBEntity[0] : new UserDBEntity();

            if (String.IsNullOrEmpty(dbParm.UserID))
            {
                parm[0].Value = DBNull.Value;
            }
            else
            {
                parm[0].Value = dbParm.UserID;
            }

            paymentEntity.QueryResult = DbManager.Query("User", "t_lm_consult_porder_user_main_select", true, parm);
            return paymentEntity;
        }
Exemplo n.º 8
0
        public static UserEntity GetUserIDFromMobile(UserEntity userEntity)
        {
            userEntity.LogMessages.MsgType = MessageType.INFO;
            userEntity.LogMessages.Content = _nameSpaceClass + "GetUserIDFromMobile";
            LoggerHelper.LogWriter(userEntity.LogMessages);

            try
            {
                return UserSearchDA.GetUserIDFromMobile(userEntity);
            }
            catch (Exception ex)
            {
                userEntity.LogMessages.MsgType = MessageType.ERROR;
                userEntity.LogMessages.Content = _nameSpaceClass + "GetUserIDFromMobile  Error: " + ex.Message;
                LoggerHelper.LogWriter(userEntity.LogMessages);
                throw ex;
            }
        }
Exemplo n.º 9
0
        public static int InsertConsultRoomUser(UserEntity userEntity)
        {
            if (userEntity.UserDBEntity.Count == 0)
            {
                return 0;
            }

            if (userEntity.LogMessages == null)
            {
                return 0;
            }

            if (CheckConsultInsert(userEntity) > 0)
            {
                return 2;
            }

            UserDBEntity dbParm = (userEntity.UserDBEntity.Count > 0) ? userEntity.UserDBEntity[0] : new UserDBEntity();
            OracleParameter[] parm ={
                                    new OracleParameter("USERID",OracleType.VarChar),
                                    new OracleParameter("RTYPE",OracleType.VarChar),
                                    new OracleParameter("CITYID",OracleType.VarChar),
                                    new OracleParameter("TAGID",OracleType.VarChar),
                                    new OracleParameter("HOTELID",OracleType.VarChar),
                                    new OracleParameter("CREATEUSER",OracleType.VarChar),
                                    new OracleParameter("TCID",OracleType.Int32),
                                    new OracleParameter("SALESID",OracleType.VarChar)
                                };

            if (String.IsNullOrEmpty(dbParm.UserID))
            {
                parm[0].Value = DBNull.Value;
            }
            else
            {
                parm[0].Value = dbParm.UserID;
            }

            if (String.IsNullOrEmpty(dbParm.RType))
            {
                parm[1].Value = DBNull.Value;
            }
            else
            {
                parm[1].Value = dbParm.RType;
            }

            if (String.IsNullOrEmpty(dbParm.CityID))
            {
                parm[2].Value = DBNull.Value;
            }
            else
            {
                parm[2].Value = dbParm.CityID;
            }

            if (String.IsNullOrEmpty(dbParm.TagID))
            {
                parm[3].Value = DBNull.Value;
            }
            else
            {
                parm[3].Value = dbParm.TagID;
            }

            if (String.IsNullOrEmpty(dbParm.HotelID))
            {
                parm[4].Value = DBNull.Value;
            }
            else
            {
                parm[4].Value = dbParm.HotelID;
            }

            parm[5].Value = userEntity.LogMessages.Username;

            parm[6].Value = getMaxIDfromSeq("T_LM_CONSULT_ROOM_SEQ");

            if (String.IsNullOrEmpty(dbParm.SalesID))
            {
                parm[7].Value = DBNull.Value;
            }
            else
            {
                parm[7].Value = dbParm.SalesID;
            }

            HotelVp.Common.DBUtility.DbManager.ExecuteSql("User", "t_lm_consult_room_user_insert", parm);//t_lm_consult_room_seq.nextval

            if (dbParm.ALDelHT.Length > 0)
            {
                List<CommandInfo> sqlList = new List<CommandInfo>();
                string[] alHotel = dbParm.ALDelHT.Split(',');
                foreach (string strHotel in alHotel)
                {
                    if (String.IsNullOrEmpty(strHotel.Trim()))
                    {
                        continue;
                    }
                    CommandInfo InsertHotelExInfo = new CommandInfo();
                    OracleParameter[] lmHotelExParm ={
                                    new OracleParameter("ID",OracleType.Int32),
                                    new OracleParameter("TLCRID",OracleType.VarChar),
                                    new OracleParameter("HOTELID",OracleType.VarChar),
                                    new OracleParameter("CREATEUSER",OracleType.VarChar)
                                };
                    lmHotelExParm[0].Value = getMaxIDfromSeq("T_LM_CONSULT_ROOM_HOTEL_EX_SEQ");
                    lmHotelExParm[1].Value = parm[6].Value;
                    lmHotelExParm[2].Value = strHotel;
                    lmHotelExParm[3].Value = userEntity.LogMessages.Username;

                    InsertHotelExInfo.SqlName = "User";
                    InsertHotelExInfo.SqlId = "t_lm_consult_room_hotel_insert";
                    InsertHotelExInfo.Parameters = lmHotelExParm;
                    sqlList.Add(InsertHotelExInfo);
                }
                DbManager.ExecuteSqlTran(sqlList);
            }
            return 1;
        }
Exemplo n.º 10
0
 public static UserEntity GetRegChannelList(UserEntity userEntity)
 {
     userEntity.QueryResult = HotelVp.Common.DBUtility.DbManager.Query("User", "t_lm_regchnnel_list", true);
     return userEntity;
 }
Exemplo n.º 11
0
 public static UserEntity GetPlatFormList(UserEntity userEntity)
 {
     userEntity.QueryResult = HotelVp.Common.DBUtility.DbManager.Query("User", "t_lm_platForm_list", true);
     return userEntity;
 }
Exemplo n.º 12
0
 public static UserEntity CreateUserSelect(UserEntity userEntity)
 {
     userEntity.QueryResult = HotelVp.Common.DBUtility.DbManager.Query("User", "t_lm_usergroup_select", true);
     return userEntity;
 }
Exemplo n.º 13
0
 public static UserEntity CommonSelect(UserEntity userEntity)
 {
     userEntity.QueryResult = HotelVp.Common.DBUtility.DbManager.Query("City", "t_fc_city", true);
     return userEntity;
 }
Exemplo n.º 14
0
        public static UserEntity UserCashPopListSelect(UserEntity paymentEntity)
        {
            OracleParameter[] parm ={
                                    new OracleParameter("USERID",OracleType.VarChar),
                                    new OracleParameter("PKEY",OracleType.VarChar)
                                };
            UserDBEntity dbParm = (paymentEntity.UserDBEntity.Count > 0) ? paymentEntity.UserDBEntity[0] : new UserDBEntity();
            if (String.IsNullOrEmpty(dbParm.UserID))
            {
                parm[0].Value = DBNull.Value;
            }
            else
            {
                parm[0].Value = dbParm.UserID;
            }

            if (String.IsNullOrEmpty(dbParm.Pkey))
            {
                parm[1].Value = DBNull.Value;
            }
            else
            {
                parm[1].Value = dbParm.Pkey;
            }
            string strSql = "";
            if ("0".Equals(dbParm.SelectType))
            {
                strSql = "t_lm_user_cash_detail_appl_select";
            }
            else
            {
                strSql = "t_lm_user_cash_detail_back_select";
            }
            DataSet dsResult = new DataSet();
            dsResult.Tables.Add(DbManager.Query("User", strSql,true, parm).Tables[0].Copy());
            dsResult.Tables[0].TableName = "MASTER";

            OracleParameter[] detailParm ={
                                    new OracleParameter("USERID",OracleType.VarChar),
                                    new OracleParameter("PKEY",OracleType.VarChar)
                                };
            if (String.IsNullOrEmpty(dbParm.UserID))
            {
                detailParm[0].Value = DBNull.Value;
            }
            else
            {
                detailParm[0].Value = dbParm.UserID;
            }

            if (String.IsNullOrEmpty(dbParm.Pkey))
            {
                detailParm[1].Value = DBNull.Value;
            }
            else
            {
                detailParm[1].Value = dbParm.Pkey;
            }
            string strDetailSql = "";
            if ("0".Equals(dbParm.SelectType))
            {
                strDetailSql = "t_lm_user_cash_appl_detail_select";
            }
            else
            {
                strDetailSql = "t_lm_user_cash_back_detail_select";
            }
            dsResult.Tables.Add(DbManager.Query("User", strDetailSql,true, detailParm).Tables[0].Copy());
            dsResult.Tables[1].TableName = "DETAIL";

            paymentEntity.QueryResult = dsResult;
            return paymentEntity;
        }
Exemplo n.º 15
0
        public static UserEntity ReviewSelectCount(UserEntity userEntity)
        {
            userEntity.LogMessages.MsgType = MessageType.INFO;
            userEntity.LogMessages.Content = _nameSpaceClass + "ReviewSelectCount";
            LoggerHelper.LogWriter(userEntity.LogMessages);

            try
            {
                return UserSearchDA.ReviewSelectCount(userEntity);
            }
            catch (Exception ex)
            {
                userEntity.LogMessages.MsgType = MessageType.ERROR;
                userEntity.LogMessages.Content = _nameSpaceClass + "ReviewSelectCount  Error: " + ex.Message;
                LoggerHelper.LogWriter(userEntity.LogMessages);
                throw ex;
            }
        }
Exemplo n.º 16
0
        public static int DeleteConsultRoomUser(UserEntity userEntity)
        {
            if (userEntity.UserDBEntity.Count == 0)
            {
                return 0;
            }

            if (userEntity.LogMessages == null)
            {
                return 0;
            }

            //if (CheckConsultDel(userEntity) > 0)
            //{
            //    return 2;
            //}

            UserDBEntity dbParm = (userEntity.UserDBEntity.Count > 0) ? userEntity.UserDBEntity[0] : new UserDBEntity();
            OracleParameter[] parm ={
                                    new OracleParameter("CONID",OracleType.VarChar)
                                };

            if (String.IsNullOrEmpty(dbParm.UserNo))
            {
                parm[0].Value = DBNull.Value;
            }
            else
            {
                parm[0].Value = dbParm.UserNo;
            }

            HotelVp.Common.DBUtility.DbManager.ExecuteSql("User", "t_lm_consult_room_user_del", parm);
            return 1;
        }
Exemplo n.º 17
0
        public static int CheckConsultInsert(UserEntity userEntity)
        {
            UserDBEntity dbParm = (userEntity.UserDBEntity.Count > 0) ? userEntity.UserDBEntity[0] : new UserDBEntity();
            OracleParameter[] parm ={
                                    new OracleParameter("USERID",OracleType.VarChar),
                                    new OracleParameter("RTYPE",OracleType.VarChar),
                                    new OracleParameter("CITYID",OracleType.VarChar),
                                    new OracleParameter("TAGID",OracleType.VarChar),
                                    new OracleParameter("HOTELID",OracleType.VarChar),
                                    new OracleParameter("SALESID",OracleType.VarChar)
                                };

            if (String.IsNullOrEmpty(dbParm.UserID))
            {
                parm[0].Value = DBNull.Value;
            }
            else
            {
                parm[0].Value = dbParm.UserID;
            }

            if (String.IsNullOrEmpty(dbParm.RType))
            {
                parm[1].Value = DBNull.Value;
            }
            else
            {
                parm[1].Value = dbParm.RType;
            }

            if (String.IsNullOrEmpty(dbParm.CityID))
            {
                parm[2].Value = DBNull.Value;
            }
            else
            {
                parm[2].Value = dbParm.CityID;
            }

            if (String.IsNullOrEmpty(dbParm.TagID))
            {
                parm[3].Value = DBNull.Value;
            }
            else
            {
                parm[3].Value = dbParm.TagID;
            }

            if (String.IsNullOrEmpty(dbParm.HotelID))
            {
                parm[4].Value = DBNull.Value;
            }
            else
            {
                parm[4].Value = dbParm.HotelID;
            }

            if (String.IsNullOrEmpty(dbParm.SalesID))
            {
                parm[5].Value = DBNull.Value;
            }
            else
            {
                parm[5].Value = dbParm.SalesID;
            }

            string strSql = "t_lm_consult_room_insert_city_check";

            if ("1".Equals(dbParm.RType))
            {
                strSql = "t_lm_consult_room_insert_tag_check";
            }
            else if ("2".Equals(dbParm.RType))
            {
                strSql = "t_lm_consult_room_insert_hotel_check";
            }
            else if ("3".Equals(dbParm.RType))
            {
                strSql = "t_lm_consult_room_insert_sales_check";
            }

            userEntity.QueryResult = HotelVp.Common.DBUtility.DbManager.Query("User", strSql, false, parm);

            if (userEntity.QueryResult.Tables.Count > 0 && userEntity.QueryResult.Tables[0].Rows.Count > 0)
            {
                return 1;
            }
            return 0;
        }
Exemplo n.º 18
0
        public static UserEntity GetUserIDFromMobile(UserEntity userEntity)
        {
            OracleParameter[] parm ={
                                    new OracleParameter("MOBILE",OracleType.VarChar)
                                };
            UserDBEntity dbParm = (userEntity.UserDBEntity.Count > 0) ? userEntity.UserDBEntity[0] : new UserDBEntity();

            if (String.IsNullOrEmpty(dbParm.LoginMobile))
            {
                parm[0].Value = DBNull.Value;
            }
            else
            {
                parm[0].Value = dbParm.LoginMobile;
            }

            userEntity.QueryResult = DbManager.Query("User", "t_lm_user_select_userid", true, parm);
            return userEntity;
        }
Exemplo n.º 19
0
        public static UserEntity PreConsultRoomUserSelect(UserEntity paymentEntity)
        {
            OracleParameter[] parm ={
                                    new OracleParameter("CITYID",OracleType.VarChar),
                                    new OracleParameter("TAGID",OracleType.VarChar),
                                    new OracleParameter("HOTELID",OracleType.VarChar),
                                    new OracleParameter("SALESID",OracleType.VarChar)
                                };
            UserDBEntity dbParm = (paymentEntity.UserDBEntity.Count > 0) ? paymentEntity.UserDBEntity[0] : new UserDBEntity();

            string strSql = "";

            if ("0".Equals(dbParm.RType))
            {
                parm[0].Value = dbParm.CityID;
                parm[1].Value = DBNull.Value;
                parm[2].Value = DBNull.Value;
                parm[3].Value = DBNull.Value;
                strSql = "t_lm_consult_room_user_pre_city";
            }
            else if ("1".Equals(dbParm.RType))
            {
                parm[0].Value = DBNull.Value;
                parm[1].Value = dbParm.TagID;
                parm[2].Value = DBNull.Value;
                parm[3].Value = DBNull.Value;
                strSql = "t_lm_consult_room_user_pre_tag";
            }
            else if ("2".Equals(dbParm.RType))
            {
                parm[0].Value = DBNull.Value;
                parm[1].Value = DBNull.Value;
                parm[2].Value = dbParm.HotelID;
                parm[3].Value = DBNull.Value;
                strSql = "t_lm_consult_room_user_pre_hotel";
            }
            else if ("3".Equals(dbParm.RType))
            {
                parm[0].Value = DBNull.Value;
                parm[1].Value = DBNull.Value;
                parm[2].Value = DBNull.Value;
                parm[3].Value = dbParm.SalesID;
                strSql = "t_lm_consult_room_user_pre_sales";
            }

            paymentEntity.QueryResult = DbManager.Query("User", strSql, true, parm);
            return paymentEntity;
        }
Exemplo n.º 20
0
        public static UserEntity getSignByPhoneForCC(UserEntity userEntity)
        {
            userEntity.LogMessages.MsgType = MessageType.INFO;
            userEntity.LogMessages.Content = _nameSpaceClass + "getSignByPhoneForCC";
            LoggerHelper.LogWriter(userEntity.LogMessages);

            try
            {
                return UserSearchSA.getSignByPhoneForCC(userEntity);
            }
            catch (Exception ex)
            {
                userEntity.LogMessages.MsgType = MessageType.ERROR;
                userEntity.LogMessages.Content = _nameSpaceClass + "getSignByPhoneForCC  Error: " + ex.Message;
                LoggerHelper.LogWriter(userEntity.LogMessages);
                throw ex;
            }
        }