private void UpdateItemDetails() { DL_WEB.DAL.Client.Update oUpdate = new DL_WEB.DAL.Client.Update(); oUpdate.LoadByPrimaryKey(UpdateID); if (oUpdate.RowCount > 0) { oUpdate.Name = tbUpdateName.Text; oUpdate.Description = reDescription.Html; oUpdate.BuildDate = Micajah.Common.Helper.Convert.o2dt(tbBuildDate.Text); oUpdate.UpdateStatusID = Micajah.Common.Helper.Convert.o2i(ddlUpdateStatus.SelectedValue); oUpdate.UpdateGroupID = Micajah.Common.Helper.Convert.o2i(ddlUpdateGroup.SelectedValue); oUpdate.BuildNumber = tbBuuildNumber.Text; oUpdate.Save(); #region Registering Activity DL_WEB.DAL.Client.ActivityLog.Instance.RegisterActivity(ActivityTypes.UpdateUpdated, "Update " + oUpdate.Name + " updated", ActivityObject.Update, oUpdate.UpdateID, this.UserGUID, Context.User.Identity.Name); #endregion } else { throw new Exception("Update with UpdateID = " + UpdateID + " was not found."); } }
protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { if (this.UpdateID > 0) { DL_WEB.DAL.Client.Update oUpdate = new DL_WEB.DAL.Client.Update(); oUpdate.LoadByPrimaryKey(this.UpdateID); if (oUpdate.RowCount > 0 && oUpdate.ProjectID > 0) { ProjectIDLabel.Text = oUpdate.ProjectID.ToString(); ProjectInfo1.ProjectID = oUpdate.ProjectID; } } } }
protected void Page_Load(object sender, EventArgs e) { FillUpdateGroups(); FillUpdateStatus(); ProjectInfo1.ProjectID = this.ProjectID; if (!this.IsPostBack) { if (UpdateID > 0) { DL_WEB.DAL.Client.Update oUpdate = new DL_WEB.DAL.Client.Update(); oUpdate.LoadByPrimaryKey(this.UpdateID); if (oUpdate.RowCount > 0) { tbUpdateName.Text = oUpdate.Name; reDescription.Html = oUpdate.Description; tbBuildDate.Text = oUpdate.BuildDate.ToShortDateString(); tbBuuildNumber.Text = oUpdate.BuildNumber; ddlUpdateGroup.SelectedValue = oUpdate.UpdateGroupID.ToString(); ddlUpdateStatus.SelectedValue = oUpdate.UpdateStatusID.ToString(); } } else { ddlUpdateStatus.SelectedValue = DL_WEB.DAL.Client.UpdateStatus.CreatedStatusID.ToString(); ddlUpdateStatus.Enabled = false; linkbtnSave.Text = "Insert"; } if (IsNewUpdate) { this.tbUpdateName.ReadOnly = false; this.reDescription.Editable = true; this.linkbtnAddLogEntry.Text = "Save and Add Log Entry"; } } }