Ejemplo n.º 1
0
 public TM03_PreProduct SetKneadingLine(TM03_PreProduct model)
 {
     if (model.F03_KneadingLine.Equals(((int)Constants.F39_KneadingLine.Megabit).ToString()))
     {
         model.F03_KneadingLine = ((int)Constants.KndLine.Megabit).ToString();
     }
     else
     {
         model.F03_KneadingLine = ((int)Constants.KndLine.Conventional).ToString();
     }
     return(model);
 }
Ejemplo n.º 2
0
 public TM03_PreProduct SetColorClass(TM03_PreProduct model)
 {
     if (model.F03_KneadingLine.Equals(((int)Constants.F39_KneadingLine.ConventionalC).ToString()))
     {
         model.F03_ColorClass = ((int)Constants.ColorClass.Color).ToString();
     }
     else
     {
         model.F03_ColorClass = ((int)Constants.ColorClass.Black).ToString();
     }
     if (model.F03_KneadingLine == "2")
     {
         model.F03_KneadingLine = "1";
     }
     return(model);
 }
Ejemplo n.º 3
0
        public void UpdateForSavePreProduct(TM03_PreProduct preProduct, bool isCreate)
        {
            var lstPreProductMaterial = GetAll()
                                        .Where(i => i.F02_PreProductCode.Trim().Equals(preProduct.F03_PreProductCode.Trim()));

            foreach (var tm02PrePdtMkp in lstPreProductMaterial)
            {
                tm02PrePdtMkp.F02_IsDraft = false;
                if (isCreate)
                {
                    tm02PrePdtMkp.F02_AddDate = preProduct.F03_AddDate;
                }
                else
                {
                    tm02PrePdtMkp.F02_UpdateDate = preProduct.F03_UpdateDate;
                }
                Update(tm02PrePdtMkp);
            }
        }