private void Simpan_Click(object sender, EventArgs e) { if (!InputValidationProvider.Validate()) { return; } BranchModel branch; if (branchname.Properties.TextEditStyle == DevExpress.XtraEditors.Controls.TextEditStyles.Standard) { branch = new BranchModel(Session.DefaultSession); } else { branch = branch_coll.FirstOrDefault(b => b.branch_name == branchname.Text); } branch.branch_name = branchname.Text; branch.alamat = alamat.Text; branch.no_telepon = no_telepon.Text; branch.active = active.Checked; branch.Save(); LoadBranchList(); branchname.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; no_telepon.Enabled = false; alamat.Enabled = false; active.Enabled = false; Edit.Enabled = true; Hapus.Enabled = true; }
// GET api/values/5 public string Get(int v1x, int v1y, int v2x, int v2y, int v3x, int v3y) { InputValidationProvider.ValidateVectorPoints(new[] { v1x, v1y, v2x, v2y, v3x, v3y }); return(LocationProvider.LocateTriangle(v1x, v1y, v2x, v2y, v3x, v3y)); }
// GET api/values/5 public string[] Get(int column, string row) { InputValidationProvider.ValidateUserInput(row, column); return(CoordinatesProvider.CalculateCoordinates(row, column)); }