Exemple #1
0
        private Int32 SaveRecord()
		{
			StockTypes clsStockType = new StockTypes();
			StockTypesDetails clsDetails = new StockTypesDetails();

			clsDetails.StockTypeCode = txtStockTypeCode.Text;
			clsDetails.Description = txtDescription.Text;
			clsDetails.StockDirection = (StockDirections) Enum.Parse(typeof(StockDirections), cboDirection.SelectedItem.Value);

			int id = clsStockType.Insert(clsDetails);
			
			clsStockType.CommitAndDispose();

			return id;
        }