public void CreateCr()
    {
        MessageContent.InnerHtml = "";

        if (String.IsNullOrEmpty(txtShipNM.Text.Trim()) || String.IsNullOrEmpty(txtDestination.Text.Trim()) || String.IsNullOrEmpty(txtDays.Text.Trim()) || String.IsNullOrEmpty(txtPort.Text.Trim()))
        {
            MessageContent.InnerHtml = "航线基础信息保存 *号位必填字段,请修改!";
            return;
        }

        _cruiseinfoEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _commonEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _cruiseinfoEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _cruiseinfoEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _cruiseinfoEntity.LogMessages.IpAddress = UserSession.Current.UserIP;

        _cruiseinfoEntity.CruiseInfoDBEntity = new List<CruiseInfoDBEntity>();
        CruiseInfoDBEntity cruiseInfoDBEntity = new CruiseInfoDBEntity();

        cruiseInfoDBEntity.CruiseID = hidCruiseID.Value.ToString();
        cruiseInfoDBEntity.ShipNM = txtShipNM.Text.Trim();
        cruiseInfoDBEntity.Destination = txtDestination.Text.Trim();
        cruiseInfoDBEntity.Days = txtDays.Text.Trim();
        cruiseInfoDBEntity.Port = txtPort.Text.Trim();

        _cruiseinfoEntity.CruiseInfoDBEntity.Add(cruiseInfoDBEntity);
        _cruiseinfoEntity = CruiseInfoBP.SaveCruiseInfo(_cruiseinfoEntity);
        int iResult = _cruiseinfoEntity.Result;
        string HotelID = _cruiseinfoEntity.ErrorMSG;
        _commonEntity.LogMessages = _cruiseinfoEntity.LogMessages;
        _commonEntity.CommonDBEntity = new List<CommonDBEntity>();
        CommonDBEntity commonDBEntity = new CommonDBEntity();

        commonDBEntity.Event_Type = "航线基础信息-保存";
        commonDBEntity.Event_ID = HotelID;
        string conTent = GetLocalResourceObject("EventSaveMessage").ToString();

        conTent = string.Format(conTent, HotelID, cruiseInfoDBEntity.ShipNM, cruiseInfoDBEntity.Destination, cruiseInfoDBEntity.Days, cruiseInfoDBEntity.Port);
        commonDBEntity.Event_Content = conTent;

        if (iResult == 1)
        {
            commonDBEntity.Event_Result = string.Format(GetLocalResourceObject("SaveSuccess").ToString(), HotelID);
            MessageContent.InnerHtml = string.Format(GetLocalResourceObject("SaveSuccess").ToString(), HotelID);
        }
        else
        {
            commonDBEntity.Event_Result = GetLocalResourceObject("SaveError").ToString();
            MessageContent.InnerHtml = GetLocalResourceObject("SaveError").ToString();
        }
        _commonEntity.CommonDBEntity.Add(commonDBEntity);
        CommonBP.InsertEventHistory(_commonEntity);
    }
    public static string CrCruisePlan(string Action, string BoatID, string CreateStart, string PlanNumer)
    {
        CruiseInfoEntity _cruiseinfoEntity = new CruiseInfoEntity();
        CommonEntity _commonEntity = new CommonEntity();
        _cruiseinfoEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _commonEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _cruiseinfoEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _cruiseinfoEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _cruiseinfoEntity.LogMessages.IpAddress = UserSession.Current.UserIP;

        _cruiseinfoEntity.CruiseInfoDBEntity = new List<CruiseInfoDBEntity>();
        CruiseInfoDBEntity cruiseInfoDBEntity = new CruiseInfoDBEntity();

        cruiseInfoDBEntity.Action = Action;
        cruiseInfoDBEntity.BoatID = BoatID;
        cruiseInfoDBEntity.CreateStart = CreateStart;
        cruiseInfoDBEntity.PlanNumer = PlanNumer;

        _cruiseinfoEntity.CruiseInfoDBEntity.Add(cruiseInfoDBEntity);
        _cruiseinfoEntity = CruiseInfoBP.SaveCruisePlanList(_cruiseinfoEntity);
        int iResult = _cruiseinfoEntity.Result;
        //_commonEntity.LogMessages = _cruiseinfoEntity.LogMessages;
        //_commonEntity.CommonDBEntity = new List<CommonDBEntity>();
        //CommonDBEntity commonDBEntity = new CommonDBEntity();

        //commonDBEntity.Event_Type = "游轮库存-保存";
        //commonDBEntity.Event_ID = cruiseInfoDBEntity.PlanID;
        //string conTent = "库存保存 - 原库存:{0}  修改后库存:{1}";

        //conTent = string.Format(conTent, PlanNumer);
        //commonDBEntity.Event_Content = conTent;

        if (iResult == 1)
        {
            //commonDBEntity.Event_Result = "库存保存成功!"; ;
            //MessageContent.InnerHtml = string.Format(GetLocalResourceObject("SaveSuccess").ToString(), HotelID);
        }
        else
        {
            //commonDBEntity.Event_Result = GetLocalResourceObject("SaveError").ToString();
            //MessageContent.InnerHtml = GetLocalResourceObject("SaveError").ToString();
        }
        //_commonEntity.CommonDBEntity.Add(commonDBEntity);
        //CommonBP.InsertEventHistory(_commonEntity);
        return "库存保存成功!";
    }
    public static string SaveCruisePlan(string PlanID, string PlanDTime, string RouteID, string PlanNumer, string OPlanNumer)
    {
        CruiseInfoEntity _cruiseinfoEntity = new CruiseInfoEntity();
        CommonEntity _commonEntity = new CommonEntity();
        _cruiseinfoEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _commonEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _cruiseinfoEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _cruiseinfoEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _cruiseinfoEntity.LogMessages.IpAddress = UserSession.Current.UserIP;

        _cruiseinfoEntity.CruiseInfoDBEntity = new List<CruiseInfoDBEntity>();
        CruiseInfoDBEntity cruiseInfoDBEntity = new CruiseInfoDBEntity();

        cruiseInfoDBEntity.PlanID = PlanID;
        cruiseInfoDBEntity.PlanDTime = PlanDTime;
        cruiseInfoDBEntity.CruiseID = RouteID;
        cruiseInfoDBEntity.PlanNumer = PlanNumer;
        cruiseInfoDBEntity.OPlanNumer = OPlanNumer;

        _cruiseinfoEntity.CruiseInfoDBEntity.Add(cruiseInfoDBEntity);
        _cruiseinfoEntity = CruiseInfoBP.SaveCruisePlanInfo(_cruiseinfoEntity);
        int iResult = _cruiseinfoEntity.Result;
        _commonEntity.LogMessages = _cruiseinfoEntity.LogMessages;
        _commonEntity.CommonDBEntity = new List<CommonDBEntity>();
        CommonDBEntity commonDBEntity = new CommonDBEntity();

        commonDBEntity.Event_Type = "游轮库存-保存";
        commonDBEntity.Event_ID = RouteID + "-" + cruiseInfoDBEntity.PlanID;
        string conTent = "库存保存 - 原库存:{0}  修改后库存:{1}";

        conTent = string.Format(conTent, OPlanNumer, PlanNumer);
        commonDBEntity.Event_Content = conTent;

        if (iResult == 1)
        {
            commonDBEntity.Event_Result = "库存保存成功!"; ;
            //MessageContent.InnerHtml = string.Format(GetLocalResourceObject("SaveSuccess").ToString(), HotelID);
        }
        else
        {
            //commonDBEntity.Event_Result = GetLocalResourceObject("SaveError").ToString();
            //MessageContent.InnerHtml = GetLocalResourceObject("SaveError").ToString();
        }
        _commonEntity.CommonDBEntity.Add(commonDBEntity);
        CommonBP.InsertEventHistory(_commonEntity);
        return "库存保存成功!";
    }