Example #1
0
        protected void LoadInfo()
        {
            int id = WS.RequestInt("id");
            var i  = InfoTypeView.GetModelByID(id.ToS());

            txt_TypeName.Text        = i.TypeName;
            txt_TemplateIndex.Text   = i.TemplateIndex;
            txt_TemplateList.Text    = i.TemplateList;
            txt_TemplateContent.Text = i.TemplateContent;

            txt_TemplateForm.Text      = i.TemplateForm;
            txt_TemplateAdminForm.Text = i.TemlateAdminForm;

            txt_Num1.Text  = i.Num1;
            txt_Num2.Text  = i.Num2;
            txt_Num3.Text  = i.Num3;
            txt_Num4.Text  = i.Num4;
            txt_Num5.Text  = i.Num5;
            txt_Num6.Text  = i.Num6;
            txt_Num7.Text  = i.Num7;
            txt_Num8.Text  = i.Num8;
            txt_Num9.Text  = i.Num9;
            txt_Num10.Text = i.Num10;

            txt_Nvarchar1.Text  = i.Nvarchar1;
            txt_Nvarchar2.Text  = i.Nvarchar2;
            txt_Nvarchar3.Text  = i.Nvarchar3;
            txt_Nvarchar4.Text  = i.Nvarchar4;
            txt_Nvarchar5.Text  = i.Nvarchar5;
            txt_Nvarchar6.Text  = i.Nvarchar6;
            txt_Nvarchar7.Text  = i.Nvarchar7;
            txt_Nvarchar8.Text  = i.Nvarchar8;
            txt_Nvarchar9.Text  = i.Nvarchar9;
            txt_Nvarchar10.Text = i.Nvarchar10;
            txt_Nvarchar11.Text = i.Nvarchar11;
            txt_Nvarchar12.Text = i.Nvarchar12;
            txt_Nvarchar13.Text = i.Nvarchar13;
            txt_Nvarchar14.Text = i.Nvarchar14;
            txt_Nvarchar15.Text = i.Nvarchar15;

            txt_Decimal1.Text = i.Decimal1;
            txt_Decimal2.Text = i.Decimal2;
            txt_Decimal3.Text = i.Decimal3;
            txt_Decimal4.Text = i.Decimal4;
            txt_Decimal5.Text = i.Decimal5;

            txt_Text1.Text = i.Text1;
            txt_Text2.Text = i.Text2;
            txt_Text3.Text = i.Text3;
            txt_Text4.Text = i.Text4;
            txt_Text5.Text = i.Text5;

            txt_Bit1.Text = i.Bit1;
            txt_Bit2.Text = i.Bit2;
            txt_Bit3.Text = i.Bit3;
            txt_Bit4.Text = i.Bit4;
            txt_Bit5.Text = i.Bit5;
        }
