예제 #1
0
 public ActionResult SubmitForm(PositionRequest request, string type)
 {
     if (type == "add")
     {
         var data = _position.Insert(request);
         return(Content(data.ToJson()));
     }
     else
     {
         var data = _position.Update(request);
         return(Content(data.ToJson()));
     }
 }
예제 #2
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            Position p = new Position();

            p.Name        = txtName.Text;
            p.Description = txtDescription.Text;
            p.TeamId      = int.Parse(cboTeam.SelectedValue.ToString());
            p.RoleId      = int.Parse(cboRole.SelectedValue.ToString());
            if (_positionToUpdate == null)
            {
                PositionLogic.Add(p);
            }
            else
            {
                PositionLogic.Update(_positionToUpdate, p);
            }
            Close();
        }
예제 #3
0
 private void Update()
 {
     _poclog.Update(ThePosition);
     CancelProperties();
     RefreshCollection();
 }