Ejemplo n.º 1
0
		///<summary></summary>
		public static void Update(MountDef def) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				Meth.GetVoid(MethodBase.GetCurrentMethod(),def);
				return;
			}
			Crud.MountDefCrud.Update(def);
		}
Ejemplo n.º 2
0
		///<summary></summary>
		public static long Insert(MountDef def) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				def.MountDefNum=Meth.GetLong(MethodBase.GetCurrentMethod(),def);
				return def.MountDefNum;
			}
			return Crud.MountDefCrud.Insert(def);
		}
Ejemplo n.º 3
0
		///<summary></summary>
		public FormMountDefEdit(MountDef mountDefCur)
		{
			//
			// Required for Windows Form Designer support
			//
			MountDefCur=mountDefCur;
			InitializeComponent();
			Lan.F(this);
		}
Ejemplo n.º 4
0
 ///<summary></summary>
 public static void Update(MountDef def)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         Meth.GetVoid(MethodBase.GetCurrentMethod(), def);
         return;
     }
     Crud.MountDefCrud.Update(def);
 }
Ejemplo n.º 5
0
 ///<summary></summary>
 public static long Insert(MountDef def)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         def.MountDefNum = Meth.GetLong(MethodBase.GetCurrentMethod(), def);
         return(def.MountDefNum);
     }
     return(Crud.MountDefCrud.Insert(def));
 }
Ejemplo n.º 6
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);
        }
Ejemplo n.º 7
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);
        }
Ejemplo n.º 8
0
        ///<summary></summary>
        public MountDef Copy()
        {
            MountDef m = new MountDef();

            m.MountDefNum  = MountDefNum;
            m.Description  = Description;
            m.ItemOrder    = ItemOrder;
            m.IsRadiograph = IsRadiograph;
            m.Width        = Width;
            m.Height       = Height;
            return(m);
        }
Ejemplo n.º 9
0
        ///<summary>Gets a list of all MountDefs when program first opens.  Also refreshes MountItemDefs and attaches all items to the appropriate mounts.</summary>
        public static void Refresh()
        {
            MountItemDefs.Refresh();
            string    command = "SELECT * FROM mountdef ORDER BY ItemOrder";
            DataTable table   = General2.GetTable(command);

            Listt = new List <MountDef>();
            MountDef mount;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                mount              = new MountDef();
                mount.MountDefNum  = PIn.PInt(table.Rows[i][0].ToString());
                mount.Description  = PIn.PString(table.Rows[i][1].ToString());
                mount.ItemOrder    = PIn.PInt(table.Rows[i][2].ToString());
                mount.IsRadiograph = PIn.PBool(table.Rows[i][3].ToString());
                mount.Width        = PIn.PInt(table.Rows[i][4].ToString());
                mount.Height       = PIn.PInt(table.Rows[i][5].ToString());
                Listt.Add(mount);
            }
        }
Ejemplo n.º 10
0
		private void butAdd_Click(object sender, System.EventArgs e) {
			MountDef mount=new MountDef();
			FormMountDefEdit FormM=new FormMountDefEdit(mount);
			FormM.IsNew=true;
			FormM.ShowDialog();
			FillList();
			changed=true;
		}