コード例 #1
0
    public void btnAddCity()
    {
        bool flag = false;
        messageContent.InnerHtml = "";
        for (int i = 0; i < gridView1.Rows.Count; i++)
        {
            CheckBox cb = (CheckBox)gridView1.Rows[i].Cells[0].FindControl("CheckBox1");
            if (cb.Checked)
            {
                flag = true;
                _cityEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
                _commonEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
                _cityEntity.LogMessages.Userid = UserSession.Current.UserAccount;
                _cityEntity.LogMessages.Username = UserSession.Current.UserDspName;
                _cityEntity.LogMessages.IpAddress = UserSession.Current.UserIP;
                _cityEntity.CityDBEntity = new List<CityDBEntity>();
                CityDBEntity cityDBEntity = new CityDBEntity();
                //cityDBEntity.CityID = ddpCityList.SelectedValue;
                cityDBEntity.CityID = gridView1.Rows[i].Cells[1].Text;
                _cityEntity.CityDBEntity.Add(cityDBEntity);
                int iResult = CityBP.Insert(_cityEntity);

                _commonEntity.LogMessages = _cityEntity.LogMessages;
                _commonEntity.CommonDBEntity = new List<CommonDBEntity>();
                CommonDBEntity commonDBEntity = new CommonDBEntity();

                commonDBEntity.Event_Type = "城市管理-添加";
                commonDBEntity.Event_ID = ddpCityList.SelectedValue;

                string conTent = GetLocalResourceObject("EventInsertMessage").ToString();
                conTent = string.Format(conTent, ddpCityList.SelectedValue, ddpCityList.SelectedItem);
                commonDBEntity.Event_Content = conTent;

                if (iResult == 1)
                {
                    commonDBEntity.Event_Result = GetLocalResourceObject("InsertSuccess").ToString();
                    messageContent.InnerHtml = GetLocalResourceObject("InsertSuccess").ToString();
                }
                else if (iResult == 2)
                {
                    commonDBEntity.Event_Result = GetLocalResourceObject("Error1").ToString();
                    messageContent.InnerHtml = GetLocalResourceObject("Error1").ToString();
                }
                else if (iResult == 3)
                {
                    commonDBEntity.Event_Result = GetLocalResourceObject("Error3").ToString();
                    messageContent.InnerHtml = GetLocalResourceObject("Error3").ToString();
                }
                else
                {
                    commonDBEntity.Event_Result = GetLocalResourceObject("Error2").ToString();
                    messageContent.InnerHtml = GetLocalResourceObject("Error2").ToString();
                }

                _commonEntity.CommonDBEntity.Add(commonDBEntity);
                CommonBP.InsertEventHistory(_commonEntity);
            }
        }
        if (!flag) {
            messageContent.InnerHtml = "请选择需要添加到LM的城市名!";
        }
    }
