public override int GetHashCode()
        {
            int hash = 1;

            if (ResourceName.Length != 0)
            {
                hash ^= ResourceName.GetHashCode();
            }
            if (CommissionId.Length != 0)
            {
                hash ^= CommissionId.GetHashCode();
            }
            if (OrderId.Length != 0)
            {
                hash ^= OrderId.GetHashCode();
            }
            if (Campaign.Length != 0)
            {
                hash ^= Campaign.GetHashCode();
            }
            if (HotelCenterId != 0L)
            {
                hash ^= HotelCenterId.GetHashCode();
            }
            if (HotelId.Length != 0)
            {
                hash ^= HotelId.GetHashCode();
            }
            if (CheckInDate.Length != 0)
            {
                hash ^= CheckInDate.GetHashCode();
            }
            if (CheckOutDate.Length != 0)
            {
                hash ^= CheckOutDate.GetHashCode();
            }
            if (ReconciledValueMicros != 0L)
            {
                hash ^= ReconciledValueMicros.GetHashCode();
            }
            if (Billed != false)
            {
                hash ^= Billed.GetHashCode();
            }
            if (Status != global::Google.Ads.GoogleAds.V10.Enums.HotelReconciliationStatusEnum.Types.HotelReconciliationStatus.Unspecified)
            {
                hash ^= Status.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
示例#2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = bookingId.GetHashCode();
         hashCode = (hashCode * 397) ^ EmployeeId.GetHashCode();
         hashCode = (hashCode * 397) ^ HotelId.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)RoomType;
         hashCode = (hashCode * 397) ^ CheckIn.GetHashCode();
         hashCode = (hashCode * 397) ^ CheckOut.GetHashCode();
         return(hashCode);
     }
 }
 public override int GetHashCode() =>
 HotelId.GetHashCode() ^ HotelName.GetHashCode();
示例#4
0
 protected bool Equals(Booking other)
 {
     return(bookingId.Equals(other.bookingId) && EmployeeId.Equals(other.EmployeeId) && HotelId.Equals(other.HotelId) && RoomType == other.RoomType && CheckIn.Equals(other.CheckIn) && CheckOut.Equals(other.CheckOut));
 }
示例#5
0
 public override int GetHashCode() => HotelId?.GetHashCode() ?? 0;
 public Hotel()
 {
     Id = new HotelId();
 }
示例#7
0
 public override int GetHashCode()
 {
     return((HotelId != null) ? HotelId.GetHashCode() : 0);
 }
