Ejemplo n.º 1
0
 private void browsePDFToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         frmCurator frmNToS = new frmCurator();
         frmNToS.MdiParent = this;
         frmNToS.Show();
     }
     catch (Exception ex)
     {
         PepsiLiteErrorHandling.WriteErrorLog(ex.ToString());
     }
 }
Ejemplo n.º 2
0
        private void LoadTANtoolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                //If no tans are assigned directly open curator page
                //If tans are available load available tans

                //Retrieve assigned TANs for the user based on userid,role
                DataTable dtAssignedTans = PepsiLiteDataAccess.DataOperations.RetrieveUserAssignedTANs(Generic.Generic_PepsiLite.UserName, Generic.Generic_PepsiLite.UserRole);

                if (dtAssignedTans != null)
                {
                    if (dtAssignedTans.Rows.Count > 0)
                    {
                        string selTAN = "";
                        TaskManagement.frmTaskSheet objTSheet = new NameToStructureApplication.TaskManagement.frmTaskSheet();
                        objTSheet.AssignedTANs = dtAssignedTans;

                        if (objTSheet.ShowDialog() != DialogResult.OK)
                        {
                            if (objTSheet.SubmitClick)
                            {
                                selTAN = objTSheet.SelectedTAN;
                                DataTable dtTanDetails = objTSheet.SelTANDetails;

                                frmCurator objCur = new frmCurator();
                                objCur.TANDetailsTbl = dtTanDetails;
                                objCur.TANNumber     = selTAN;
                                objCur.MdiParent     = this;
                                objCur.BindTANResultsToControls(dtTanDetails);
                                objCur.Show();
                            }
                        }
                    }
                    else//open new curator page
                    {
                        browsePDFToolStripMenuItem_Click(null, null);
                    }
                }
                else//open new curator page
                {
                    browsePDFToolStripMenuItem_Click(null, null);
                }
            }
            catch (Exception ex)
            {
                PepsiLiteErrorHandling.WriteErrorLog(ex.ToString());
            }
        }