예제 #1
0
 public bool UpdateBeamCutSeq(BeamCutSeq beamCutSeq)
 {
     try
     {
         using (BeamCutContext = new BeamCutContext(database))
         {
             BeamCutContext.Entry(beamCutSeq).State = EntityState.Modified;
             BeamCutContext.SaveChanges();
             return(true);
         }
     }
     catch { return(false); }
 }
예제 #2
0
        public int[] GetTotalSelectSequenceQty(BeamCutSeq seq1, BeamCutSeq seq2)
        {
            int total    = 0;
            int totalCut = 0;

            try
            {
                var po = GetBeamCutPo(ShareFuncs.GetInt(seq1.BeamCutPo_Id));
                if (po == null)
                {
                    return(null);
                }
                foreach (var item in po.BeamCutSeqs)
                {
                    if (item.SequenceNo >= seq1.SequenceNo && item.SequenceNo <= seq2.SequenceNo)
                    {
                        total    += ShareFuncs.GetInt(item.SequenceQty);
                        totalCut += ShareFuncs.GetInt(item.CutQty);
                    }
                }
                return(new int[] { total, totalCut });
            }
            catch { return(null); }
        }