protected void btnDelete_Click(object sender, EventArgs e) { wctProjectController db = new wctProjectController(); int _ID = Convert.ToInt32(Request.QueryString["id"]); db.Delete(_ID); string return_url = Utils.LinkUrl(this.TabId, this.ModuleId, "project"); Response.Redirect(return_url); }
protected void btnSave_Click(object sender, EventArgs e) { wctProjectInfo inf = new wctProjectInfo(); inf.Description = txtDescription.Text.Trim(); inf.ProjectName = txtProjectName.Text.Trim(); inf.XCode = txtXCode.Text.Trim(); wctProjectController db = new wctProjectController(); if (Request.QueryString["id"] == null) { db.Insert(inf); } else { inf.ID = Convert.ToInt32(Request.QueryString["id"]); db.Update(inf); } string return_url = Utils.LinkUrl(this.TabId, this.ModuleId, "project"); Response.Redirect(return_url); }
private void LoadInfo() { if (Request.QueryString["id"] != null) { wctProjectController db = new wctProjectController(); wctProjectInfo inf = db.Load(Convert.ToInt32(Request.QueryString["id"])); txtDescription.Text = inf.Description; txtProjectName.Text = inf.ProjectName; txtXCode.Text = inf.XCode; btnDelete.Visible = true; } }