コード例 #2
0
    //发放渠道
    private void BindCityListGrid()
    {
        _cityEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _cityEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _cityEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _cityEntity.LogMessages.IpAddress = UserSession.Current.UserIP;

        _cityEntity.CityDBEntity = new List<CityDBEntity>();
        CityDBEntity cityDBEntity = new CityDBEntity();

        cityDBEntity.Name_CN = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["Name_CN"].ToString())) ? null : ViewState["Name_CN"].ToString();
        cityDBEntity.OnlineStatus = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["OnlineStatus"].ToString())) ? null : ViewState["OnlineStatus"].ToString();
        cityDBEntity.StartDTime = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["StartDTime"].ToString())) ? null : ViewState["StartDTime"].ToString();
        cityDBEntity.EndDTime = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["EndDTime"].ToString())) ? null : ViewState["EndDTime"].ToString();

        //cityDBEntity.Name_CN = txtSelChannelName.Value;

        ////if (chkAll.Checked)
        ////{
        ////    cityDBEntity.OnlineStatus = null;
        ////}
        ////else if (chkOnL.Checked && chkOff.Checked)
        ////{
        ////    cityDBEntity.OnlineStatus = null;
        ////}
        ////else if (chkOff.Checked)
        ////{
        ////    cityDBEntity.OnlineStatus = "0";
        ////}
        ////else if (chkOnL.Checked)
        ////{
        ////    cityDBEntity.OnlineStatus = "1";
        ////}
        ////else
        ////{
        ////    cityDBEntity.OnlineStatus = null;
        ////}

        //if (rdbAll.Checked)
        //{
        //    cityDBEntity.OnlineStatus = null;
        //}
        //else if (rdbOnL.Checked)
        //{
        //    cityDBEntity.OnlineStatus = "1";
        //}
        //else if (rdbOff.Checked)
        //{
        //    cityDBEntity.OnlineStatus = "0";
        //}
        //else
        //{
        //    cityDBEntity.OnlineStatus = null;
        //}

        //if (chkUnTime.Checked)
        //{
        //    cityDBEntity.StartDTime = null;
        //    cityDBEntity.EndDTime = null;
        //}
        //else
        //{
        //    cityDBEntity.StartDTime = dpStart.Value;
        //    cityDBEntity.EndDTime = dpEnd.Value;
        //}

        _cityEntity.CityDBEntity.Add(cityDBEntity);

        DataSet dsResult = CityBP.Select(_cityEntity).QueryResult;

        gridViewCSCityList.DataSource = dsResult.Tables[0].DefaultView;
        gridViewCSCityList.DataKeyNames = new string[] { "ID" };//主键
        gridViewCSCityList.DataBind();

        if (!String.IsNullOrEmpty(refushFlag.Value))
        {
            messageContent.InnerHtml = GetLocalResourceObject("UpdateSuccess").ToString();
            refushFlag.Value = "";
        }

        //DropDownList ddl;
        //for (int i = 0; i <= gridViewCSCityList.Rows.Count - 1; i++)
        //{
        //    DataRowView drvtemp = dsResult.Tables[0].DefaultView[i];
        //    ddl = (DropDownList)gridViewCSCityList.Rows[i].FindControl("ddlOnline");
        //    ddl.SelectedValue = drvtemp["ONLINESTATUS"].ToString();
        //}
        string strRtn = string.Empty;
        //城市类型  一共20位,第一位代表LM 第二位代表hubs1 第三位代表艺龙 第四位代表携程
        for (int i = 0; i <= gridViewCSCityList.Rows.Count - 1; i++)
        {
            string cityTypeText = "";
            Label lblCityTypes = (Label)gridViewCSCityList.Rows[i].FindControl("lblCityTypes");
            if (lblCityTypes.Text.Substring(0, 1) == "1") { cityTypeText += "LM" + ","; }
            if (lblCityTypes.Text.Substring(1, 1) == "1") { cityTypeText += "hubs1" + ","; }
            if (lblCityTypes.Text.Substring(2, 1) == "1") { cityTypeText += "艺龙" + ","; }
            if (lblCityTypes.Text.Substring(3, 1) == "1") { cityTypeText += "携程" + ","; }
            if (cityTypeText != "" && cityTypeText.Length > 0)
            {
                lblCityTypes.Text = cityTypeText.TrimEnd(',');
            }
            else
            {
                lblCityTypes.Text = "";
            }

            Label lblMackData = (Label)gridViewCSCityList.Rows[i].FindControl("lblMackData");
            switch (lblMackData.Text)
            {
                case "111100000011111111111111":
                    strRtn = "10点";
                    break;
                case "111100000000111111111111":
                    strRtn = "12点";
                    break;
                case "111100000000001111111111":
                    strRtn = "14点";
                    break;
                case "111100000000000011111111":
                    strRtn = "16点";
                    break;
                case "111100000000000000111111":
                    strRtn = "18点";
                    break;
                default:
                    strRtn = "未知状态";
                    break;
            }
            lblMackData.Text = strRtn;
        }
    }
