/// <summary> /// 添加评价 /// </summary> /// <param name="recordsId">recordsId</param> /// <param name="content">content</param> /// <param name="attitude">attitude</param> /// <param name="speed">speed</param> /// <param name="quality">quality</param> public void addevaluation(int recordsId, string unitid, string content, int attitude, int speed, int quality) { AutoRepair.Entity.tb_EvaluateEntity model = new AutoRepair.Entity.tb_EvaluateEntity(); try { model.RecordsId = recordsId; model.UnitID = unitid; model.AssessCount = content; model.Speed = speed; model.Attitude = attitude; model.Quality = quality; model.Type = 1; model.Status = 1; model.AddTime = DateTime.Now; model.AssessCount2 = ""; model.AddTime2 = DateTime.Now; AutoRepair.BLL.tb_EvaluateBLL.GetInstance().Insert(model); Response.Write(1); } catch (Exception ex) { Jnwf.Utils.Log.Logger.Log4Net.Error("PerfectInfor:" + ex.Data + "|" + ex.Message); Response.Write(-1); } }
protected void Page_Load(object sender, EventArgs e) { AutoRepair.Entity.tb_EvaluateEntity ee = AutoRepair.BLL.tb_EvaluateBLL.GetInstance().Gettb_EvaluateById(id); if (ee != null) { AssessCount = ee.AssessCount.ToString(); //评价 AddTime = DateTime.Parse(ee.AddTime.ToString()); //评价时间 AssessCount2 = ee.AssessCount2.ToString(); //追加评价 AddTime2 = DateTime.Parse(ee.AddTime2.ToString()); //追加评价时间 n = 1; } else { n = 0; } }
//追加评价 public void AppendEvaluation(int AssessId, string content) { AutoRepair.Entity.tb_EvaluateEntity model = AutoRepair.BLL.tb_EvaluateBLL.GetInstance().GetAdminSingle(AssessId); try { if (model != null) { model.AssessCount2 = content; model.AddTime2 = DateTime.Now; model.Type = 2; AutoRepair.BLL.tb_EvaluateBLL.GetInstance().Update(model); Response.Write(1); } else { Response.Write(-1); } } catch (Exception ex) { Jnwf.Utils.Log.Logger.Log4Net.Error("PerfectInfor:" + ex.Data + "|" + ex.Message); Response.Write(-1); } }