protected void InsertBtn_Click(object sender, EventArgs e) { if (IsValid) { DepartmentSource.InsertParameters["Dept_Name"].DefaultValue = NameTxt.Text; DepartmentSource.InsertParameters["Mgr_Id"].DefaultValue = ManagerList.SelectedValue; DepartmentSource.Insert(); } }
private async Task LoadDepartmentPickerSource() { await repoDepartment.ReadAsync(); DepartmentSource.Clear(); foreach (var item in repoDepartment.Items) { DepartmentSource.Add(item.DepartmentName); } }
/// <summary> /// Initializes a new instance of the <see cref="DepartmentSettingsModel" /> class. /// </summary> /// <param name="dataSource">dataSource.</param> /// <param name="departments">departments.</param> public DepartmentSettingsModel(DepartmentSource dataSource = default(DepartmentSource), List <DepartmentActionModel> departments = default(List <DepartmentActionModel>)) { this.DataSource = dataSource; this.Departments = departments; }