コード例 #3
0
    //public void btnUpdateCity(string cityNo, string cityID, string nameCN, string onlineStatus)
    //{
    //    messageContent.InnerHtml = "";
    //    _cityEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
    //    _commonEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
    //    _cityEntity.LogMessages.Userid = UserSession.Current.UserAccount;
    //    _cityEntity.LogMessages.Username = UserSession.Current.UserDspName;
    //    _cityEntity.CityDBEntity = new List<CityDBEntity>();
    //    CityDBEntity cityDBEntity = new CityDBEntity();
    //    cityDBEntity.CityNo = cityNo;
    //    cityDBEntity.CityID = cityID;
    //    cityDBEntity.Name_CN = nameCN;
    //    cityDBEntity.OnlineStatus = onlineStatus;
    //    _cityEntity.CityDBEntity.Add(cityDBEntity);
    //    int iResult = CityBP.Update(_cityEntity);
    //    _commonEntity.LogMessages = _cityEntity.LogMessages;
    //    _commonEntity.CommonDBEntity = new List<CommonDBEntity>();
    //    CommonDBEntity commonDBEntity = new CommonDBEntity();
    //    commonDBEntity.Event_Type = "";
    //    commonDBEntity.Event_ID = "";
    //    string conTent = GetLocalResourceObject("EventUpdateMessage").ToString();
    //    conTent = string.Format(conTent, cityDBEntity.CityID, cityDBEntity.Name_CN, cityDBEntity.OnlineStatus);
    //    commonDBEntity.Event_Content = conTent;
    //    if (iResult == 1)
    //    {
    //        commonDBEntity.Event_Result = GetLocalResourceObject("UpdateSuccess").ToString();
    //        messageContent.InnerHtml = GetLocalResourceObject("UpdateSuccess").ToString();
    //    }
    //    else
    //    {
    //        commonDBEntity.Event_Result = GetLocalResourceObject("UpdateError").ToString();
    //        messageContent.InnerHtml = GetLocalResourceObject("UpdateError").ToString();
    //    }
    //    _commonEntity.CommonDBEntity.Add(commonDBEntity);
    //    CommonBP.InsertEventHistory(_commonEntity);
    //}
    //protected void btnSave_Click(object sender, EventArgs e)
    //{
    //    //((DropDownList)gridViewCSCityList.Rows[2].Cells[0].FindControl("ddlOnline")).SelectedValue
    //    messageContent.InnerHtml = "";
    //    _cityEntity.CityDBEntity = new List<CityDBEntity>();
    //    CityDBEntity cityDBEntity = new CityDBEntity();
    //    _cityEntity.CityDBEntity.Add(cityDBEntity);
    //    //int iResult = ChannelBP.Insert(channelEntity);
    //    //if (iResult == 1)
    //    //{
    //    //    messageContent.InnerHtml = "渠道保存成功!";
    //    //    return;
    //    //}
    //    //messageContent.InnerHtml = "渠道添加失败!";
    //}
    protected void Button1_Click(object sender, EventArgs e)
    {
        string cityName = this.txtCityName.Text;
        _cityEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _cityEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _cityEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _cityEntity.LogMessages.IpAddress = UserSession.Current.UserIP;
        _cityEntity.CityDBEntity = new List<CityDBEntity>();
        CityDBEntity cityDBEntity = new CityDBEntity();
        cityDBEntity.Name_CN = cityName;
        cityDBEntity.Name_EN = cityName;
        cityDBEntity.PinyinS = cityName;
        _cityEntity.CityDBEntity.Add(cityDBEntity);

        DataSet dsResult = CityBP.CommonSelectFogToCity(_cityEntity).QueryResult;
        gridView1.DataSource = dsResult.Tables[0].DefaultView;
        gridView1.DataKeyNames = new string[] { "cityid" };//主键
        gridView1.DataBind();
    }
