Beispiel #1
0
        private void Child_Update(SortingTaskIssued sortingTaskIssued, MySqlConnection cn)
        {
            using (BypassPropertyChecks)
            {
                using (var cm = cn.CreateCommand())
                {
                    StringBuilder SQL = new StringBuilder();
                    SQL.Append("INSERT ");
                    SQL.Append("   INTO T_SORTINGTASKISSUEDDETAIL ");
                    SQL.Append("        ( ");
                    SQL.Append("            ID,TASKID,LINEBOXCODE,ADDRESSCODE,QTY ");
                    SQL.Append("        ) ");
                    SQL.Append("        VALUES ");
                    SQL.Append("        ( ");
                    SQL.Append("            @ID,@TASKID,@LINEBOXCODE,@ADDRESSCODE,@QTY ");
                    SQL.Append("        )");
                    cm.CommandText = SQL.ToString();

                    cm.Parameters.AddWithValue("@ID", ID);
                    cm.Parameters.AddWithValue("@TASKID", "");
                    cm.Parameters.AddWithValue("@LINEBOXCODE", LINEBOXCODE);
                    cm.Parameters.AddWithValue("@ADDRESSCODE", ADDRESSCODE);
                    cm.Parameters.AddWithValue("@QTY", QTY);
                    cm.ExecuteNonQuery();
                }
            }
        }
 protected void Child_Update(SortingTaskIssued sortingTaskIssued, MySqlTransaction tran)
 {
     foreach (SortingTaskIssuedDetail sortingTaskIssuedDetail in this)
     {
         sortingTaskIssuedDetail.Save(sortingTaskIssued, tran);
     }
 }
Beispiel #3
0
 public void Save(SortingTaskIssued sortingTaskIssued, MySqlTransaction cn)
 {
     DataPortal.UpdateChild(this, new object[] { sortingTaskIssued, cn });
 }