示例#1
0
 protected void gvwMaster_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "EditRow")
     {
         int id = Convert.ToInt32(e.CommandArgument);
         RowID = id;
         mvwForm.SetActiveView(viwAddEdit);
         DocumentType docType = DocumentTypeService.Get(id);
         txtDescription.Text             = docType.Description;
         chkIsLastState.Checked          = docType.IsLastState;
         ddlCustomerStatus.SelectedValue = !docType.ChangeCustomerStatusIDTo.HasValue ? String.Empty : docType.ChangeCustomerStatusIDTo.Value.ToString();
         txtDescription.Focus();
     }
 }
示例#2
0
 public IHttpActionResult Get(int id)
 {
     return(Utils.Response(MapService.MapOne <ITS_DocumentType, DocumentTypeDTO>(Service.Get(id)), HttpStatusCode.NotFound, string.Format("Document type with Id {0} not found.", id), Request.RequestUri.AbsoluteUri));
 }