コード例 #4
0
    //protected void gridViewCSReviewUserList_RowDeleting(object sender, GridViewDeleteEventArgs e)
    //{
    //    string strID = gridViewCSReviewUserList.DataKeys[e.RowIndex].Value.ToString();
    //    _userEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
    //    _commonEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
    //    _userEntity.LogMessages.Userid = UserSession.Current.UserAccount;
    //    _userEntity.LogMessages.Username = UserSession.Current.UserDspName;
    //    _userEntity.LogMessages.IpAddress = UserSession.Current.UserIP;
    //    _userEntity.UserDBEntity = new List<UserDBEntity>();
    //    UserDBEntity usergroupEntity = new UserDBEntity();
    //    usergroupEntity.UserNo = strID;
    //    _userEntity.UserDBEntity.Add(usergroupEntity);
    //    int iResult = UserGroupBP.DeleteConsultRoomUser(_userEntity);
    //    _commonEntity.LogMessages = _userEntity.LogMessages;
    //    _commonEntity.CommonDBEntity = new List<CommonDBEntity>();
    //    CommonDBEntity commonDBEntity = new CommonDBEntity();
    //    commonDBEntity.Event_Type = "巡房条件-删除";
    //    commonDBEntity.Event_ID = hidUserID.Value.ToString().Trim();
    //    string conTent = GetLocalResourceObject("EventDeleteMessage").ToString();
    //    conTent = string.Format(conTent, usergroupEntity.UserNo);
    //    commonDBEntity.Event_Content = conTent;
    //    if (iResult == 1)
    //    {
    //        commonDBEntity.Event_Result = GetLocalResourceObject("DelSuccess").ToString();
    //        messageContent.InnerHtml = GetLocalResourceObject("DelSuccess").ToString();
    //        BindReviewUserListGrid();
    //        //ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "updateScript", "BtnDelCompleteStyle();", true);
    //    }
    //    else
    //    {
    //        commonDBEntity.Event_Result = GetLocalResourceObject("Error5").ToString();
    //        messageContent.InnerHtml = GetLocalResourceObject("Error5").ToString();
    //    }
    //    _commonEntity.CommonDBEntity.Add(commonDBEntity);
    //    CommonBP.InsertEventHistory(_commonEntity);
    //}
    /// <summary>
    /// 分配所有  城市 下面  所有酒店  到 该用户名下
    /// 获取 该用户已绑定信息   获取所有城市    绑定到该用户名下
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnAllotAllCitys_Click(object sender, EventArgs e)
    {
        #region  判断是否 有用户
        if (String.IsNullOrEmpty(hidSelecUserID.Value.Trim()))
        {
            messageContent.InnerHtml = "订单审核任务分配绑定城市失败,请选择用户!";
            ScriptManager.RegisterStartupScript(this.UpdatePanel2, this.GetType(), "updateScript", "BtnCompleteStyle();", true);
            return;
        }

        if (!hidSelecUserID.Value.Trim().Contains("[") || !hidSelecUserID.Value.Trim().Contains("]"))
        {
            messageContent.InnerHtml = "订单审核任务分配绑定城市失败,请选择用户!";
            ScriptManager.RegisterStartupScript(this.UpdatePanel2, this.GetType(), "updateScript", "BtnCompleteStyle();", true);
            return;
        }
        #endregion

        hidUserID.Value = hidSelecUserID.Value;

        #region   获取该用户 已绑定的 城市 酒店 商圈 信息
        _userEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _userEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _userEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _userEntity.LogMessages.IpAddress = UserSession.Current.UserIP;
        _userEntity.UserDBEntity = new List<UserDBEntity>();
        UserDBEntity usergroupEntity = new UserDBEntity();
        usergroupEntity.UserID = hidUserID.Value.Trim().Substring((hidUserID.Value.Trim().IndexOf('[') + 1), (hidUserID.Value.Trim().IndexOf(']') - 1));
        _userEntity.UserDBEntity.Add(usergroupEntity);
        DataSet dsResult = UserSearchBP.ReviewConsultPOrderUserSelect(_userEntity).QueryResult;//用户绑定信息
        #endregion

        #region 获取所有城市
        CityEntity _cityEntity = new CityEntity();
        _cityEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _cityEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _cityEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _cityEntity.LogMessages.IpAddress = UserSession.Current.UserIP;

        _cityEntity.CityDBEntity = new List<CityDBEntity>();
        CityDBEntity cityDBEntity = new CityDBEntity();
        _cityEntity.CityDBEntity.Add(cityDBEntity);

        DataSet dsCityResult = CityBP.Select(_cityEntity).QueryResult;
        #endregion

        for (int i = 0; i < dsCityResult.Tables[0].Rows.Count; i++)
        {
            DataRow[] rows = dsResult.Tables[0].Select("CONSULTVAL='" + dsCityResult.Tables[0].Rows[i]["CONSULTVAL"].ToString() + "'");
            if (rows.Length == 0)//当前城市没有绑定   将该城市 绑定到该用户下面
            {
                string CityID = dsCityResult.Tables[0].Rows[i]["cityID"].ToString();

                #region  保存城市  记录日志
                _userEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
                _commonEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
                _userEntity.LogMessages.Userid = UserSession.Current.UserAccount;
                _userEntity.LogMessages.Username = UserSession.Current.UserDspName;
                _userEntity.LogMessages.IpAddress = UserSession.Current.UserIP;

                _userEntity.UserDBEntity = new List<UserDBEntity>();
                usergroupEntity = new UserDBEntity();
                usergroupEntity.UserID = hidUserID.Value.Trim().Substring((hidUserID.Value.Trim().IndexOf('[') + 1), (hidUserID.Value.Trim().IndexOf(']') - 1));
                usergroupEntity.CityID = CityID;
                usergroupEntity.RType = "0";//城市
                _userEntity.UserDBEntity.Add(usergroupEntity);

                int iResult = UserGroupBP.InsertConsultPOrderUser(_userEntity);

                _commonEntity.LogMessages = _userEntity.LogMessages;
                _commonEntity.CommonDBEntity = new List<CommonDBEntity>();
                CommonDBEntity commonDBEntity = new CommonDBEntity();

                commonDBEntity.Event_Type = "订单审核任务分配-All-批量城市-保存";
                commonDBEntity.Event_ID = hidUserID.Value.ToString().Trim();
                string conTent = GetLocalResourceObject("EventInsertMessage").ToString();
                string conval = usergroupEntity.CityID;

                conTent = string.Format(conTent, usergroupEntity.UserID, usergroupEntity.RType, conval);
                commonDBEntity.Event_Content = conTent;

                if (iResult == 1)
                {
                    commonDBEntity.Event_Result = GetLocalResourceObject("InsertSuccess").ToString();
                }
                else if (iResult == 2)
                {
                    commonDBEntity.Event_Result = GetLocalResourceObject("Error2").ToString();
                }
                else if (iResult == 3)
                {
                    commonDBEntity.Event_Result = GetLocalResourceObject("Error3").ToString();
                }
                else
                {
                    commonDBEntity.Event_Result = GetLocalResourceObject("Error4").ToString();
                }
                _commonEntity.CommonDBEntity.Add(commonDBEntity);
                CommonBP.InsertEventHistory(_commonEntity);
                #endregion
            }
        }
        ScriptManager.RegisterStartupScript(this.UpdatePanel2, this.GetType(), "updateScriptAll", "BtnCompleteStyle();", true);
    }
