private GD_HANG convert_to_entity_insert(BO_HANG ip_obj_bo) { GD_HANG obj_result = new GD_HANG(); obj_result.BARCODE = ip_obj_bo.BARCODE; obj_result.GIA_NHAP = ip_obj_bo.GIA_NHAP; obj_result.GIA_XUAT_DE_XUAT = ip_obj_bo.GIA_XUAT_DE_XUAT; obj_result.ID = ip_obj_bo.ID; obj_result.ID_MAT_HANG = ip_obj_bo.ID_MAT_HANG; obj_result.ID_TRANG_THAI = Convert.ToInt64(ReadDataConfig.ReadByKey("NHAP_KHO").ToString()); obj_result.IsDeleted = false; obj_result.ObjectState = MODEL.Common.ObjectState.Added; obj_result.THOI_GIAN_BAO_HANH = ip_obj_bo.THOI_GIAN_BAO_HANH; obj_result.NGAY_NHAT_HANG = ip_obj_bo.NGAY_NHAP_HANG; obj_result.ID_KHO = ip_obj_bo.ID_KHO; return obj_result; }
private BO_HANG convert_to_BO(GD_HANG entity) { BO_HANG output = new BO_HANG(); output.BARCODE = entity.BARCODE; output.GIA_NHAP = entity.GIA_NHAP; output.GIA_XUAT_DE_XUAT = entity.GIA_XUAT_DE_XUAT; output.ID = entity.ID; output.ID_MAT_HANG = entity.ID_MAT_HANG; output.THOI_GIAN_BAO_HANH = entity.THOI_GIAN_BAO_HANH; output.NGAY_NHAP_HANG = entity.NGAY_NHAT_HANG; output.ID_KHACH_HANG = entity.ID_KHACH_HANG; output.ID_KHACH_HANG = entity.ID_KHACH_HANG; output.THOI_GIAN_BAT_DAU_BAO_HANH = entity.NGAY_BAT_DAU_BAO_HANH; output.THOI_GIAN_KET_THUC_BAO_HANH = entity.NGAY_KET_THUC_BAO_HANH; output.SO_LAN_BAO_HANH = entity.SO_LAN_BAO_HANH; output.ID_KHO = entity.ID_KHO; output.NGAY_NHAP_HANG = entity.NGAY_NHAT_HANG; output.NGAY_XUAT_HANG = entity.NGAY_XUAT_HANG; output.NGAY_BAT_DAU_BAO_HANH = entity.NGAY_BAT_DAU_BAO_HANH; output.NGAY_KET_THUC_BAO_HANH = entity.NGAY_KET_THUC_BAO_HANH; return output; }