Ejemplo n.º 1
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            ItemMasterModel objmodel = objItemMasterBl.GetItemNameByCompanyname(tbxCompanyName.Text.Trim());

            if (objmodel.Name != null)
            {
                MessageBox.Show("Can Not Delete Company Name Under Tag With Item Name.." + objmodel.Name);
                tbxCompanyName.Focus();
            }
            if (objmodel.Name == null)
            {
                if (ItemcompId != 0)
                {
                    bool isDelete = objICBL.DeleteItemCompanyById(ItemcompId);
                    if (isDelete)
                    {
                        MessageBox.Show("Delete Successfully!");
                        ClearControls();
                        ItemcompId = 0;
                        Administration.List.ItemcompanyList frmList = new Administration.List.ItemcompanyList();
                        frmList.StartPosition = FormStartPosition.CenterScreen;

                        frmList.ShowDialog();
                        FillItemCompanyInfo();
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            if (ItemcompId == 0)
            {
                tbxCompanyName.Focus();
                return;
            }
            ItemCompanyMasterModel objCompany = new ItemCompanyMasterModel();

            objCompany.ItemCompany     = tbxCompanyName.Text.Trim();
            objCompany.StockAccount    = cbxStockaccount.Text.Trim() == null ? string.Empty : cbxStockaccount.Text.Trim();
            objCompany.SalesAccount    = cbxSalesaccount.Text.Trim() == null ? string.Empty : cbxSalesaccount.Text.Trim();
            objCompany.PurchaseAccount = cbxPurchaseAccount.Text.Trim() == null ? string.Empty : cbxPurchaseAccount.Text.Trim();
            objCompany.ModifiedBy      = "Admin";
            objCompany.ICM_id          = ItemcompId;
            bool isSuccess = objICBL.UpdateItemCompany(objCompany);

            if (isSuccess)
            {
                MessageBox.Show("Update Successfully!");
                ItemcompId = 0;
                ClearControls();
                Administration.List.ItemcompanyList frmList = new Administration.List.ItemcompanyList();
                frmList.StartPosition = FormStartPosition.CenterScreen;

                frmList.ShowDialog();
                FillItemCompanyInfo();
            }
        }
Ejemplo n.º 3
0
 private void ListItemCompany_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
 {
     Administration.List.ItemcompanyList frmList = new Administration.List.ItemcompanyList();
     frmList.StartPosition = FormStartPosition.CenterScreen;
     ItemcompId            = 0;
     frmList.ShowDialog();
     FillItemCompanyInfo();
 }