Exemplo n.º 1
0
 public static MprObjLine FromDbToIH(string id_obj)
 {
     MprObjLine obj = new MprObjLine(id_obj);
     obj.Point1 = UtlConvert.ToIH(obj.Point1);
     obj.Point2 = UtlConvert.ToIH(obj.Point2);
     return obj;
 }
Exemplo n.º 2
0
        public static int ToDb(MprObjLine 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.location_obj, UtlConvert.ToString(obj.Point1),
                    MprTblObj.size_obj, UtlConvert.ToString(obj.Point2),
                    MprTblObj.style_pen_obj, obj.Style.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.location_obj, UtlConvert.ToString(obj.Point1),
                    MprTblObj.size_obj, UtlConvert.ToString(obj.Point2),
                    MprTblObj.style_pen_obj, obj.Style.ToString()
                    );
            }
        }