private void DoEvaluation() { if (Request.Form["evalue"] == null || Request.Form["evalData"] == null) { Response.Write("false"); return; } short eval = Convert.ToInt16(Request.Form["evalue"]); string data = Request.Form["evalData"].Trim(); NameValueCollection nc = CrypticString.GetQueryString(data); string email = nc["email"] == null ? "" : nc["email"]; int comid = nc["comid"] == null ? 0 : Convert.ToInt32(nc["comid"]); int caseId = nc["caseid"] == null ? 0 : Convert.ToInt32(nc["caseid"]); CurrentCase = CompanyCase.Get(caseId, comid); { if (CurrentCase != null) { SupplierEvaluation spEval = new SupplierEvaluation(EvaluationType.Case, comid, caseId, eval, email, false); bool bln = spEval.Save(); //����ϵͳ��Ϣ MailTempItem msgTemp = MailTemplates.GetTemplate("msg_sp_case_evaluated"); Message msg = new Message(MessageType.SystemNotice); msg.CompanyId = comid; msg.Priority = MessagePriority.Normal; msg.Title = String.Format(msgTemp.Subject, email, CurrentCase.Title); msg.Body = String.Format(msgTemp.Body, email, CurrentCase.Title); msg.Save(); } } Response.Write("true"); }
public override void Save() { bool saveToDB = SaveRecord(); bool saveEval = false; if (saveToDB) { //�������� SupplierEvaluation eval = new SupplierEvaluation(EvaluationType.Lead, selectedSupplier, LeadId, score_s, score_r, score_q, score_v, BuyerEmail, isRecommend); saveEval=eval.Save(); } if (saveEval) { base.Save(); XmlNode spRootNode = xmlDoc.DocumentElement.SelectSingleNode("Suppliers"); XmlNode node = xmlDoc.CreateElement("Supplier"); node.Attributes["id"].Value = selectedSupplier.ToString(); node.Attributes["scoreQ"].Value = score_q.ToString(); node.Attributes["scoreS"].Value = score_s.ToString(); node.Attributes["scoreV"].Value = score_v.ToString(); node.Attributes["scoreR"].Value = score_r.ToString(); node.SelectSingleNode("Remark").FirstChild.Value = remark; spRootNode.AppendChild(node); xmlDoc.Save(xmlDocSavePath + Type + "\\" + Guid + ".xml"); } }
public bool Save() { if (SaveRecord()) { //�������� foreach (string id in suppliers.Keys) { FeedBackSupplierItem item=(FeedBackSupplierItem)suppliers[id]; if (item.IsContacted || item.IsSelected) { SupplierEvaluation eval = new SupplierEvaluation(EvaluationType.Lead, item.SupplierId, LeadId, item.ScoreS, item.ScoreR, item.ScoreQ, item.ScoreV, BuyerEmail, item.IsRecommend); eval.Save(); } } //�����������ݵ�XML xmlDoc.Save(xmlDocSavePath + Type + "\\" + Guid + ".xml"); return true; } return false; }