private void Del_All(string insepect, string base_id) { if (insepect == "VMI") { vmi.Row_Del(" base_id='" + base_id + "' "); } else { DataRow[] rs = ft.Table.Select(" base_id='" + base_id + "' "); foreach (DataRow r in rs) { string ft_id = r["ft_id"].ToString(); S5.Row_Del("ft_id ='{" + ft_id + "}' "); } ft.Row_Del(" base_id='" + base_id + "' "); } //vmi del; lbase.Row_Del(" base_id='" + base_id + "' "); All_Bind(); }
private void Copy_To_ft(string guid) { string get_ft = string.Format(" base_id='{0}' ", guid); DataRow[] all_ft = ft.Table.Select(get_ft); foreach (DataRow r in all_ft) { string ft_id = r["ft_id"].ToString(); string get_s5 = string.Format(" ft_id='{0}' ", ft_id); DataRow[] s5_row = S5.Table.Select(get_s5); if (s5_row.Length > 0) //要有S5才可以新增ft { foreach (DataRow s in s5_row) { ft_S5.Table.ImportRow(s); } S5.Row_Del(get_s5); r["base_id"] = base_id.Value; //新資料的base_id t_ft.Table.ImportRow(r); r["base_id"] = guid;//回恢原資料; } } ft.Row_Del(get_ft); Ft_Bind(); lbase.Row_Del(" base_id='" + guid + "' "); All_Bind(); }