コード例 #5
0
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        detailMessageContent.InnerHtml = "";
        bool bFLag = true;
        string errMsg = GetLocalResourceObject("UpdateError").ToString() + "<br/>";

        if (String.IsNullOrEmpty(txtCityNM.Value.ToString().Trim()))
        {
            errMsg = errMsg + GetLocalResourceObject("Error1").ToString() + "<br/>";
            bFLag = false;
        }
        if (StringUtility.Text_Length(txtCityNM.Value.ToString().Trim()) > 30)
        {
            errMsg = errMsg + GetLocalResourceObject("Error7").ToString() + "<br/>";
            bFLag = false;
        }

        if (String.IsNullOrEmpty(txtPinyin.Value.ToString().Trim()))
        {
            errMsg = errMsg + GetLocalResourceObject("Error2").ToString() + "<br/>";
            bFLag = false;
        }
        if (StringUtility.Text_Length(txtPinyin.Value.ToString().Trim()) > 40)
        {
            errMsg = errMsg + GetLocalResourceObject("Error8").ToString() + "<br/>";
            bFLag = false;
        }

        if (String.IsNullOrEmpty(txtPinyin_Short.Value.ToString().Trim()))
        {
            errMsg = errMsg + GetLocalResourceObject("Error3").ToString() + "<br/>";
            bFLag = false;
        }
        if (StringUtility.Text_Length(txtPinyin_Short.Value.ToString().Trim()) > 40)
        {
            errMsg = errMsg + GetLocalResourceObject("Error9").ToString() + "<br/>";
            bFLag = false;
        }

        //SEQ排序放置搜索界面  此处不做处理     Edit  Jason.yu  2012.08.07
        //if (String.IsNullOrEmpty(txtSEQ.Value.ToString().Trim()))
        //{
        //    errMsg = errMsg + GetLocalResourceObject("Error4").ToString() + "<br/>";
        //    bFLag = false;
        //}

        //if (!CheckSeq(txtSEQ.Value.ToString().Trim()))
        //{
        //    errMsg = errMsg + GetLocalResourceObject("Error10").ToString() + "<br/>";
        //    bFLag = false;
        //}

        if (String.IsNullOrEmpty(txtLongitude.Value.ToString().Trim()))
        {
            errMsg = errMsg + GetLocalResourceObject("Error5").ToString() + "<br/>";
            bFLag = false;
        }

        if (String.IsNullOrEmpty(txtLatitude.Value.ToString().Trim()))
        {
            errMsg = errMsg + GetLocalResourceObject("Error6").ToString() + "<br/>";
            bFLag = false;
        }

        if (!bFLag)
        {
            detailMessageContent.InnerHtml = errMsg;
            return;
        }
        //if (String.IsNullOrEmpty(txtSEQ.Value.ToString().Trim()))
        //{
        //    detailMessageContent.InnerHtml = GetLocalResourceObject("UpdateError4").ToString();
        //    return;
        //}

        //if (Pinyin.Value.ToString().Trim().Length > 32)
        //{
        //    detailMessageContent.InnerHtml = GetLocalResourceObject("UpdateError3").ToString();
        //    return;
        //}

        //if (PinyinS.Text.ToString().Trim().Length > 200)
        //{
        //    detailMessageContent.InnerHtml = GetLocalResourceObject("UpdateError5").ToString();
        //    return;
        //}

        //if (Latitude.Text.ToString().Trim().Length > 200)
        //{
        //    detailMessageContent.InnerHtml = GetLocalResourceObject("UpdateError5").ToString();
        //    return;
        //}

        //if (Latitude.Text.ToString().Trim().Length > 200)
        //{
        //    detailMessageContent.InnerHtml = GetLocalResourceObject("UpdateError5").ToString();
        //    return;
        //}

        detailMessageContent.InnerHtml = "";

        _cityEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _commonEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _cityEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _cityEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _cityEntity.LogMessages.IpAddress = UserSession.Current.UserIP;
        _cityEntity.CityDBEntity = new List<CityDBEntity>();
        CityDBEntity cityDBEntity = new CityDBEntity();
        cityDBEntity.CityID = txtCityID.Value.Trim();
        cityDBEntity.ElCityID = txtELCityID.Value.Trim();
        cityDBEntity.Name_CN = txtCityNM.Value.Trim();
        cityDBEntity.SEQ = txtSEQ.Value.Trim();
        cityDBEntity.Pinyin = (txtPinyin.Value.Trim().Length > 0) ? txtPinyin.Value.Trim().Substring(0, 1).ToUpper() + txtPinyin.Value.Trim().Substring(1) : txtPinyin.Value.Trim();
        cityDBEntity.PinyinS = txtPinyin_Short.Value.Trim();
        cityDBEntity.Longitude = txtLongitude.Value.Trim();
        cityDBEntity.Latitude = txtLatitude.Value.Trim();
        cityDBEntity.OnlineStatus = ddpStatusList.SelectedValue;
        //cityDBEntity.IsHot = ddpIsHot.SelectedValue;
        string hotCitys = (this.ckLmHotCity.Checked == true ? "1" : "0") + (this.ckHubs1HotCity.Checked == true ? "1" : "0") + (this.ckYLHotCity.Checked == true ? "1" : "0") + (this.ckXCHotCity.Checked == true ? "1" : "0");
        cityDBEntity.IsHot = hotCitys + "0000000000000000";

        //新增 城市类型 修改   edit Jason.yu  2012.8.9
        string cityTypes = (this.ckLm.Checked == true ? "1" : "0") + (this.ckHubs1.Checked == true ? "1" : "0") + (this.ckYL.Checked == true ? "1" : "0") + (this.ckXC.Checked == true ? "1" : "0");
        cityDBEntity.CityType = cityTypes + "0000000000000000";

        //新增 城市销售时间
        cityDBEntity.SaleHour = this.marketData.SelectedValue;

        _cityEntity.CityDBEntity.Add(cityDBEntity);
        int iResult = CityBP.Update(_cityEntity);

        _commonEntity.LogMessages = _cityEntity.LogMessages;
        _commonEntity.CommonDBEntity = new List<CommonDBEntity>();
        CommonDBEntity commonDBEntity = new CommonDBEntity();

        commonDBEntity.Event_Type = "城市管理-修改";
        commonDBEntity.Event_ID = txtCityID.Value;

        string conTent = GetLocalResourceObject("EventUpdateMessage").ToString();
        conTent = string.Format(conTent, cityDBEntity.CityID, cityDBEntity.Name_CN, cityDBEntity.OnlineStatus, cityDBEntity.SEQ, cityDBEntity.Pinyin, cityDBEntity.PinyinS, cityDBEntity.Longitude, cityDBEntity.Latitude);
        commonDBEntity.Event_Content = conTent;

        if (iResult == 1)
        {
            Response.Write("<script>window.returnValue=true;window.opener = null;window.close();</script>");
            commonDBEntity.Event_Result = GetLocalResourceObject("UpdateSuccess").ToString();
            //detailMessageContent.InnerHtml = GetLocalResourceObject("UpdateSuccess").ToString();
        }
        else
        {
            commonDBEntity.Event_Result = GetLocalResourceObject("UpdateError").ToString();
            detailMessageContent.InnerHtml = GetLocalResourceObject("UpdateError").ToString();
        }

        _commonEntity.CommonDBEntity.Add(commonDBEntity);
        CommonBP.InsertEventHistory(_commonEntity);
    }
