Beispiel #1
0
        private void LoadFormWithData()
        {
            if (_purchaseReceiveList == null || _purchaseReceiveList.Count <= 0)
            {
                _isAddNewMode = true;
                ClearForm();
                btnDetails.Enabled = false;
                return;
            }

            btnDetails.Enabled = true;
            _purchaseReceive   = _purchaseReceiveList[_currentIndex];

            txtPurchaseReceiveId.Text = Convert.ToString(_purchaseReceive.Id);
            txtReceiveNumber.Text     = _purchaseReceive.ReceiveNumber;
            txtReceiveDate.Text       = Convert.ToString(_purchaseReceive.ReceiveDate);
            txtReceivedBy.Text        = Convert.ToString(_purchaseReceive.ReceivedBy);
            cbxChallan.SelectedValue  = _purchaseReceive.ChallanId;
            txtChallanNumber.Text     = _purchaseReceive.ChallanNumber;
            txtChallanDate.Text       = Convert.ToString(_purchaseReceive.ChallanDate);
            txtSupplierName.Text      = _purchaseReceive.SupplierName;
            txtDescription.Text       = _purchaseReceive.Description;
            chkIsActive.Checked       = _purchaseReceive.IsActive;

            dgvPurchaseChallanList.Rows[_currentIndex].Selected = true;
            dgvPurchaseChallanList.CurrentCell = dgvPurchaseChallanList.Rows[_currentIndex].Cells[0];
            _isChanged    = false;
            _isAddNewMode = false;
        }
Beispiel #2
0
        public PurchaseReceiveForm()
        {
            InitializeComponent();
            IKernel kernel = BootStrapper.Initialize();

            _purchaseReceiveService = kernel.GetService(typeof(PurchaseReceiveService)) as PurchaseReceiveService;
            _purchaseChallanService = kernel.GetService(typeof(PurchaseChallanService)) as PurchaseChallanService;

            _purchaseReceive = new PurchaseReceiveModel();
        }
        public PurchaseReceiveDetailsForm(PurchaseReceiveModel purchaseReceive)
        {
            InitializeComponent();
            IKernel kernel = BootStrapper.Initialize();

            _purchaseReceiveDetailService = kernel.GetService(typeof(PurchaseReceiveDetailService)) as PurchaseReceiveDetailService;
            _purchaseChallanDetailService = kernel.GetService(typeof(PurchaseChallanDetailService)) as PurchaseChallanDetailService;
            _productCategoryService       = kernel.GetService(typeof(ProductCategoryService)) as ProductCategoryService;
            _productService = kernel.GetService(typeof(ProductService)) as ProductService;

            _purchaseReceive       = purchaseReceive;
            _purchaseReceiveDetail = new PurchaseReceiveDetailModel();
        }