/// <summary> /// 删除一条名片记录,关闭当前页,更新父页面! /// </summary> protected void DeleteButton_Click(object sender, EventArgs e) { GK_OA_CardsFolderBFL cfBFL = new GK_OA_CardsFolderBFL(); GK_OA_CardsFolderModel cfModel = new GK_OA_CardsFolderModel(); cfModel.Code = Int32.Parse(Request.QueryString["Code"]); cfBFL.Delete(cfModel); Response.Write("<script>window.opener.location.reload();window.close();</script>"); }
/// <summary> /// 添加新数据到GK_OA_CardsForder数据 /// </summary> protected void InsertButton_Click(object sender, EventArgs e) { GK_OA_CardsFolderModel cfModel = this._SetCardFolderModel(); GK_OA_CardsFolderBFL cfBFL = new GK_OA_CardsFolderBFL(); int code = cfBFL.Insert(cfModel); //this.CardFormView.ChangeMode(FormViewMode.ReadOnly); //this._ReloadPage(code.ToString()); Response.Write("<script>window.opener.location.reload();window.close();</script>"); }
/// <summary> /// /// </summary> protected void btSearch_Click(object sender, EventArgs e) { GK_OA_CardsFolderQueryModel cfQueryModel = new GK_OA_CardsFolderQueryModel(); cfQueryModel.QueryConditionStr = this._ConstructQueryString(); GK_OA_CardsFolderBFL cfBFL = new GK_OA_CardsFolderBFL(); this.GridView1.DataSource = cfBFL.GetGK_OA_CardsFolderList(cfQueryModel); this.GridView1.DataBind(); }
/// <summary> ///更新表格GK_OA_CardsForder数据 /// </summary> protected void UpdateButton_Click(object sender, EventArgs e) { int code = Int32.Parse(Request.QueryString["Code"]); GK_OA_CardsFolderModel cfModel = this._SetCardFolderModel(); cfModel.Code = code; GK_OA_CardsFolderBFL cfBFL = new GK_OA_CardsFolderBFL(); cfBFL.Update(cfModel); Response.Write("<script>window.opener.location.reload();</script>"); this.CardFormView.ChangeMode(FormViewMode.ReadOnly); //this._ReloadPage(code.ToString()); }
/// <summary> /// 根据UserID,加载个人名片夹到桌面显示 /// </summary> protected void Page_Load(object sender, EventArgs e) { if (!user.HasRight("350101")) { this.NewButton.Visible = false; } GK_OA_CardsFolderQueryModel cfQueryModel = new GK_OA_CardsFolderQueryModel(); cfQueryModel.UserIdEqual = user.UserID; GK_OA_CardsFolderBFL cfBFL = new GK_OA_CardsFolderBFL(); this.GridView1.DataSource = cfBFL.GetGK_OA_CardsFolderList(cfQueryModel); this.GridView1.DataBind(); }