コード例 #6
0
    private void BindFogCityDetail(string CityID)
    {
        _cityEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _cityEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _cityEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _cityEntity.LogMessages.IpAddress = UserSession.Current.UserIP;
        _cityEntity.CityDBEntity = new List<CityDBEntity>();
        CityDBEntity cityDBEntity = new CityDBEntity();
        cityDBEntity.CityID = CityID;
        _cityEntity.CityDBEntity.Add(cityDBEntity);

        DataSet dsMainResult = CityBP.FOGMainSelect(_cityEntity).QueryResult;
        if (dsMainResult.Tables.Count > 0 && dsMainResult.Tables[0].Rows.Count > 0)
        {
            txtCityID.Value = dsMainResult.Tables[0].Rows[0]["city_id"].ToString();
            txtCityNM.Value = dsMainResult.Tables[0].Rows[0]["name_cn"].ToString();
            txtSEQ.Value = dsMainResult.Tables[0].Rows[0]["seq"].ToString();
            txtPinyin.Value = dsMainResult.Tables[0].Rows[0]["pinyin"].ToString();
            txtPinyin_Short.Value = dsMainResult.Tables[0].Rows[0]["pinyin_short"].ToString();
            txtLongitude.Value = dsMainResult.Tables[0].Rows[0]["longitude"].ToString();
            txtLatitude.Value = dsMainResult.Tables[0].Rows[0]["latitude"].ToString();
        }
        else
        {
            detailMessageContent.InnerHtml = GetLocalResourceObject("WarningMessage1").ToString();
        }
    }
