示例#1
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            CostCentreMasterModel objModel = new CostCentreMasterModel();

            objModel.Name       = tbxName.Text.Trim();
            objModel.Alias      = tbxAliasname.Text.Trim();
            objModel.Group      = cbxPrimarygroup.SelectedItem.ToString();
            objModel.opBal      = Convert.ToDecimal(tbxOpbal.Text.Trim());
            objModel.DrCr       = cbxDrCr.SelectedItem.ToString();
            objModel.ModifiedBy = "Admin";
            objModel.CCM_ID     = costId;

            bool isSuccess = objccm.UpdateCCM(objModel);

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

                frmList.ShowDialog();
                FillCostCenterInfo();
            }
        }
示例#2
0
        private void ListCostcenter_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Administration.List.CostcenterList frmList = new Administration.List.CostcenterList();
            frmList.StartPosition = FormStartPosition.CenterScreen;

            frmList.ShowDialog();
        }
示例#3
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            bool isDelete = objccm.DeleteCostCenterMasterById(costId);

            if (isDelete)
            {
                MessageBox.Show("Delete Successfully!");
                ClearControls();
                Administration.List.CostcenterList frmList = new Administration.List.CostcenterList();
                frmList.StartPosition = FormStartPosition.CenterScreen;

                frmList.ShowDialog();
                FillCostCenterInfo();
                //tbxName.Focus();
                //lblUpdate.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.OnlyInCustomization;
                //lblDelete.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.OnlyInCustomization;
                //lblSave.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
            }
        }