private void lstHistory_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (lstHistory.SelectedIndex > -1)
            {
                if (lstHistory.Items.Count > 0)
                {
                    System.Data.DataRowView myRow = (System.Data.DataRowView)lstHistory.SelectedItem;

                    lblHeading.Text = myRow[3].ToString();
                    red1.Text       = myRow[4].ToString();
                    lblDate.Text    = myLogHangle.covertDateStringToString(myRow[2].ToString());

                    bb_userTableAdapter1.FillByUserID(bBLABSDataSet.bb_user, (int)myRow[1]);
                    lblPostedBy.Text = bBLABSDataSet.bb_user.Rows[0]["USERNAME"].ToString();
                }
            }
        }
Beispiel #2
0
        public frmEvent(int id, string name, Form1 par)
        {
            InitializeComponent();
            this.Text       = "Add New Event";
            parentForm      = par;
            UserID          = id;
            username        = name;
            btnAdd.Visible  = true;
            btnSave.Visible = false;

            bb_userTableAdapter.Fill(bblabsDataSet.bb_user);
            cmbUserNamesPartic.Items.Clear();
            for (int i = 0; i < bblabsDataSet.bb_user.Rows.Count; i++)
            {
                cmbUserNamesPartic.Items.Add(bblabsDataSet.bb_user.Rows[i]["USERNAME"].ToString());
            }

            bb_userTableAdapter.FillByLabUsers(bblabsDataSet.bb_user);
            lblCreator.Text = name;
            dateEvent.Text  = myLogHangle.covertDateStringToString(DateTime.Now.ToString());
        }
 private void frmPostcs_Load(object sender, EventArgs e)
 {
     lblDate.Text = myLogHangle.covertDateStringToString(DateTime.Now.ToString());
 }