public static long Insert(WebPage cus) { string sql = @"INSERT INTO QLCV_WebPage ([Page] ,[Active] ,[Type]) VALUES (" + cus.Page + @" ," + cus.Active + @" ,'" + cus.Type + @"')"; ServerProvider.ExecuteNonQuery(sql); return(long.Parse(ServerProvider.ExecuteScalar("Select @@IDENTITY").ToString())); }
public static int Insert(FieldSetting cus) { string sql = @"INSERT INTO QLCV_FieldSetting ([Control] ,[Attribute] ,[Value] ,[Field],[Type]) VALUES (N'" + cus.Control + @"' ,N'" + cus.Attribute + @"' ,N'" + cus.Value + @"' ,N'" + cus.Field + @"' ,N'" + cus.Type + @"')"; ServerProvider.ExecuteNonQuery(sql); return(int.Parse(ServerProvider.ExecuteScalar("Select @@IDENTITY").ToString())); }