private void frmSetting_Load(object sender, EventArgs e) { obj = new FieldSetting(); status = Status.Add; LoadCombo(); LoadData(); cboAttribute.SelectedIndex = 0; cboControl.SelectedIndex = 0; }
public MultiForum(string Type) { UserName = FieldSetting.GetByField(FieldEnums.UserName, Type); PassWord = FieldSetting.GetByField(FieldEnums.Password, Type); Login = FieldSetting.GetByField(FieldEnums.Login, Type); NewThread = FieldSetting.GetByField(FieldEnums.NewThread, Type); Subject = FieldSetting.GetByField(FieldEnums.Subject, Type); Message = FieldSetting.GetByField(FieldEnums.Message, Type); Tags = FieldSetting.GetByField(FieldEnums.Tags, Type); Mode = FieldSetting.GetByField(FieldEnums.Mode, Type); Submit = FieldSetting.GetByField(FieldEnums.Submit, Type); }
public static void Update(FieldSetting cus) { string sql = @"UPDATE [QLCV_FieldSetting] SET [Control] = N'" + cus.Control + @"' ,[Attribute] = N'" + cus.Attribute + @"' ,[Value] = N'" + cus.Value + @"' ,[Field] = N'" + cus.Field + @"' ,[Type] = '" + cus.Type + @"' WHERE ID=" + cus.ID; ServerProvider.ExecuteNonQuery(sql); }
public static FieldSetting Get(long ID) { Type type = typeof(FieldSetting); string sql = @"select * from QLCV_FieldSetting where ID=" + ID; DataTable dtTable = ServerProvider.ExecuteToDataTable(sql); if (dtTable.Rows.Count > 0) { FieldSetting cus = new FieldSetting(); return((FieldSetting)Common.GetObjectValue(dtTable.Rows[0], type, cus)); } return(null); }
public static FieldSetting Get(long ID) { Type type = typeof(FieldSetting); string sql = @"select * from QLCV_FieldSetting where ID=" + ID; DataTable dtTable = ServerProvider.ExecuteToDataTable(sql); if (dtTable.Rows.Count > 0) { FieldSetting cus = new FieldSetting(); return (FieldSetting)Common.GetObjectValue(dtTable.Rows[0], type, cus); } return null; }
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())); }
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()); }