Пример #1
0
        ///<summary>No need to surround with try/catch, because all deletions are allowed.</summary>
        public static void Delete(int mountDefNum)
        {
            string command = "DELETE FROM mountdef WHERE MountDefNum=" + POut.PInt(mountDefNum);

            General2.NonQ(command);
            command = "DELETE FROM mountitemdef WHERE MountDefNum =" + POut.PInt(mountDefNum);
            General2.NonQ(command);
        }
Пример #2
0
        ///<summary></summary>
        public static void Delete(Document doc)
        {
            string command = "DELETE from document WHERE DocNum = '" + doc.DocNum.ToString() + "'";

            General2.NonQ(command);
            command = "DELETE from docattach WHERE DocNum = '" + doc.DocNum.ToString() + "'";
            General2.NonQ(command);
        }
Пример #3
0
        ///<summary></summary>
        public static void Insert(MountDef def)
        {
            string command = "INSERT INTO mountdef (Description,ItemOrder,IsRadiograph,Width,Height"
                             + ") VALUES("
                             + "'" + POut.PString(def.Description) + "', "
                             + "'" + POut.PInt(def.ItemOrder) + "', "
                             + "'" + POut.PBool(def.IsRadiograph) + "', "
                             + "'" + POut.PInt(def.Width) + "', "
                             + "'" + POut.PInt(def.Height) + "')";

            def.MountDefNum = General2.NonQ(command, true);
        }
Пример #4
0
        ///<summary></summary>
        public static void Update(MountDef def)
        {
            string command = "UPDATE mountdef SET "
                             + "Description = '" + POut.PString(def.Description) + "'"
                             + ",ItemOrder = '" + POut.PInt(def.ItemOrder) + "'"
                             + ",IsRadiograph = '" + POut.PBool(def.IsRadiograph) + "'"
                             + ",Width = '" + POut.PInt(def.Width) + "'"
                             + ",Height = '" + POut.PInt(def.Height) + "'"
                             + " WHERE MountDefNum  ='" + POut.PInt(def.MountDefNum) + "'";

            General2.NonQ(command);
        }
Пример #5
0
        ///<summary></summary>
        public static void Insert(MountItemDef def)
        {
            string command = "INSERT INTO mountitemdef (MountDefNum,Xpos,Ypos,Width,Height"
                             + ") VALUES("
                             + "'" + POut.PInt(def.MountDefNum) + "', "
                             + "'" + POut.PInt(def.Xpos) + "', "
                             + "'" + POut.PInt(def.Ypos) + "', "
                             + "'" + POut.PInt(def.Width) + "', "
                             + "'" + POut.PInt(def.Height) + "')";

            def.MountItemDefNum = General2.NonQ(command, true);
        }
Пример #6
0
        ///<summary></summary>
        public static void Update(MountItemDef def)
        {
            string command = "UPDATE mountitemdef SET "
                             + "MountDefNum = '" + POut.PInt(def.MountDefNum) + "'"
                             + ",Xpos = '" + POut.PInt(def.Xpos) + "'"
                             + ",Ypos = '" + POut.PInt(def.Ypos) + "'"
                             + ",Width = '" + POut.PInt(def.Width) + "'"
                             + ",Height = '" + POut.PInt(def.Height) + "'"
                             + " WHERE MountItemDefNum  ='" + POut.PInt(def.MountItemDefNum) + "'";

            General2.NonQ(command);
        }