public bool AddQuoteTmpl(sys_form_tmpl tmpl, sys_form_tmpl_quote tmplQuote, long userId) { if (!AddFormTmpl(tmpl, userId)) { return(false); } tmplQuote.id = _dal.GetNextIdCom(); tmplQuote.form_tmpl_id = tmpl.id; tmplQuote.create_time = Tools.Date.DateHelper.ToUniversalTimeStamp(DateTime.Now); tmplQuote.create_user_id = userId; tmplQuote.update_time = Tools.Date.DateHelper.ToUniversalTimeStamp(DateTime.Now); tmplQuote.update_user_id = userId; new sys_form_tmpl_quote_dal().Insert(tmplQuote); OperLogBLL.OperLogAdd <sys_form_tmpl_quote>(tmplQuote, tmplQuote.id, userId, OPER_LOG_OBJ_CATE.SYS_FORM_TMPL_QUOTE, ""); return(true); }
public bool EditQuoteTmpl(sys_form_tmpl tmpl, sys_form_tmpl_quote tmplQuote, long userId) { sys_form_tmpl_quote_dal sftqDal = new sys_form_tmpl_quote_dal(); var oldtmplQuote = sftqDal.FindNoDeleteById(tmplQuote.id); if (oldtmplQuote == null) { return(false); } if (!EditFormTmpl(tmpl, userId)) { return(false); } tmplQuote.update_time = Tools.Date.DateHelper.ToUniversalTimeStamp(DateTime.Now); tmplQuote.update_user_id = userId; sftqDal.Update(tmplQuote); OperLogBLL.OperLogUpdate <sys_form_tmpl_quote>(tmplQuote, oldtmplQuote, tmplQuote.id, userId, OPER_LOG_OBJ_CATE.SYS_FORM_TMPL_QUOTE, ""); return(true); }