public static int ToDb(MprObjTxtFld obj, string id_obj) { if (id_obj == null) { return Cfg.DbRpt.Insert(true, MprTblObj.TableName, MprTblObj.id_obj, MprTblObj.id_rpt_obj, obj.IDReport, MprTblObj.name_obj, obj.Name, MprTblObj.cat_obj, obj.Category.ToString(), MprTblObj.section_obj, obj.Section.ToString(), MprTblObj.index_obj, obj.Index, MprTblObj.printed_obj, obj.Printed, MprTblObj.type_obj, obj.Type.ToString(), MprTblObj.rotate_angle_obj, obj.RotateAngle, MprTblObj.value_txt_obj, obj.Text, MprTblObj.value_sql_obj, obj.TextSQL, MprTblObj.location_obj, UtlConvert.ToString(obj.Location), MprTblObj.size_obj, UtlConvert.ToString(obj.Size), MprTblObj.style_txt_obj, obj.TextStyle.ToString(), MprTblObj.shape_obj, obj.Shape.ToString(), MprTblObj.style_rect_obj, obj.RectangleStyle.ToString(), MprTblObj.style_ellp_obj, obj.EllipseStyle.ToString() ); } else { return Cfg.DbRpt.Update(true, MprTblObj.TableName, MprTblObj.id_obj, obj.ID, MprTblObj.id_rpt_obj, obj.IDReport, MprTblObj.name_obj, obj.Name, MprTblObj.cat_obj, obj.Category.ToString(), MprTblObj.section_obj, obj.Section.ToString(), MprTblObj.index_obj, obj.Index, MprTblObj.printed_obj, obj.Printed, MprTblObj.type_obj, obj.Type.ToString(), MprTblObj.rotate_angle_obj, obj.RotateAngle, MprTblObj.value_txt_obj, obj.Text, MprTblObj.value_sql_obj, obj.TextSQL, MprTblObj.location_obj, UtlConvert.ToString(obj.Location), MprTblObj.size_obj, UtlConvert.ToString(obj.Size), MprTblObj.style_txt_obj, obj.TextStyle.ToString(), MprTblObj.shape_obj, obj.Shape.ToString(), MprTblObj.style_rect_obj, obj.RectangleStyle.ToString(), MprTblObj.style_ellp_obj, obj.EllipseStyle.ToString() ); } }
public static MprObjTxtFld FromDbToIH(string id_obj) { MprObjTxtFld obj = new MprObjTxtFld(id_obj); obj.Location = UtlConvert.ToIH(obj.Location); obj.Size = UtlConvert.ToIH(obj.Size); return obj; }