using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace hukpiWinApp
{
    public partial class DepotContractForm : BaseForm
    {
        private decimal depotId;
        private decimal partnerId;

        public DepotContractForm(decimal depotId, decimal partnerId)
        {
            InitializeComponent();

            this.depotId = depotId;
            this.partnerId = partnerId;

            loadDepotContractDataToForm(depotId);
        }

        private void loadDepotContractDataToForm(decimal depotId)
        {
            hukpiDatabaseDataSetTableAdapters.DepotDataViewTableAdapter DepotDataAdapter = new hukpiWinApp.hukpiDatabaseDataSetTableAdapters.DepotDataViewTableAdapter();
            hukpiDatabaseDataSet.DepotDataViewDataTable depotData = DepotDataAdapter.GetDataByDepotId(depotId);

            this.Text = depotData[0]["DepotCode"].ToString() + " - " + depotData[0]["DepotName"].ToString();

        }
    }
}
