Ejemplo n.º 1
0
 /// <summary>
 /// 删除人工时和投入安全费用比率信息
 /// </summary>
 /// <param name="months"></param>
 public static void DeleteCostAnalyseByMonths(DateTime?months)
 {
     Model.SUBHSSEDB           db          = Funs.DB;
     Model.Manager_CostAnalyse costAnalyse = db.Manager_CostAnalyse.First(e => e.Months == months);
     db.Manager_CostAnalyse.DeleteOnSubmit(costAnalyse);
     db.SubmitChanges();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 删除人工时和投入安全费用比率信息
 /// </summary>
 /// <param name="costAnalyseId"></param>
 public static void DeleteCostAnalyse(string analyseId)
 {
     Model.SUBHSSEDB           db          = Funs.DB;
     Model.Manager_CostAnalyse costAnalyse = db.Manager_CostAnalyse.First(e => e.AnalyseId == analyseId);
     db.Manager_CostAnalyse.DeleteOnSubmit(costAnalyse);
     db.SubmitChanges();
 }
Ejemplo n.º 3
0
        /// <summary>
        /// 修改人工时和投入安全费用比率信息
        /// </summary>
        /// <param name="costAnalyseId"></param>
        /// <param name="costAnalyseName"></param>
        /// <param name="def"></param>
        public static void UpdateCostAnalyse(Model.Manager_CostAnalyse costAnalyse)
        {
            Model.SUBHSSEDB           db             = Funs.DB;
            Model.Manager_CostAnalyse newCostAnalyse = db.Manager_CostAnalyse.First(e => e.AnalyseId == costAnalyse.AnalyseId);
            newCostAnalyse.Months             = costAnalyse.Months;
            newCostAnalyse.Analyse            = costAnalyse.Analyse;
            newCostAnalyse.TotalRealCostMoney = costAnalyse.TotalRealCostMoney;
            newCostAnalyse.Manhours           = costAnalyse.Manhours;

            db.SubmitChanges();
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 添加人工时和投入安全费用比率信息
        /// </summary>
        /// <param name="costAnalyseName"></param>
        /// <param name="def"></param>
        public static void AddCostAnalyse(Model.Manager_CostAnalyse costAnalyse)
        {
            Model.SUBHSSEDB db       = Funs.DB;
            string          newKeyID = SQLHelper.GetNewID(typeof(Model.Manager_CostAnalyse));

            Model.Manager_CostAnalyse newCostAnalyse = new Model.Manager_CostAnalyse
            {
                AnalyseId          = newKeyID,
                ProjectId          = costAnalyse.ProjectId,
                Months             = costAnalyse.Months,
                TotalRealCostMoney = costAnalyse.TotalRealCostMoney,
                Manhours           = costAnalyse.Manhours,
                Analyse            = costAnalyse.Analyse
            };

            db.Manager_CostAnalyse.InsertOnSubmit(newCostAnalyse);
            db.SubmitChanges();
        }