コード例 #7
0
    private void BindCityDetail(string CityID)
    {
        _cityEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _cityEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _cityEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _cityEntity.LogMessages.IpAddress = UserSession.Current.UserIP;
        _cityEntity.CityDBEntity = new List<CityDBEntity>();
        CityDBEntity cityDBEntity = new CityDBEntity();
        cityDBEntity.CityID = CityID;
        _cityEntity.CityDBEntity.Add(cityDBEntity);

        DataSet dsMainResult = CityBP.MainSelect(_cityEntity).QueryResult;
        if (dsMainResult.Tables.Count > 0 && dsMainResult.Tables[0].Rows.Count > 0)
        {
            txtCityID.Value = dsMainResult.Tables[0].Rows[0]["city_id"].ToString();
            txtELCityID.Value = dsMainResult.Tables[0].Rows[0]["el_city_id"].ToString();
            txtCityNM.Value = dsMainResult.Tables[0].Rows[0]["name_cn"].ToString();
            txtSEQ.Value = dsMainResult.Tables[0].Rows[0]["seq"].ToString();
            txtPinyin.Value = dsMainResult.Tables[0].Rows[0]["pinyin"].ToString();
            txtPinyin_Short.Value = dsMainResult.Tables[0].Rows[0]["pinyin_short"].ToString();
            txtLongitude.Value = dsMainResult.Tables[0].Rows[0]["longitude"].ToString();
            txtLatitude.Value = dsMainResult.Tables[0].Rows[0]["latitude"].ToString();
            ddpStatusList.SelectedValue = dsMainResult.Tables[0].Rows[0]["STATUS"].ToString();
            if (dsMainResult.Tables[0].Rows[0]["citytypes"].ToString().Trim() != "")
            {
                if (dsMainResult.Tables[0].Rows[0]["citytypes"].ToString().Substring(0, 1) == "1") { this.ckLm.Checked = true; }
                if (dsMainResult.Tables[0].Rows[0]["citytypes"].ToString().Substring(1, 1) == "1") { this.ckHubs1.Checked = true; }
                if (dsMainResult.Tables[0].Rows[0]["citytypes"].ToString().Substring(2, 1) == "1") { this.ckYL.Checked = true; }
                if (dsMainResult.Tables[0].Rows[0]["citytypes"].ToString().Substring(3, 1) == "1") { this.ckXC.Checked = true; }
            }
            //ddpIsHot.SelectedValue = dsMainResult.Tables[0].Rows[0]["IS_HOT"].ToString();
            if (dsMainResult.Tables[0].Rows[0]["is_hot"].ToString().Trim() != "")
            {
                if (dsMainResult.Tables[0].Rows[0]["is_hot"].ToString().Substring(0, 1) == "1") { this.ckLmHotCity.Checked = true; }
                if (dsMainResult.Tables[0].Rows[0]["is_hot"].ToString().Substring(1, 1) == "1") { this.ckHubs1HotCity.Checked = true; }
                if (dsMainResult.Tables[0].Rows[0]["is_hot"].ToString().Substring(2, 1) == "1") { this.ckYLHotCity.Checked = true; }
                if (dsMainResult.Tables[0].Rows[0]["is_hot"].ToString().Substring(3, 1) == "1") { this.ckXCHotCity.Checked = true; }
            }
            if (dsMainResult.Tables[0].Rows[0]["sale_hour"].ToString().Trim() != "")
            { //11110000000 0000000 111111
                this.marketData.SelectedValue = dsMainResult.Tables[0].Rows[0]["sale_hour"].ToString().Trim();
            }
        }
        else
        {
            detailMessageContent.InnerHtml = GetLocalResourceObject("WarningMessage").ToString();
            //btnDelete.Visible = false;
            btnUpdate.Visible = false;
            btnFogRead.Visible = false;
        }
    }