Beispiel #1
0
        public bool AddOrUpdateDetail(string key,Bse_Feedback main, List<Bse_FeedDetail> list)
        {
            List<Bse_FeedDetail> oldlist = GetFeedDetailList(main.FB_Code);
            foreach (var d in oldlist)
            {
                var temp = list.FirstOrDefault(o => o.FBI_DCode == d.FBI_DCode && o.FBI_itype == d.FBI_itype);
                if (temp != null)
                {
                    temp.FBI_ID = d.FBI_ID;
                    UpdateFeedDetail(temp);
                    list.Remove(temp);
                }
                else
                {
                    DeleteFeedDetail(d);
                }
            }

            foreach (var o in list)
            {
                AddFeedDetail(o);
            }

            return true ;
        }
Beispiel #2
0
        public bool AddFeedBack(Bse_Feedback model)
        {
            if (fbInstance.Add(model) > 0)
            {
                return true;
            }

            return false;
        }
Beispiel #3
0
        public bool DeleteFeedBack(Bse_Feedback model)
        {
            model.Stat = 1;
            if (fbInstance.Update(model) > 0)
            {
                return true;
            }

            return false;
        }
Beispiel #4
0
        public bool AddFeedBackModel(Bse_Feedback model)
        {
            model.AuditStat = OperationTypeEnum.AudtiOperaTypeEnum.Auditing.ToString();
            var item = auInstance.GetVerifyTemplateFirstNode(OperationTypeEnum.AuditTemplateEnum.FeedbackAudit.ToString());
            if (item != null)
            {
                model.AuditCurAudit = item.VT_VerifyNode_Code;
                auInstance.InsertNextAuditRecord(OperationTypeEnum.AuditTemplateEnum.FeedbackAudit.ToString(), item.VT_VerifyNode_Code, model.FB_Code);
            }

            return AddFeedBack(model);
        }
Beispiel #5
0
        public bool UpdateFeedBack(Bse_Feedback model)
        {
            if (fbInstance.Update(model) > 0)
            {
                return true;
            }

            return false;
        }