Exemple #1
0
        protected void InitData()
        {
            this.pageIndex = Utils.GetInt(Request.QueryString["Page"], 1);
            string kw = Server.UrlDecode(Utils.GetQueryStringValue("kw"));//姓名、手机号

            EyouSoft.BLL.TicketStructure.TicketVisitor BLL = new EyouSoft.BLL.TicketStructure.TicketVisitor();
            MVisitorSearchInfo Model = new MVisitorSearchInfo();

            //Model.Type = TicketDataType.线路常旅客;
            Model.KeyWord = kw;
            IList <TicketVistorInfo> lst = BLL.GetVisitors(this.pageSize, this.pageIndex, ref recordCount, this.SiteUserInfo.CompanyID, Model);

            if (null != lst && lst.Count > 0)
            {
                this.RepList.DataSource = lst;
                this.RepList.DataBind();
                this.BindPage(kw);
            }
            else
            {
                this.RepList.Controls.Add(new Literal()
                {
                    Text = "<li style='width:100%;height:100%;text-align:center;border-bottom:solid 1px #AED7EE;border-right:solid 1px #AED7EE;'>暂无信息!</li>"
                });
                this.ExportPageInfo1.Visible = false;
            }
        }
Exemple #2
0
        protected void initData()
        {
            this.pageIndex = Utils.GetInt(Request.QueryString["Page"], 1);
            string kw = Server.UrlDecode(Utils.GetQueryStringValue("kw"));//姓名、手机号

            EyouSoft.BLL.TicketStructure.TicketVisitor BLL = new EyouSoft.BLL.TicketStructure.TicketVisitor();
            MVisitorSearchInfo Model = new MVisitorSearchInfo();

            Model.KeyWord = kw;//手机号?
            IList <TicketVistorInfo> lst = BLL.GetVisitors(this.pageSize, this.pageIndex, ref recordCount, this.SiteUserInfo.CompanyID, Model);

            if (null != lst && lst.Count > 0)
            {
                this.RepList.DataSource = lst;
                this.RepList.DataBind();
                this.BindPage(kw);
            }
            else
            {
                this.RepList.Controls.Add(new Literal()
                {
                    Text = "<tr><td colspan='9' align='center'>暂无信息!</td></tr>"
                });
                this.ExportPageInfo1.Visible = false;
            }
        }
Exemple #3
0
 protected void initData(string id)
 {
     this.BindVisitorType();
     this.BindCardType();
     this.InitCountryList();
     this.InitProvince();
     //编辑时初始化
     if (!string.IsNullOrEmpty(id))
     {
         EyouSoft.BLL.TicketStructure.TicketVisitor BLL = new EyouSoft.BLL.TicketStructure.TicketVisitor();
         TicketVistorInfo Model = BLL.GetTicketVisitorInfo(id);
         if (null != Model)
         {
             this.txtNameCn.Value       = Model.ChinaName;                                                                                                                       //中文名
             this.txtNameEn.Value       = Model.EnglishName;                                                                                                                     //英文名
             this.ddlType.SelectedValue = ((int)Model.VistorType).ToString();                                                                                                    //旅客类型
             this.Page.ClientScript.RegisterStartupScript(this.GetType(), Guid.NewGuid().ToString(), string.Format("TravelersAdd.setSex('{0}');", (int)Model.ContactSex), true); //性别
             this.txtMobile.Value            = Model.Mobile;                                                                                                                     //手机号码
             this.txtTel.Value               = Model.ContactTel;                                                                                                                 //电话号码
             this.txtAddress.Value           = Model.Address;                                                                                                                    //邮寄地址
             this.txtPostCode.Value          = Model.ZipCode;                                                                                                                    //邮编
             this.txtBirth.Value             = string.Format("{0:yyyy-MM-dd}", Model.BirthDay);                                                                                  //生日
             this.txtCardId.Value            = Model.IdCardCode;                                                                                                                 //身份证
             this.txtPassport.Value          = Model.PassportCode;                                                                                                               //护照
             this.ddlOtherCard.SelectedValue = ((int)Model.CardType).ToString();                                                                                                 //其它证件
             this.txtCardNum.Value           = Model.CardNo;                                                                                                                     //证件号码
             this.ddlCountry.SelectedValue   = Model.CountryId.ToString();                                                                                                       //所在国家
             //地区,省、市、区
             this.ClientScript.RegisterStartupScript(this.GetType(), Guid.NewGuid().ToString(), string.Format("TravelersAdd.InitPlace('{0}','{1}','{2}');", Model.ProvinceId, Model.CityId, Model.DistrictId), true);
             this.txtRemark.Value = Model.Remark;//备注
         }
     }
 }
Exemple #4
0
        /// <summary>
        /// 保存数据
        /// </summary>
        protected void pageSave(string id)
        {
            StringBuilder strMsg = new StringBuilder();

            EyouSoft.BLL.TicketStructure.TicketVisitor BLL = new EyouSoft.BLL.TicketStructure.TicketVisitor();
            TicketVistorInfo Model;

            if (string.IsNullOrEmpty(id))
            {//新增
                Model           = new TicketVistorInfo();
                Model.IssueTime = DateTime.Now;
                strMsg.Append(this.commonModel(Model));
                if (strMsg.Length == 0 && BLL.AddTicketVisitorInfo(Model))
                {
                    strMsg.Append("添加成功!");
                }
                else
                {
                    strMsg.Remove(0, strMsg.Length);
                    strMsg.Append("添加失败!");
                }
            }
            else
            { //编辑
                Model = BLL.GetTicketVisitorInfo(id);
                if (null != Model)
                {
                    strMsg.Append(this.commonModel(Model));
                    if (strMsg.Length == 0 && BLL.UpdateTicketVisitorInfo(Model))
                    {
                        strMsg.Append("更新成功!");
                    }
                    else
                    {
                        strMsg.Remove(0, strMsg.Length);
                        strMsg.Append("更新失败!");
                    }
                }
            }
            Response.Clear();
            Response.Write(strMsg);
            Response.End();
        }
Exemple #5
0
        /// <summary>
        /// ajax_删除
        /// </summary>
        protected void del(string id)
        {
            if (string.IsNullOrEmpty(id))
            {
                return;
            }
            string str = string.Empty;

            EyouSoft.BLL.TicketStructure.TicketVisitor BLL = new EyouSoft.BLL.TicketStructure.TicketVisitor();
            if (BLL.DeleteTicketVisitorInfo(id.Split(',')))
            {
                str = "删除成功!";
            }
            else
            {
                str = "删除失败!";
            }
            Response.Clear();
            Response.Write(str);
            Response.End();
        }