예제 #1
0
 public static MprObjEllp FromDbToIH(string id_obj)
 {
     MprObjEllp obj = new MprObjEllp(id_obj);
     obj.Location = UtlConvert.ToIH(obj.Location);
     obj.Size = UtlConvert.ToIH(obj.Size);
     return obj;
 }
예제 #2
0
        public static int ToDb(MprObjEllp 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.Location),
                    MprTblObj.size_obj, UtlConvert.ToString(obj.Size),
                    MprTblObj.style_ellp_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.Location),
                    MprTblObj.size_obj, UtlConvert.ToString(obj.Size),
                    MprTblObj.style_ellp_obj, obj.Style.ToString()
                    );
            }
        }