示例#1
0
 private void ListDocumentReceiver()
 {
     try
     {
         grdList.Rows.Clear();
         DocumentReceiverDB      drdb = new DocumentReceiverDB();
         List <documentreceiver> DocumentReceivers = drdb.getDocumentReceiver();
         foreach (documentreceiver drrec in DocumentReceivers)
         {
             grdList.Rows.Add();
             grdList.Rows[grdList.Rows.Count - 1].Cells["RowID"].Value        = drrec.RowID;
             grdList.Rows[grdList.Rows.Count - 1].Cells["DocumentID"].Value   = drrec.DocumentID;
             grdList.Rows[grdList.Rows.Count - 1].Cells["DocumentName"].Value = drrec.DocumentName;
             grdList.Rows[grdList.Rows.Count - 1].Cells["EmployeeID"].Value   = drrec.EmployeeID;
             grdList.Rows[grdList.Rows.Count - 1].Cells["Employee"].Value     = drrec.EmployeeName;
             grdList.Rows[grdList.Rows.Count - 1].Cells["OfficeID"].Value     = drrec.OfficeID;
             grdList.Rows[grdList.Rows.Count - 1].Cells["Office"].Value       = drrec.OfficeName;
             grdList.Rows[grdList.Rows.Count - 1].Cells["Status"].Value       = getDocStatusString(drrec.Status);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(this.ToString() + "-" + System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error");
     }
     enableBottomButtons();
     pnlDocumentList.Visible = true;
 }
示例#2
0
        private void Main_Load(object sender, EventArgs e)
        {
            ////pnlMainHeader.Focus();
            Region = System.Drawing.Region.FromHrgn(Utilities.CreateRoundRectRgn(0, 0, Width, Height, 20, 20));
            Button dashBtn = new Button();

            dashBtn.Name   = "btnDASHBOARD";
            dashBtn.Click += new EventHandler(this.MyButtonHandler);
            dashBtn.PerformClick();
            DocumentReceiverDB drdb = new DocumentReceiverDB();

            DocumentReceivers = drdb.getDocumentReceiver().Where(recv => recv.EmployeeID == Login.empLoggedIn && recv.Status == 1).ToList();
            SystemParametersDB spdb = new SystemParametersDB();

            SystemParameters = spdb.getSystemparameters();
        }