Example #2
0
        /// <summary>
        /// 加载数据
        /// </summary>
        protected void LoadInfo()
        {
            InfoType it = InfoTypeView.GetModelByID(TypeID.ToS());

            TypeHtml = it.TemlateAdminForm;

            int id = WS.RequestInt("id");
            var i  = InfoView.GetModelByID(id.ToS());

            ValueString = i.ToJson();

            TypeHtml = TypeHtml.Replace("{address}", i.Address);
            TypeHtml = TypeHtml.Replace("{bit1}", i.Bit1.ToS());
            TypeHtml = TypeHtml.Replace("{address}", i.Bit2.ToS());
            TypeHtml = TypeHtml.Replace("{address}", i.Bit3.ToS());
            TypeHtml = TypeHtml.Replace("{address}", i.Bit4.ToS());
            TypeHtml = TypeHtml.Replace("{address}", i.Bit5.ToS());
            TypeHtml = TypeHtml.Replace("{classid}", i.ClassID.ToS());
            TypeHtml = TypeHtml.Replace("{classname}", i.ClassName);
            TypeHtml = TypeHtml.Replace("{clickcount}", i.ClickCount.ToS());
            TypeHtml = TypeHtml.Replace("{contact}", i.Contact);
            TypeHtml = TypeHtml.Replace("{contacttype}", i.ContactType);
            TypeHtml = TypeHtml.Replace("{decimal1}", i.Decimal1.ToS());
            TypeHtml = TypeHtml.Replace("{decimal2}", i.Decimal2.ToS());
            TypeHtml = TypeHtml.Replace("{decimal3}", i.Decimal3.ToS());
            TypeHtml = TypeHtml.Replace("{decimal4}", i.Decimal4.ToS());
            TypeHtml = TypeHtml.Replace("{decimal5}", i.Decimal5.ToS());

            TypeHtml = TypeHtml.Replace("{id}", i.Id.ToS());
            TypeHtml = TypeHtml.Replace("{imagecount}", i.ImageCount.ToS());
            TypeHtml = TypeHtml.Replace("{infotypeid}", i.InfoTypeID.ToS());
            TypeHtml = TypeHtml.Replace("{intro}", i.Intro);
            TypeHtml = TypeHtml.Replace("{issettop}", i.IsSetTop.ToS());
            TypeHtml = TypeHtml.Replace("{num1}", i.Num1.ToS());
            TypeHtml = TypeHtml.Replace("{num2}", i.Num2.ToS());
            TypeHtml = TypeHtml.Replace("{num3}", i.Num3.ToS());
            TypeHtml = TypeHtml.Replace("{num4}", i.Num4.ToS());
            TypeHtml = TypeHtml.Replace("{num5}", i.Num5.ToS());
            TypeHtml = TypeHtml.Replace("{num6}", i.Num6.ToS());
            TypeHtml = TypeHtml.Replace("{num7}", i.Num7.ToS());
            TypeHtml = TypeHtml.Replace("{num8}", i.Num8.ToS());
            TypeHtml = TypeHtml.Replace("{num9}", i.Num9.ToS());
            TypeHtml = TypeHtml.Replace("{num10}", i.Num10.ToS());

            TypeHtml = TypeHtml.Replace("{nvarchar1}", i.Nvarchar1);
            TypeHtml = TypeHtml.Replace("{nvarchar2}", i.Nvarchar2);
            TypeHtml = TypeHtml.Replace("{nvarchar3}", i.Nvarchar3);
            TypeHtml = TypeHtml.Replace("{nvarchar4}", i.Nvarchar4.IsNullOrEmpty()?"随时入住":i.Nvarchar4);
            TypeHtml = TypeHtml.Replace("{nvarchar5}", i.Nvarchar5);
            TypeHtml = TypeHtml.Replace("{nvarchar6}", i.Nvarchar6);
            TypeHtml = TypeHtml.Replace("{nvarchar7}", i.Nvarchar7);
            TypeHtml = TypeHtml.Replace("{nvarchar8}", i.Nvarchar8);
            TypeHtml = TypeHtml.Replace("{nvarchar9}", i.Nvarchar9);
            TypeHtml = TypeHtml.Replace("{nvarchar10}", i.Nvarchar10);
            TypeHtml = TypeHtml.Replace("{nvarchar11}", i.Nvarchar11);
            TypeHtml = TypeHtml.Replace("{nvarchar12}", i.Nvarchar12);
            TypeHtml = TypeHtml.Replace("{nvarchar13}", i.Nvarchar13);
            TypeHtml = TypeHtml.Replace("{nvarchar14}", i.Nvarchar14);
            TypeHtml = TypeHtml.Replace("{nvarchar15}", i.Nvarchar15);

            TypeHtml = TypeHtml.Replace("{outtime}", i.OutTime.ToS());
            TypeHtml = TypeHtml.Replace("{posttime}", i.PostTime.ToS());
            TypeHtml = TypeHtml.Replace("{replycount}", i.ReplyCount.ToS());
            TypeHtml = TypeHtml.Replace("{tel}", i.Tel);
            TypeHtml = TypeHtml.Replace("{tellocation}", i.TelLocation);
            TypeHtml = TypeHtml.Replace("{text1}", i.Text1);
            TypeHtml = TypeHtml.Replace("{text2}", i.Text2);
            TypeHtml = TypeHtml.Replace("{text3}", i.Text3);
            TypeHtml = TypeHtml.Replace("{text4}", i.Text4);
            TypeHtml = TypeHtml.Replace("{text5}", i.Text5);

            TypeHtml = TypeHtml.Replace("{title}", i.Title);
            TypeHtml = TypeHtml.Replace("{userid}", i.UserID.ToS());
            TypeHtml = TypeHtml.Replace("{username}", i.UserName);
            TypeHtml = TypeHtml.Replace("{ztid}", i.ZtID.ToS());
            TypeHtml = TypeHtml.Replace("{ztname}", i.ZtName);
        }
