示例#1
0
        //Member Actions
        public void CreateMembersObject(string action)
        {
            Members_05 objMembers = new Members_05();

            objMembers.adminInstance = this;
            this.Hide();

            objMembers.Show();
            objMembers.MembersButtonActions(action);
        }
示例#2
0
        private void btnMemberDetails_Click(object sender, EventArgs e)
        {
            adminInstance.errObj.txtBtnClicks.Text += "\n" + MethodBase.GetCurrentMethod().Name;

            try
            {
                if (c.cnn.State != ConnectionState.Open)
                {
                    c.cnn.Close(); c.cnn.Open();
                }

                c.cmd.CommandText = "select count(*) from MembersTable where memberid ='" + txtMemID.Text + "'";

                if ((int)c.cmd.ExecuteScalar() < 1)
                {
                    lblError.Text = "Record not found!";
                    return;
                }

                else
                {
                    lblError.Text = "...";
                }

                Members_05 objMem = new Members_05();

                objMem.sentByCirculation = true;
                objMem.adminInstance     = adminInstance;
                objMem.memIDCirc         = txtMemID.Text;

                objMem.Show();
            }

            catch (Exception ex)
            {
                adminInstance.errObj.txtException.Text = ex.ToString();
                adminInstance.errObj.Show();

                this.Close();
            }

            finally
            {
                c.cnn.Close();
            }
        }