- [Log()]//加载的代码
- public static void GetUserInfo()
- {
- PersonSet data= DBFactory.GetEntity<PersonSet>(PersonSetTable.ID.Equal(1));
- CustomData cus=new CustomData();
- cus.A=1;
- ReturnJSONString(data,cus);
- }
- [Log()]//更新部分的代码(代码生成器会自动生成)
- public static void AjaxUpdateUserInfo()
- {
- PersonSet data=new PersonSet();
- string UserName=Request["UserName"];
- string Sex=Request["Sex"];
- string Age=Request["Age"];
- string IsBeiJing=Request["IsBeiJing"];
- string AgePeriod=Request["AgePeriod"];
- string otherData=Request["otherData"];
- string PrimaryKey=Request["PrimaryKey"];
- data.Set(PersonSetTable.UserName,UserName);
- data.Set(PersonSetTable.Sex,Sex);
- data.Set(PersonSetTable.Age,Age);
- data.Set(PersonSetTable.IsBeiJing,IsBeiJing);
- data.Set(PersonSetTable.AgePeriod,AgePeriod);
- data.SetOnlyMark(PersonSetTable.ID.Equal(long.Parse(PrimaryKey)));
- DBFactory.Update(data);
- ReturnTextString(PrimaryKey);
- }
/