예제 #1
0
 public void InitYarnInfoByGkNo(DataTable dt)
 {
     qcYarnList = new QcyarndtlModelList();
     if (dt.Rows.Count == 0)
     {
         return;
     }
     for (int i = 0; i < dt.Rows.Count; i++)
     {
         QcyarndtlModel cm = new QcyarndtlModel();
         cm.YarnType      = dt.Rows[i]["Yarn_Type"].ToString();
         cm.YarnCount     = dt.Rows[i]["Yarn_Count"].ToString();
         cm.Threads       = dt.Rows[i]["Threads"].ToString() == "" ? 0 : Convert.ToInt32(dt.Rows[i]["Threads"]);
         cm.YarnRatio     = dt.Rows[i]["Yarn_Percent"].ToString() == "" ? 0 : Convert.ToDecimal(dt.Rows[i]["Yarn_Percent"]);
         cm.YarnComponent = dt.Rows[i]["Remark"].ToString();
         qcYarnList.Add(cm);
     }
 }
예제 #2
0
 public void InitYarnInfo(DataTable dt)
 {
     qcYarnList = new QcyarndtlModelList();
     if (dt.Rows.Count == 0)
     {
         return;
     }
     for (int i = 0; i < dt.Rows.Count; i++)
     {
         QcyarndtlModel cm = new QcyarndtlModel();
         cm.YarnType    = dt.Rows[i]["Yarn_Type"].ToString();
         cm.YarnCount   = dt.Rows[i]["Yarn_Count"].ToString();
         cm.Threads     = dt.Rows[i]["Threads"].ToString() == "" ? 0 : (int)dt.Rows[i]["Threads"];
         cm.YarnRatio   = dt.Rows[i]["Yarn_Ratio"].ToString() == "" ? 0 : (decimal)dt.Rows[i]["Yarn_Ratio"];
         cm.WarpWeft    = dt.Rows[i]["Warp_Weft"].ToString();
         cm.YarnDensity = dt.Rows[i]["Yarn_Density"].ToString() == "" ? 0 : (decimal)dt.Rows[i]["Yarn_Density"];
         qcYarnList.Add(cm);
     }
 }