protected void gviewSurSorcer_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row != null && e.Row.RowType == DataControlRowType.DataRow) { int rid = Convert.ToInt32(this.EGV.DataKeys[e.Row.RowIndex].Value.ToString()); M_Answer_Recode redMod = bans.SelReturnModel(rid); e.Row.Attributes.Add("onmouseover", "this.className='tdbgmouseover'"); e.Row.Attributes.Add("onmouseout", "this.className='tdbg'"); e.Row.Attributes.Add("onclick", "javascript:location.href='AnswerView.aspx?SID=" + redMod.Sid + "&UID=" + redMod.Userid + "'"); e.Row.Attributes.Add("style", "cursor:pointer"); e.Row.Attributes.Add("title", "双击查看"); } }
protected void DelAll_Click(object sender, EventArgs e) { string[] chkArr = GetChecked(); if (chkArr != null) { for (int i = 0; i < chkArr.Length; i++) { M_Answer_Recode redMod = bans.SelReturnModel(Convert.ToInt32(chkArr[i])); ansBll.DelByUid(redMod.Userid, redMod.Sid); bans.Del(Convert.ToInt32(chkArr[i])); } } SurveySorceDBind(); }
protected void gviewSurSorcer_RowCommand(object sender, GridViewCommandEventArgs e) { int id = DataConverter.CLng(e.CommandArgument); switch (e.CommandName) { case "Export": ExportControl(EGV); break; case "Status": bans.Update("Status=1", "Rid=" + id); sendmsg(1, id); break; case "Concle": bans.Update("Status=0", "Rid=" + id); sendmsg(0, id); break; case "Selected": bans.Update("Status=2", "Rid=" + id); sendmsg(2, id); break; case "NLock": bans.Update("Status=-2", "Rid=" + id); sendmsg(2, id); break; case "Del1": M_Answer_Recode redMod = bans.SelReturnModel(Convert.ToInt32(id)); ansBll.DelByUid(redMod.Userid, redMod.Sid); bans.Del(id); break; default: break; } SurveySorceDBind(); }
public bool UpdateAnswer(M_Answer_Recode model) { return(UpdateByID(model)); }
public bool AddAnswer(M_Answer_Recode model) { return(insert(model) > 0); }
public int insert(M_Answer_Recode model) { return(DBCenter.Insert(model)); }
/// <summary> /// 根据ID更新 /// </summary> public bool UpdateByID(M_Answer_Recode model) { return(DBCenter.UpdateByID(model, model.Sid)); }