protected void btnQuery_Click(object sender, EventArgs e) { DataTable dataSource = new DataTable(); TechnologyTellLogic technologyTellLogic = new TechnologyTellLogic(); dataSource = technologyTellLogic.GetDataTable(this.getQueryWhere()); this.DGrdTechnology.DataSource = dataSource; this.DGrdTechnology.DataBind(); }
protected void BtnSave_Click(object sender, EventArgs e) { TechnologyTellLogic technologyTellLogic = new TechnologyTellLogic(); if (this.TxtId.Text.Trim() == "") { base.RegisterScript("top.ui.alert('编号不能为空!')"); return; } int mark; if (this.cbkmark.Checked) { mark = 3; } else { mark = 2; } TechnologyJDInfo technologyInfo = this.GetTechnologyInfo(); if (this._Type == "Add") { int num = TechnologyJDAction.Add(technologyInfo); if (num == 1) { technologyTellLogic.Update(mark, int.Parse(this.DDTClass.SelectedValue.ToString()), technologyTellLogic.GetMaxId()); base.RegisterScript("top.ui.tabSuccess({ parentName: '_flowclass' });"); this.BtnSave.Enabled = false; return; } base.RegisterScript("top.ui.alert('保存失败!'); "); return; } else { int num = TechnologyJDAction.Upd(technologyInfo); if (num == 1) { base.RegisterScript("top.ui.tabSuccess({ parentName: '_flowclass' });"); return; } base.RegisterScript("top.ui.alert('保存失败!'); "); return; } }