示例#8
0
    public object SaveHotel(JSReader jsr, JSReader file, JSReader tagIds, JSReader tagValues, string imgs)
    {
        using (DBConnection dbc = new DBConnection())
        {
            dbc.BeginTransaction();
            try
            {
                int    HotelId;
                string ID                  = jsr["ID"].ToString();
                string HotelName           = jsr["HotelName"].ToString();
                string HotelNo             = jsr["HotelNo"].ToString();
                string Mobile              = jsr["Mobile"].ToString();
                string Tel                 = jsr["Tel"].ToString();
                string DetailAddress       = jsr["DetailAddress"].ToString();
                string Province            = jsr["Province"].ToString();
                string City                = jsr["City"].ToString();
                string County              = jsr["County"].ToString();
                string CompleteAddress     = Province + City + County + DetailAddress;
                string Lat                 = jsr["Lat"].ToString();
                string Lng                 = jsr["Lng"].ToString();
                string ServiceInfo         = jsr["ServiceInfo"].ToString();
                int    HourRoomTimeLong    = 0;
                int    HourRoomTimeLong2   = 0;
                int    HourRoomTimeLong3   = 0;
                int    CheckinHour         = 0;
                int    CheckinMinute       = 0;
                int    CheckoutHour        = 0;
                int    CheckoutMinute      = 0;
                float  MonthRentPrice      = 0;
                float  DepositPriceByMonth = 0;
                int    JSCycle             = 0;
                string AlipayAccount       = jsr["AlipayAccount"].ToString();
                string LiableAccount       = jsr["LiableAccount"].ToString();
                string CleanerAccount      = jsr["CleanerAccount"].ToString();
                string DecRemark           = jsr["DecRemark"].ToString();
                string ConsumeRule         = jsr["ConsumeRule"].ToString();
                int    IsHasWeekendPrice   = jsr["IsHasWeekendPrice"].ToInteger();
                int    WeekendConatin5     = jsr["WeekendConatin5"].ToInteger();
                int    WeekendConatin6     = jsr["WeekendConatin6"].ToInteger();
                int    WeekendConatin7     = jsr["WeekendConatin7"].ToInteger();
                int    IsOpenDayRent       = jsr["IsOpenDayRent"].ToInteger();
                int    IsOpenHourRent      = jsr["IsOpenHourRent"].ToInteger();
                int    IsOpenMonthRent     = jsr["IsOpenMonthRent"].ToInteger();
                int    ManagementMode      = jsr["ManagementMode"].ToInteger();
                int    IsAutoAccept        = jsr["IsAutoAccept"].ToInteger();
                int    HandlerKind         = jsr["HandlerKind"].ToInteger();
                int    JsPlatSel           = jsr["JsPlatSel"].ToInteger();
                if (jsr["HourRoomTimeLong"].ToString() != "")
                {
                    HourRoomTimeLong = jsr["HourRoomTimeLong"].ToInteger();
                }
                if (jsr["HourRoomTimeLong2"].ToString() != "")
                {
                    HourRoomTimeLong2 = jsr["HourRoomTimeLong2"].ToInteger();
                }
                if (jsr["HourRoomTimeLong3"].ToString() != "")
                {
                    HourRoomTimeLong3 = jsr["HourRoomTimeLong3"].ToInteger();
                }
                if (jsr["CheckinHour"].ToString() != "")
                {
                    CheckinHour = jsr["CheckinHour"].ToInteger();
                }
                if (jsr["CheckinMinute"].ToString() != "")
                {
                    CheckinMinute = jsr["CheckinMinute"].ToInteger();
                }
                if (jsr["CheckoutHour"].ToString() != "")
                {
                    CheckoutHour = jsr["CheckoutHour"].ToInteger();
                }
                if (jsr["CheckoutMinute"].ToString() != "")
                {
                    CheckoutMinute = jsr["CheckoutMinute"].ToInteger();
                }
                if (jsr["MonthRentPrice"].ToString() != "")
                {
                    MonthRentPrice = jsr["MonthRentPrice"].ToSingle();
                }
                if (jsr["DepositPriceByMonth"].ToString() != "")
                {
                    DepositPriceByMonth = jsr["DepositPriceByMonth"].ToSingle();
                }
                if (jsr["JSCycle"].ToString() != "")
                {
                    JSCycle = jsr["JSCycle"].ToInteger();
                }
                float DepositPrice = 0;
                if (jsr["DepositPrice"].ToString() != "")
                {
                    DepositPrice = jsr["DepositPrice"].ToSingle();
                }

                var dtHotel          = dbc.GetEmptyDataTable("Lock_HotelApply");
                var drHotel          = dtHotel.NewRow();
                DataTableTracker dtt = new DataTableTracker(dtHotel);
                drHotel["HotelName"]           = HotelName;
                drHotel["HotelNo"]             = HotelNo;
                drHotel["Mobile"]              = Mobile;
                drHotel["Tel"]                 = Tel;
                drHotel["DetailAddress"]       = DetailAddress;
                drHotel["Province"]            = Province;
                drHotel["City"]                = City;
                drHotel["County"]              = County;
                drHotel["CompleteAddress"]     = CompleteAddress;
                drHotel["Lat"]                 = Lat;
                drHotel["Lng"]                 = Lng;
                drHotel["ServiceInfo"]         = ServiceInfo;
                drHotel["HourRoomTimeLong"]    = HourRoomTimeLong;
                drHotel["HourRoomTimeLong2"]   = HourRoomTimeLong2;
                drHotel["HourRoomTimeLong3"]   = HourRoomTimeLong3;
                drHotel["CheckinHour"]         = CheckinHour;
                drHotel["CheckinMinute"]       = CheckinMinute;
                drHotel["CheckoutHour"]        = CheckoutHour;
                drHotel["CheckoutMinute"]      = CheckoutMinute;
                drHotel["MonthRentPrice"]      = MonthRentPrice;
                drHotel["JSCycle"]             = JSCycle;
                drHotel["AlipayAccount"]       = AlipayAccount;
                drHotel["LiableAccount"]       = LiableAccount;
                drHotel["CleanerAccount"]      = CleanerAccount;
                drHotel["DecRemark"]           = DecRemark;
                drHotel["ConsumeRule"]         = ConsumeRule;
                drHotel["IsHasWeekendPrice"]   = IsHasWeekendPrice;
                drHotel["WeekendConatin5"]     = WeekendConatin5;
                drHotel["WeekendConatin6"]     = WeekendConatin6;
                drHotel["WeekendConatin7"]     = WeekendConatin7;
                drHotel["IsOpenDayRent"]       = IsOpenDayRent;
                drHotel["IsOpenHourRent"]      = IsOpenHourRent;
                drHotel["IsOpenMonthRent"]     = IsOpenMonthRent;
                drHotel["JsPlatSel"]           = JsPlatSel;
                drHotel["DepositPrice"]        = DepositPrice;
                drHotel["ManagementMode"]      = ManagementMode;
                drHotel["IsAutoAccept"]        = IsAutoAccept;
                drHotel["HandlerKind"]         = HandlerKind;
                drHotel["DepositPriceByMonth"] = DepositPriceByMonth;

                drHotel["UserId"]   = SystemUser.CurrentUser.UserID;
                drHotel["UserName"] = SystemUser.CurrentUser.UserName;
                drHotel["SHZT"]     = 1;

                //for (int i = 1; i < 6; i++)
                //{
                //    if (file.ToArray().Length >= i)
                //        drHotel["Image" + i] = file.ToArray()[i - 1].ToString();
                //    else
                //        drHotel["Image" + i] = "";
                //}
                if (!string.IsNullOrEmpty(imgs))
                {
                    string[] imglist = imgs.Split(new char[] { ',' });
                    for (int i = 1; i < 6; i++)
                    {
                        if (imglist.Count() >= i)
                        {
                            string newfilename = GetNewFilePath(imglist[i - 1], "~/files/Hotel/");
                            drHotel["Image" + i] = newfilename.Substring(2, newfilename.Length - 2);
                        }
                        else
                        {
                            drHotel["Image" + i] = "";
                        }
                    }
                }
                else
                {
                    for (int i = 1; i < 6; i++)
                    {
                        drHotel["Image" + i] = "";
                    }
                }
                if (ID == "")
                {
                    HotelId = Convert.ToInt16(dbc.ExecuteScalar("SELECT IDENT_CURRENT('Lock_HotelApply') + IDENT_INCR('Lock_HotelApply')").ToString());

                    drHotel["CreateDate"] = DateTime.Now;
                    dtHotel.Rows.Add(drHotel);
                    dbc.InsertTable(drHotel);
                }
                else
                {
                    HotelId                        = Convert.ToInt16(ID);
                    drHotel["ID"]                  = Convert.ToInt16(ID);
                    drHotel["UpdateDate"]          = DateTime.Now;
                    dtHotel.Columns["ID"].ReadOnly = false;
                    dtHotel.Rows.Add(drHotel);
                    dbc.UpdateTable(dtHotel, dtt);
                }

                dbc.ExecuteNonQuery("delete from Lock_ApplyTag where PID=" + HotelId + " and ZDLX=1");
                DataTable dtTag = dbc.GetEmptyDataTable("Lock_ApplyTag");
                for (int i = 0; i < tagIds.ToArray().Length; i++)
                {
                    DataRow drTag = dtTag.NewRow();
                    drTag["ZDBID"] = Convert.ToInt16(tagIds.ToArray()[i].ToString());
                    drTag["ZDLX"]  = 1;
                    drTag["VALUE"] = tagValues.ToArray()[i];
                    drTag["PID"]   = HotelId;
                    dtTag.Rows.Add(drTag);
                }
                dbc.InsertTable(dtTag);

                using (SmartFramework4v2.Data.MySql.DBConnection db = new SmartFramework4v2.Data.MySql.DBConnection(ConfigurationManager.ConnectionStrings["DzfConnStr"].ConnectionString))
                {
                    db.BeginTransaction();
                    try
                    {
                        int flowId = Flow.SetFlow(db, HotelId.ToString(), "门店申请");
                        Flow.SetStep(db, flowId, 1, "经济人审核", 28, "");
                        db.CommitTransaction();
                    }
                    catch (Exception ex)
                    {
                        db.RoolbackTransaction();
                        throw ex;
                    }
                }

                dbc.CommitTransaction();
                return(true);
            }
            catch (Exception ex)
            {
                dbc.RoolbackTransaction();
                throw ex;
            }
        }
    }
示例#9
0
 public Booking Book(EmployeeId employeeId, HotelId hotelId, RoomType roomType, DateTime checkIn, DateTime checkOut)
 {
     return(null);
 }
 public Hotel FindHotelBy(HotelId hotelId)
 {
     return(null);
 }
 public void SetRoomType(HotelId hotelId, RoomType roomType, int quantity)
 {
 }