Exemplo n.º 1
0
 /// <summary>
 /// 修改规章制度 是否采用
 /// </summary>
 /// <param name="rulesRegulations"></param>
 public static void UpdateRulesRegulationsIsPass(Model.Law_RulesRegulations rulesRegulations)
 {
     Model.SUBHSSEDB            db = Funs.DB;
     Model.Law_RulesRegulations newRuleRegulations = db.Law_RulesRegulations.FirstOrDefault(e => e.RulesRegulationsId == rulesRegulations.RulesRegulationsId);
     if (newRuleRegulations != null)
     {
         newRuleRegulations.AuditMan  = rulesRegulations.AuditMan;
         newRuleRegulations.AuditDate = rulesRegulations.AuditDate;
         newRuleRegulations.IsPass    = rulesRegulations.IsPass;
         db.SubmitChanges();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// 修改规章制度
 /// </summary>
 /// <param name="rulesRegulations"></param>
 public static void UpdateRulesRegulations(Model.Law_RulesRegulations rulesRegulations)
 {
     Model.SUBHSSEDB            db = Funs.DB;
     Model.Law_RulesRegulations newRuleRegulations = db.Law_RulesRegulations.FirstOrDefault(e => e.RulesRegulationsId == rulesRegulations.RulesRegulationsId);
     if (newRuleRegulations != null)
     {
         newRuleRegulations.RulesRegulationsCode   = rulesRegulations.RulesRegulationsCode;
         newRuleRegulations.RulesRegulationsName   = rulesRegulations.RulesRegulationsName;
         newRuleRegulations.RulesRegulationsTypeId = rulesRegulations.RulesRegulationsTypeId;
         newRuleRegulations.CustomDate             = rulesRegulations.CustomDate;
         newRuleRegulations.ApplicableScope        = rulesRegulations.ApplicableScope;
         newRuleRegulations.Remark    = rulesRegulations.Remark;
         newRuleRegulations.AttachUrl = rulesRegulations.AttachUrl;
         newRuleRegulations.UpState   = rulesRegulations.UpState;
         db.SubmitChanges();
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// 根据主键删除规章制度
        /// </summary>
        /// <param name="ruleRegulationsId"></param>
        public static void DeleteRuleRegulationsById(string ruleRegulationsId)
        {
            Model.SUBHSSEDB            db = Funs.DB;
            Model.Law_RulesRegulations rulesRegulations = db.Law_RulesRegulations.FirstOrDefault(e => e.RulesRegulationsId == ruleRegulationsId);
            if (rulesRegulations != null)
            {
                if (!string.IsNullOrEmpty(rulesRegulations.AttachUrl))
                {
                    BLL.UploadFileService.DeleteFile(Funs.RootPath, rulesRegulations.AttachUrl);//删除附件
                }
                ////删除附件表
                BLL.CommonService.DeleteAttachFileById(rulesRegulations.RulesRegulationsId);

                db.Law_RulesRegulations.DeleteOnSubmit(rulesRegulations);
                db.SubmitChanges();
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// 添加生产规章制度
 /// </summary>
 /// <param name="rulesRegulations"></param>
 public static void AddRulesRegulations(Model.Law_RulesRegulations rulesRegulations)
 {
     Model.SUBHSSEDB            db = Funs.DB;
     Model.Law_RulesRegulations newRuleRegulations = new Model.Law_RulesRegulations
     {
         RulesRegulationsId     = rulesRegulations.RulesRegulationsId,
         RulesRegulationsCode   = rulesRegulations.RulesRegulationsCode,
         RulesRegulationsName   = rulesRegulations.RulesRegulationsName,
         RulesRegulationsTypeId = rulesRegulations.RulesRegulationsTypeId,
         CustomDate             = rulesRegulations.CustomDate,
         ApplicableScope        = rulesRegulations.ApplicableScope,
         Remark      = rulesRegulations.Remark,
         AttachUrl   = rulesRegulations.AttachUrl,
         IsPass      = rulesRegulations.IsPass,
         CompileMan  = rulesRegulations.CompileMan,
         CompileDate = rulesRegulations.CompileDate,
         UnitId      = rulesRegulations.UnitId,
         UpState     = rulesRegulations.UpState
     };
     db.Law_RulesRegulations.InsertOnSubmit(newRuleRegulations);
     db.SubmitChanges();
 }