private void MapDM_Don_Vi_Tinh_Chuyen_Doi(DataRow p_row, CDM_Don_Vi_Tinh_Chuyen_Doi p_objDes) { DataTable p_dt = p_row.Table; if (p_dt.Columns.Contains("Auto_ID")) { p_objDes.Auto_ID = CUtility.Convert_To_Int64(p_row["Auto_ID"]); } if (p_dt.Columns.Contains("Don_Vi_Tinh_ID")) { p_objDes.Don_Vi_Tinh_ID = CUtility.Convert_To_Int64(p_row["Don_Vi_Tinh_ID"]); } if (p_dt.Columns.Contains("Hang_Hoa_ID")) { p_objDes.Hang_Hoa_ID = CUtility.Convert_To_Int64(p_row["Hang_Hoa_ID"]); } if (p_dt.Columns.Contains("Ty_Le_Chuyen_Doi")) { p_objDes.Ty_Le_Chuyen_Doi = CUtility.Convert_To_Int32(p_row["Ty_Le_Chuyen_Doi"]); } if (p_dt.Columns.Contains("Phep_Tinh_Chuyen_ID")) { p_objDes.Phep_Tinh_Chuyen_ID = CUtility.Convert_To_Int64(p_row["Phep_Tinh_Chuyen_ID"]); } if (p_dt.Columns.Contains("Mo_Ta")) { p_objDes.Mo_Ta = CUtility.Convert_To_String(p_row["Mo_Ta"]); } if (p_dt.Columns.Contains("Gia_Ban_Si")) { p_objDes.Gia_Ban_Si = CUtility.Convert_To_Double(p_row["Gia_Ban_Si"]); } if (p_dt.Columns.Contains("Gia_Ban_Le")) { p_objDes.Gia_Ban_Le = CUtility.Convert_To_Double(p_row["Gia_Ban_Le"]); } if (p_dt.Columns.Contains("Gia_Ban_Dac_Biet")) { p_objDes.Gia_Ban_Dac_Biet = CUtility.Convert_To_Double(p_row["Gia_Ban_Dac_Biet"]); } if (p_dt.Columns.Contains("Created")) { p_objDes.Created = CUtility.Convert_To_DateTime(p_row["Created"]); } if (p_dt.Columns.Contains("Created_By")) { p_objDes.Created_By = CUtility.Convert_To_String(p_row["Created_By"]); } if (p_dt.Columns.Contains("Last_Updated")) { p_objDes.Last_Updated = CUtility.Convert_To_DateTime(p_row["Last_Updated"]); } if (p_dt.Columns.Contains("Last_Updated_By")) { p_objDes.Last_Updated_By = CUtility.Convert_To_String(p_row["Last_Updated_By"]); } if (p_dt.Columns.Contains("Deleted")) { p_objDes.Deleted = CUtility.Convert_To_Bool(p_row["Deleted"]); } }
private void MapDM_Hang_Hoa(DataRow p_row, CDM_Hang_Hoa p_objDes) { DataTable p_dt = p_row.Table; if (p_dt.Columns.Contains("Auto_ID")) { p_objDes.Auto_ID = CUtility.Convert_To_Int64(p_row["Auto_ID"]); } if (p_dt.Columns.Contains("Ma_Hang_Hoa")) { p_objDes.Ma_Hang_Hoa = CUtility.Convert_To_String(p_row["Ma_Hang_Hoa"]); } if (p_dt.Columns.Contains("Ten_Hang_Hoa")) { p_objDes.Ten_Hang_Hoa = CUtility.Convert_To_String(p_row["Ten_Hang_Hoa"]); } if (p_dt.Columns.Contains("Don_Vi_Tinh_ID")) { p_objDes.Don_Vi_Tinh_ID = CUtility.Convert_To_Int64(p_row["Don_Vi_Tinh_ID"]); } if (p_dt.Columns.Contains("Ten_Don_Vi_Tinh")) { p_objDes.Ten_Don_Vi_Tinh = CUtility.Convert_To_String(p_row["Ten_Don_Vi_Tinh"]); } if (p_dt.Columns.Contains("Nhom_Hang_Hoa_ID")) { p_objDes.Nhom_Hang_Hoa_ID = CUtility.Convert_To_Int64(p_row["Nhom_Hang_Hoa_ID"]); } if (p_dt.Columns.Contains("Ten_Nhom_Hang")) { p_objDes.Ten_Nhom_Hang = CUtility.Convert_To_String(p_row["Ten_Nhom_Hang"]); } if (p_dt.Columns.Contains("Gia_Nhap")) { p_objDes.Gia_Nhap = CUtility.Convert_To_Double(p_row["Gia_Nhap"]); } if (p_dt.Columns.Contains("Gia_Ban_Si")) { p_objDes.Gia_Ban_Si = CUtility.Convert_To_Double(p_row["Gia_Ban_Si"]); } if (p_dt.Columns.Contains("Gia_Ban_Le")) { p_objDes.Gia_Ban_Le = CUtility.Convert_To_Double(p_row["Gia_Ban_Le"]); } if (p_dt.Columns.Contains("Gia_Ban_Dac_Biet")) { p_objDes.Gia_Ban_Dac_Biet = CUtility.Convert_To_Double(p_row["Gia_Ban_Dac_Biet"]); } if (p_dt.Columns.Contains("Gia_Ban_Tien_Mat")) { p_objDes.Gia_Ban_Tien_Mat = CUtility.Convert_To_Double(p_row["Gia_Ban_Tien_Mat"]); } if (p_dt.Columns.Contains("Gia_Ban_No")) { p_objDes.Gia_Ban_No = CUtility.Convert_To_Double(p_row["Gia_Ban_No"]); } if (p_dt.Columns.Contains("Nha_San_Xuat_ID")) { p_objDes.Nha_San_Xuat_ID = CUtility.Convert_To_Int64(p_row["Nha_San_Xuat_ID"]); } if (p_dt.Columns.Contains("Ten_Nha_San_Xuat")) { p_objDes.Ten_Nha_San_Xuat = CUtility.Convert_To_String(p_row["Ten_Nha_San_Xuat"]); } if (p_dt.Columns.Contains("Nguon_Goc")) { p_objDes.Nguon_Goc = CUtility.Convert_To_String(p_row["Nguon_Goc"]); } if (p_dt.Columns.Contains("Mo_Ta")) { p_objDes.Mo_Ta = CUtility.Convert_To_String(p_row["Mo_Ta"]); } if (p_dt.Columns.Contains("Created")) { p_objDes.Created = CUtility.Convert_To_DateTime(p_row["Created"]); } if (p_dt.Columns.Contains("Created_By")) { p_objDes.Created_By = CUtility.Convert_To_String(p_row["Created_By"]); } if (p_dt.Columns.Contains("Last_Updated")) { p_objDes.Last_Updated = CUtility.Convert_To_DateTime(p_row["Last_Updated"]); } if (p_dt.Columns.Contains("Last_Updated_By")) { p_objDes.Last_Updated_By = CUtility.Convert_To_String(p_row["Last_Updated_By"]); } if (p_dt.Columns.Contains("Deleted")) { p_objDes.Deleted = CUtility.Convert_To_Bool(p_row["Deleted"]); } }