public AssociateComplainForm(AssociateComplain Associatecomplain)
     : base(Associatecomplain)
 {
     this.mEntry = Associatecomplain;
     this.InitializeComponent();
     this.UserInitialize();
 }
Exemplo n.º 2
0
        private void OnAddClick(object sender, EventArgs e)
        {
            AssociateComplain obj = new AssociateComplain();

            if (AssociateComplainForm.ShowForm(obj))
            {
                this.LoadListData(obj);
            }
        }
Exemplo n.º 3
0
        private void OnAddNewAssociateComplainClick(object sender, EventArgs e)
        {
            AssociateComplain obj = new AssociateComplain(this.mHistoryProcedure);

            AssociateComplainForm.ShowForm(obj);
            AssociateComplainCollection associateComplainList = new AssociateComplainCollection();

            this.cmbAssociateComplain.DataSource    = associateComplainList;
            this.cmbAssociateComplain.DisplayMember = "DisplayName";
        }
        public static bool ShowForm(AssociateComplain obj)
        {
            bool r = false;

            if (!Objectbase.IsNullOrEmpty(obj))
            {
                using (AssociateComplainForm frm = new AssociateComplainForm(obj))
                {
                    r = frm.ShowDialog() == DialogResult.OK;
                }
            }
            return(r);
        }
Exemplo n.º 5
0
        private void OnOpenClick(object sender, EventArgs e)
        {
            AssociateComplain obj = this.GetSelected();

            if (obj != null)
            {
                obj.RefershData();
            }

            if (AssociateComplainForm.ShowForm(obj))
            {
                this.LoadListData(obj);
            }
        }
Exemplo n.º 6
0
        private void LoadListData(AssociateComplain selected)
        {
            int count = 0;

            this.LoadEntityList <AssociateComplain>(this.dgvData, this.clmAssociateComplain.Index, new AssociateComplainCollection(tstSearch.Text), selected,
                                                    delegate(DataGridViewRow row, AssociateComplain obj)
            {
                count++;
                row.Cells[this.clmAssociateComplain.Index].Value            = obj.Name;
                row.Cells[this.clmAssociateComplainDescription.Index].Value = obj.Description;
            }
                                                    );
            bool hasRows = count > 0;

            this.tsbOpen.Enabled = hasRows;
        }