rivate System.Windows.Forms.Panel pnlStorage;
private System.Windows.Forms.Label lbMaterials;
private System.Windows.Forms.Button btAdmin;
}System;System.Collections.Generic;System.ComponentModel;System.Data;System.Drawing;System.Linq;System.Text;System.Threading.Tasks;System.Windows.Forms;Storage_Coursework
{
public partial class FormMatCount: Form
{
private Storage_Coursework.Objects.Material material;
private int matCount;
private int delta;
private int total; int Total
{{return total; }
{= value; .Text=total + + Material.MaterialMeasure;
} event EventHandler CountChanged; FormMatCount (Storage_Coursework.Objects.Material m, int d)
{();=m;=material.StorageCount;=d;
} void FormMatCount_Load (object sender, EventArgs e)
{();
} void SetupControls ()
{. Text=matCount + + Material.MaterialMeasure; .Text=txtCount.Text; .ValueChanged +=nudInOut_ValueChanged; (delta gt; 0)
{
this.Text= Додати матеріал raquo ;;
lbInOut.Text= Введення на склад raquo ;;
lbTotal.Text= Стане raquo ;;
}
else
{
this.Text= Вивести матеріал raquo ;;
lbInOut.Text= Висновок зі складу raquo ;;
lbTotal.Text= Залишиться raquo ;;
} nudInOut_ValueChanged (object sender, EventArgs e)
{(delta gt; 0)
{= matCount + (int) nudInOut.Value;
}
{((int) nudInOut.Value gt; matCount) .Value=matCount;=matCount - (int) nudInOut.Value;
} void btOk_Click (object sender, EventArgs e)
{((int) nudInOut.Value!=0)
{
Storage_Coursework.Providers.MaterialProvider.UpdateMaterialCount(this.material.MaterialID, this.total); (null, null);
}. Close ();
} Storage_Coursework
{class FormMatCount
{System.ComponentModel.IContainer components=null; override void Dispose (bool disposing)
{(disposing amp; amp; (components!=null))
{. Dispose ();
}. Dispose (disposing);
}
# region Windows Form Designer generated codevoid InitializeComponent ()
{. gbMaterial=new System.Windows.Forms.GroupBox () ;. btOk=new System.Windows.Forms.Button () ;. nudInOut=new System.Windows.Forms.NumericUpDown () ; .txtTotal=new System.Windows.Forms.Label () ;. txtCount=new System.Windows.Forms.Label () ;. lbTotal=new System.Windows.Forms.Label () ;. lbInOut=new System.Windows.Forms.Label () ;. lbStorage=new System.Windows.Forms.Label () ;. gbMaterial.SuspendLayout ();
((System.ComponentModel.ISupportInitialize)(this.nudInOut)).BeginInit();.SuspendLayout();.gbMaterial.Anchor =System.Windows.Forms.AnchorStyles.None;.gbMaterial.Controls.Add(this.btOk);.gbMaterial.Controls.Add(this.nudInOut);.gbMaterial.Controls.Add(this.txtTotal);.gbMaterial.Controls.Add(this.txtCount);.gbMaterial.Controls.Add(this.lbTotal);.gbMaterial.Controls.Add(this.lbInOut);.gbMaterial.Controls.Add(this.lbStorage);.gbMaterial.Location =New System.Drawing.Point (12, 12) ;. gbMaterial.Name= gbMaterial raquo ;;. GbMaterial.Size=new System.Drawing.Size (448, 171) ;. gbMaterial.TabIndex=0; .gbMaterial. TabStop=false; .gbMaterial.Text= Матеріал raquo ;;. btOk.Location=new System.Drawing.Point (331, 131) ;. btOk.Name= btOk raquo ;;. btOk.Size=new System.Drawing.Size (111, 34) ;. btOk.TabIndex=6; .btOk.Text= Виконати raquo ;;. btOk.UseVisualStyleBackColor=true; .btOk.Click +=new System.EventHandler (this.btOk_Click) ;. nudInOut.Anchor=((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))) ;. nudInOut.Location=new System.Drawing.Point ( 340, 63) ;. nudInOut.Maximum=new decimal (new int [] {.nudInOut.Name= nudInOut raquo ;;. nudInOut.Size=new System.Drawing.Size (102, 27) ;. nudInOut.TabIndex= 5; .nudInOut.TextAlign=System.Windows.Forms.HorizontalAlignment.Right; .txtTotal.Anchor=((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms. AnchorStyles.Right))) ;. txtTotal.Location=new System.Drawing.Point (...