Example #3
0
        protected void btn_Save_Click(object sender, EventArgs e)
        {
            int id = WS.RequestInt("id");
            var i  = InfoTypeView.GetModelByID(id.ToS());

            i.TypeName        = txt_TypeName.Text.ToSqlEnCode();
            i.TemplateIndex   = txt_TemplateIndex.Text.ToSqlEnCode();
            i.TemplateList    = txt_TemplateList.Text.ToSqlEnCode();
            i.TemplateContent = txt_TemplateContent.Text.ToSqlEnCode();

            i.TemplateForm     = txt_TemplateForm.Text.ToSqlEnCode();
            i.TemlateAdminForm = txt_TemplateAdminForm.Text.ToSqlEnCode();

            i.Num1  = txt_Num1.Text;
            i.Num2  = txt_Num2.Text;
            i.Num3  = txt_Num3.Text;
            i.Num4  = txt_Num4.Text;
            i.Num5  = txt_Num5.Text;
            i.Num6  = txt_Num6.Text;
            i.Num7  = txt_Num7.Text;
            i.Num8  = txt_Num8.Text;
            i.Num9  = txt_Num9.Text;
            i.Num10 = txt_Num10.Text;

            i.Nvarchar1  = txt_Nvarchar1.Text;
            i.Nvarchar2  = txt_Nvarchar2.Text;
            i.Nvarchar3  = txt_Nvarchar3.Text;
            i.Nvarchar4  = txt_Nvarchar4.Text;
            i.Nvarchar5  = txt_Nvarchar5.Text;
            i.Nvarchar6  = txt_Nvarchar6.Text;
            i.Nvarchar7  = txt_Nvarchar7.Text;
            i.Nvarchar8  = txt_Nvarchar8.Text;
            i.Nvarchar9  = txt_Nvarchar9.Text;
            i.Nvarchar10 = txt_Nvarchar10.Text;
            i.Nvarchar11 = txt_Nvarchar11.Text;
            i.Nvarchar12 = txt_Nvarchar12.Text;
            i.Nvarchar13 = txt_Nvarchar13.Text;
            i.Nvarchar14 = txt_Nvarchar14.Text;
            i.Nvarchar15 = txt_Nvarchar15.Text;

            i.Decimal1 = txt_Decimal1.Text;
            i.Decimal2 = txt_Decimal2.Text;
            i.Decimal3 = txt_Decimal3.Text;
            i.Decimal4 = txt_Decimal4.Text;
            i.Decimal5 = txt_Decimal5.Text;

            i.Text1 = txt_Text1.Text;
            i.Text2 = txt_Text2.Text;
            i.Text3 = txt_Text3.Text;
            i.Text4 = txt_Text4.Text;
            i.Text5 = txt_Text5.Text;

            i.Bit1 = txt_Bit1.Text;
            i.Bit2 = txt_Bit2.Text;
            i.Bit3 = txt_Bit3.Text;
            i.Bit4 = txt_Bit4.Text;
            i.Bit5 = txt_Bit5.Text;

            if (i.Id > 0)
            {
                InfoTypeView.Update(i);
            }
            else
            {
                InfoTypeView.Insert(i);
            }

            Response.Redirect("InfoTypeList.aspx");
        }
Example #4
0
 protected void BindList()
 {
     rp_list.DataSource = InfoTypeView.GetModelList();
     rp_list.DataBind();
 }
Example #5
0
        protected void btn_Del_Click(object sender, EventArgs e)
        {
            string ids = WS.RequestString("id");

            InfoTypeView.Del(string.Format("id in ({0})", ids));
        }