protected void Btnadd_Click(object sender, EventArgs e) { if (Request.QueryString["Gid"] != null) { string Mgid = Request.QueryString["Gid"].ToString(); string Mitem = TextBoxMitem.Text.Trim(); if (!string.IsNullOrEmpty(Mitem)) { LearnSite.Model.GaugeItem mmodel = new LearnSite.Model.GaugeItem(); mmodel.Mgid = Int32.Parse(Mgid); mmodel.Mitem = Mitem; mmodel.Mscore = Int32.Parse(DDLscore.SelectedValue); mmodel.Msort = Int32.Parse(DDLsort.SelectedValue); LearnSite.BLL.GaugeItem mbll = new LearnSite.BLL.GaugeItem(); mbll.Add(mmodel); System.Threading.Thread.Sleep(200); showGaugeItem(); TextBoxMitem.Text = ""; } else { LearnSite.Common.WordProcess.Alert("请输入评价描述!", this.Page); } } }
protected void GVGaugeItem_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Del") { string Mid = e.CommandArgument.ToString(); LearnSite.BLL.GaugeItem mbll = new LearnSite.BLL.GaugeItem(); mbll.Delete(Int32.Parse(Mid)); System.Threading.Thread.Sleep(200); showGaugeItem(); } }
private void showGaugeItem() { if (Request.QueryString["Gid"] != null) { string Mgid = Request.QueryString["Gid"].ToString(); LearnSite.BLL.GaugeItem mbll = new LearnSite.BLL.GaugeItem(); GVGaugeItem.DataSource = mbll.GetListMgid(Mgid); GVGaugeItem.DataBind(); int currentMsort = GVGaugeItem.Rows.Count + 1; DDLsort.SelectedValue = currentMsort.ToString(); } }
private void ShowSelf(int Fwid, string Fnum) { LearnSite.BLL.GaugeFeedback kbll = new LearnSite.BLL.GaugeFeedback(); string fselect = kbll.GetMyFeedback(Fwid, Fnum); if (fselect.EndsWith(",")) { fselect = fselect.Substring(0, fselect.Length - 1);//去最后的逗号 } //Response.Write("|"+fselect+"|"); if (!string.IsNullOrEmpty(fselect)) { LearnSite.BLL.GaugeItem gbll = new LearnSite.BLL.GaugeItem(); DataListSelf.DataSource = gbll.GetMySelfMitems(fselect); DataListSelf.DataBind(); } }
private void ShowGauge(string Wid) { ShowFeedback(Int32.Parse(Wid)); LearnSite.BLL.GaugeItem gbll = new LearnSite.BLL.GaugeItem(); string myMgid = LabelMgid.Text; if (string.IsNullOrEmpty(myMgid) || myMgid == "0") { //当活动中未指定互评评价标准时,自动选取相应作品类型中的第一条评价标准 DataListGauge.DataSource = gbll.GetListAutoGtype(LabelWtype.Text); DataListGauge.DataBind(); } else { DataListGauge.DataSource = gbll.GetListMgid(LabelMgid.Text); DataListGauge.DataBind(); } }
protected void GVGauge_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Del") { string Gid = e.CommandArgument.ToString(); LearnSite.BLL.GaugeItem mbll = new LearnSite.BLL.GaugeItem(); if (!mbll.ExistsMgid(Int32.Parse(Gid))) { LearnSite.BLL.Gauge gbll = new LearnSite.BLL.Gauge(); gbll.Delete(Int32.Parse(Gid)); System.Threading.Thread.Sleep(200); ShowGauge(); } else { LearnSite.Common.WordProcess.Alert("请先删除该评价标准下的内容项!", this.Page); } } }
protected void GVGaugeItem_RowUpdating(object sender, GridViewUpdateEventArgs e) { string mid = GVGaugeItem.DataKeys[GVGaugeItem.EditIndex][0].ToString(); string item = ((TextBox)(GVGaugeItem.Rows[e.RowIndex].FindControl("TextBoxMitem"))).Text.Trim(); string score = ((TextBox)(GVGaugeItem.Rows[e.RowIndex].FindControl("TextBoxMscore"))).Text.Trim(); if (LearnSite.Common.WordProcess.IsIntNum(score)) { LearnSite.Model.GaugeItem gmodel = new LearnSite.Model.GaugeItem(); gmodel.Mid = Int32.Parse(mid); gmodel.Mitem = item; gmodel.Mscore = Int32.Parse(score); LearnSite.BLL.GaugeItem gbll = new LearnSite.BLL.GaugeItem(); if (gbll.UpdateMitem(gmodel))//更新修改 { GVGaugeItem.EditIndex = -1; showGaugeItem(); } } else { LearnSite.Common.WordProcess.Alert("分值请输入数字!", this.Page); } }
private void ShowGauge(int Wmid) { LearnSite.BLL.GaugeItem gbll = new LearnSite.BLL.GaugeItem(); DataListGauge.DataSource = gbll.GetListMitems(Wmid); DataListGauge.DataBind(); }