public Row_in_kart_defect(Row_in_kart_defect prow) { par = prow.par; nom_sz = prow.Nom_sz; cherch = prow.Cherch; n_nomer = prow.N_nomer; naim = prow.Naim; kolvo = prow.Kolvo; }
static Row_in_kart_defect FillRowFromTable(DataRow DR, Row_in_kart_defect row) { row.Id = Convert.ToInt32(DR["id"]); if (DR["par"] != DBNull.Value) { row.Par = Convert.ToInt32(DR["par"]); } row.Nom_sz = DR["nom_sz"].ToString(); if (DR["cherch"] != DBNull.Value) { row.Cherch = DR["cherch"].ToString(); } if (DR["n_nomer"] != DBNull.Value) { row.N_nomer = DR["n_nomer"].ToString(); } if (DR["naim"] != DBNull.Value) { row.Naim = DR["naim"].ToString(); } row.Kolvo = float.Parse(DR["kolvo"].ToString()); if (DR["nom_ceh"] != DBNull.Value) { row.Nom_ceh = Convert.ToInt32(DR["nom_ceh"]); } if (DR["nom_kart"] != DBNull.Value) { row.Nom_kart = Convert.ToInt32(DR["nom_kart"]); } if (DR["opis_def"] != DBNull.Value) { row.Opis_def = Convert.ToInt32(DR["opis_def"]); } if (DR["opis_def_komment"] != DBNull.Value) { row.Opis_def_komment = DR["opis_def_komment"].ToString(); } if (DR["prich"] != DBNull.Value) { row.Prich = Convert.ToInt32(DR["prich"]); } if (DR["prich_komment"] != DBNull.Value) { row.Prich_komment = DR["prich_komment"].ToString(); } if (DR["met_opr"] != DBNull.Value) { row.Met_opr = Convert.ToInt32(DR["met_opr"]); } if (DR["met_opr_komment"] != DBNull.Value) { row.Met_opr_komment = DR["met_opr_komment"].ToString(); } if (DR["teh_treb"] != DBNull.Value) { row.Teh_treb = Convert.ToInt32(DR["teh_treb"]); } if (DR["teh_treb_komment"] != DBNull.Value) { row.Teh_treb_komment = DR["teh_treb_komment"].ToString(); } if (DR["spos_ustr"] != DBNull.Value) { row.Spos_ustr = Convert.ToInt32(DR["spos_ustr"]); } if (DR["spos_ustr_komment"] != DBNull.Value) { row.Spos_ustr_komment = DR["spos_ustr_komment"].ToString(); } if (DR["data_post"] != DBNull.Value) { row.Data_post = DR["data_post"].ToString().Substring(0, 10); } if (DR["data_def"] != DBNull.Value) { row.Data_def = DR["data_def"].ToString().Substring(0, 10); } if (DR["izgotov"] != DBNull.Value) { row.Izgotov = Convert.ToInt32(DR["izgotov"]); } if (DR["prim"] != DBNull.Value) { row.Prim = DR["prim"].ToString(); } row.IsFaster = Convert.ToBoolean(DR["is_faster"]); return(row); }
static DataRow FillRowInTable(Row_in_kart_defect row, DataRow DR) { DR["id"] = row.Id; if (row.Par != 0) { DR["par"] = row.Par; } DR["nom_sz"] = row.Nom_sz; if (row.Cherch != null) { DR["cherch"] = row.Cherch; } if (row.N_nomer != null) { DR["n_nomer"] = row.N_nomer; } if (row.Naim != null) { DR["naim"] = row.Naim; } DR["kolvo"] = row.Kolvo; if (row.Nom_ceh != 0) { DR["nom_ceh"] = row.Nom_ceh; } if (row.Opis_def != -1) { DR["opis_def"] = row.Opis_def; } if (row.Opis_def_komment != null) { DR["opis_def_komment"] = row.Opis_def_komment; } if (row.Prich != -1) { DR["prich"] = row.Prich; } if (row.Prich_komment != null) { DR["prich_komment"] = row.Prich_komment; } if (row.Met_opr != -1) { DR["met_opr"] = row.Met_opr; } if (row.Met_opr_komment != null) { DR["met_opr_komment"] = row.Met_opr_komment; } if (row.Teh_treb != -1) { DR["teh_treb"] = row.Teh_treb; } if (row.Teh_treb_komment != null) { DR["teh_treb_komment"] = row.Teh_treb_komment; } if (row.Spos_ustr != -1) { DR["spos_ustr"] = row.Spos_ustr; } if (row.Spos_ustr_komment != null) { DR["spos_ustr_komment"] = row.Spos_ustr_komment; } if (row.Data_def != null) { DR["data_def"] = Convert.ToDateTime(row.Data_def); } if (row.Izgotov != 0) { DR["izgotov"] = row.Izgotov; } if (row.Prim != null) { DR["prim"] = row.Prim; } DR["is_faster"] = row.IsFaster; return(DR); }