private void readRole()
        {
            bool IsApprove   = false;
            bool IsView      = false;
            bool IsShortList = false;

            EntNomAuthorizationDetails objNom = new EntNomAuthorizationDetails();

            objNomDetails = new NominationDetailsWB();

            objNom = objNomDetails.readRoles(((UserDetails)Session[clsConstant.TOKEN]).Roles);

            IsUpload    = objNom.isUpload;
            IsApprove   = objNom.isApprove;
            IsShortList = objNom.isShortList;

            if (IsApprove == true)
            {
                IsUpload = true;
                IsView   = true;
            }

            else
            if (IsShortList == true)
            {
                IsUpload = true;
                IsView   = true;
            }
            else
            if (IsUpload == true)
            {
                IsView = true;
            }
        }
        protected void SubmitNewDataForOutinging()
        {
            NominationDetailsWB objNomDetail = new NominationDetailsWB();

            try
            {
                if (ViewState["iNominatedUserId"] != null)
                {
                    if (ViewState["iNominatedUserId"].ToString() != "")
                    {
                        int userID = objNomDetail.updateStudyOutingingNominatedUserDetails(ViewState["iNominatedUserId"].ToString(), txtPassportNo.Text, txtAadhar.Text, txtName2.Text, txtOrganisation2.Text
                                                                                           , txtDesignation2.Text, txtEmail2.Text, txtMobileNo2.Text, txtTelephone2.Text, Session["StudyID"].ToString()
                                                                                           );

                        if (userID != 0)
                        {
                            lblMessage.Text = "<b>Your Record updated successfully";
                            lblError.Text   = lblMessage.Text;
                            ModalPopupExtender1.Show();
                            funcClearOutgoing();
                            this.bindNominatedUser2(Convert.ToInt32(Session["StudyID"].ToString()));
                            ViewState["iStudyID"] = null;
                            lnkBtnAdd1.ToolTip    = "Click to Save";
                        }
                        else
                        {
                            lblMessage.Text = "Some error occured";
                        }
                    }
                }
                else
                {
                    int userID = objNomDetail.AddStudyNominatedCandidateDetails(txtPassportNo.Text, txtAadhar.Text, txtName2.Text, txtOrganisation2.Text
                                                                                , txtDesignation2.Text, txtEmail2.Text, txtMobileNo2.Text, txtTelephone2.Text,
                                                                                Session["StudyID"].ToString());

                    if (userID != 0)
                    {
                        lblMessage.Text  = "<b>Your Nomination has been completed successfully";
                        lblMessage.Text += txtid.Text == "" ? "<br /><b>Note: Your Reference Key For Nomination Is" + " " + userID : "";
                        lblError.Text    = lblMessage.Text;
                        ModalPopupExtender1.Show();
                        funcClearOutgoing();
                        this.bindNominatedUser2(Convert.ToInt32(Session["StudyID"].ToString()));
                    }
                    else
                    {
                        lblMessage.Text = "Some error occured";
                    }
                }
            }
            catch (Exception ex)
            {
                lblMessage.Text = "Some Error Occure";

                ViewState["isSuccess"] = null;
                ModalPopupExtender1.Show();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack == false)
            {
                try
                {
                    //this.getLoan();
                    txtid.Attributes.Add("readonly", "readonly");

                    if (Session[clsConstant.TOKEN] == null)
                    {
                        UrlParameterPasser urlWrapper = new UrlParameterPasser();
                        urlWrapper.Url = "../Logout.aspx";
                        urlWrapper.PassParameters();
                    }
                    else
                    {
                        this.readRole();

                        //if (IsUpload == false)
                        //{
                        //    UrlParameterPasser urlWrapper = new UrlParameterPasser();
                        //    urlWrapper.Url = "../Logout.aspx";
                        //    urlWrapper.PassParameters();
                        //}
                        //else
                        //{
                        objEnt             = new WorkShop();
                        workShopDetailsObj = new WorkShopDetailsWB();
                        objNomDetails      = new NominationDetailsWB();
                        nomID = Session["SouthID"].ToString();
                        // nomID = Request.QueryString["nomI"];
                        objEnt = workShopDetailsObj.readerForWorkShop("", int.Parse(nomID));
                        DataTable dt = new DataTable();
                        dt = (DataTable)Session["SouthDT"];
                        for (int i = 0; i < dt.Rows.Count; i++)
                        {
                            if (dt.Rows[i]["iSouthExchangeID"].ToString() == nomID.ToString())
                            {
                                lblNomination.Text = "<b/>" + dt.Rows[i]["vsTopic"].ToString();
                                lblSeats.Text      = "" + dt.Rows[i]["iSeats"].ToString();
                            }
                        }


                        ViewState["iSouthID"] = null;
                        this.bindNominatedUser(Convert.ToInt32(Session["SouthID"].ToString()));
                    }
                    //} else close
                }
                catch (Exception ex)
                {
                    logger.Error(ex);
                }
            }
        }
示例#4
0
 protected void lnkCloseNomination_Click(object sender, EventArgs e)
 {
     try
     {
         NominationDetailsWB objNomDetail = new NominationDetailsWB();
         int msg = objNomDetail.CloseNomination(Session["NominationID"].ToString());
         if (msg > 0)
         {
             ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Nomination Closed successfully');window.location ='../WBNomination/WBWorkshop.aspx';", true);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack == false)
            {
                try
                {
                    //this.getLoan();
                    txtid.Attributes.Add("readonly", "readonly");

                    if (Session[clsConstant.TOKEN] == null)
                    {
                        UrlParameterPasser urlWrapper = new UrlParameterPasser();
                        urlWrapper.Url = "../Logout.aspx";
                        urlWrapper.PassParameters();
                    }
                    else
                    {
                        this.readRole();

                        //if (IsUpload == false)
                        //{
                        //    UrlParameterPasser urlWrapper = new UrlParameterPasser();
                        //    urlWrapper.Url = "../Logout.aspx";
                        //    urlWrapper.PassParameters();
                        //}
                        //else
                        //{

                        objEnt             = new WorkShop();
                        workShopDetailsObj = new WorkShopDetailsWB();
                        objNomDetails      = new NominationDetailsWB();
                        nomID = Session["NominationID"].ToString();
                        // nomID = Request.QueryString["nomI"];
                        objEnt                        = workShopDetailsObj.readerForWorkShop("", int.Parse(nomID));
                        lblNomination.Text            = "<b/>" + objEnt.Topic.ToString();
                        lblSeats.Text                 = "" + objEnt.seats.ToString();
                        ViewState["iNominatedUserId"] = null;
                        this.bindNominatedUser(Convert.ToInt32(Session["NominationID"].ToString()));
                        // }
                    }
                }
                catch (Exception ex)
                {
                    logger.Error(ex);
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack == false)
            {
                try
                {
                    //this.getLoan();
                    txtid.Attributes.Add("readonly", "readonly");

                    if (Session[clsConstant.TOKEN] == null)
                    {
                        UrlParameterPasser urlWrapper = new UrlParameterPasser();
                        urlWrapper.Url = "../Logout.aspx";
                        urlWrapper.PassParameters();
                    }
                    else
                    {
                        this.readRole();

                        if (IsUpload == false)
                        {
                            UrlParameterPasser urlWrapper = new UrlParameterPasser();
                            urlWrapper.Url = "../Logout.aspx";
                            urlWrapper.PassParameters();
                        }
                        else
                        {
                            objEnt             = new WorkShop();
                            workShopDetailsObj = new WorkShopDetailsWB();
                            objNomDetails      = new NominationDetailsWB();
                            nomID = Session["StudyID"].ToString();

                            DataSet   ds  = new DataSet();
                            DataTable dt1 = new DataTable();

                            ds  = (DataSet)Session["StudyDT"];
                            dt1 = ds.Tables[0];
                            for (int i = 0; i < dt1.Rows.Count; i++)
                            {
                                if (dt1.Rows[i]["iStudyTourID"].ToString() == nomID.ToString())
                                {
                                    lblNomination.Text = "<b/>" + dt1.Rows[i]["vsTopic"].ToString();
                                    lblSeats.Text      = "" + dt1.Rows[i]["iSeats"].ToString();
                                }
                            }
                            //ViewState["iStudyID"] = null;
                            ViewState["iStudyID"] = nomID;


                            string type = Convert.ToString(Session["VisitType"]);
                            if (type == "1")
                            {
                                pnlEntry.Visible            = true;
                                pnlEntryForOutgoing.Visible = false;
                                grdNominatedUserlistStudyOutgoing.Visible = false;
                                grdNominatedUserlistStudy.Visible         = true;
                                this.bindNominatedUser(Convert.ToInt32(ViewState["iStudyID"].ToString()));
                            }
                            else
                            {
                                pnlEntryForOutgoing.Visible = true;
                                pnlEntry.Visible            = false;
                                grdNominatedUserlistStudyOutgoing.Visible = true;
                                grdNominatedUserlistStudy.Visible         = false;

                                this.bindNominatedUser2(Convert.ToInt32(ViewState["iStudyID"].ToString()));
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    logger.Error(ex);
                }
            }
        }
        protected void SubmitNewDataForIncoming1()
        {
            NominationDetailsWB objNomDetail = new NominationDetailsWB();

            try
            {
                if (ViewState["iNominatedUserId"] != null)
                {
                    if (ViewState["iNominatedUserId"].ToString() != "")
                    {
                        int userID = objNomDetail.updateStudyIncomingNominatedUserDetails(ViewState["iNominatedUserId"].ToString(), txtPassportNo.Text, txtAadhar.Text, txtName.Text, txtOrganisation.Text
                                                                                          , txtDesignation.Text, txtEmail.Text, txtMobileNo.Text, txtTelephone.Text,
                                                                                          Session["StudyID"].ToString());

                        if (userID != 0)
                        {
                            lblMessage.Text = "<b>Your Record updated successfully";
                            lblError.Text   = lblMessage.Text;
                            ModalPopupExtender1.Show();
                            funcClear();
                            this.bindNominatedUser(Convert.ToInt32(Session["StudyID"].ToString()));
                            ViewState["iStudyID"] = null;
                            lnkBtnAdd1.ToolTip    = "Click to Save";
                        }
                        else
                        {
                            lblMessage.Text = "Some error occured";
                        }
                    }
                }


                else if (ViewState["Passport"].ToString() == txtPassportNo.Text)
                {
                    using (SqlConnection conn = new SqlConnection())
                    {
                        conn.ConnectionString = ConfigurationManager.ConnectionStrings["TA7511DBConnString"].ConnectionString;
                        using (SqlCommand cmd = new SqlCommand())
                        {
                            cmd.CommandText = "USP_GetStudyIncomingNominatedUser";
                            cmd.CommandType = CommandType.StoredProcedure;
                            //cmd.Parameters.AddWithValue("@Passport", ViewState["Passport"]);
                            cmd.Parameters.AddWithValue("@Passport", txtPassportNo.Text);
                            cmd.Connection = conn;
                            conn.Open();
                            DataTable dt = new DataTable();
                            using (SqlDataAdapter da = new SqlDataAdapter(cmd))
                            {
                                da.Fill(dt);
                            }
                            if (dt.Rows.Count > 0)
                            {
                                Alert.show("Record Already Exists");
                            }
                        }
                    }
                }

                else
                {
                    int userID = objNomDetail.AddStudyNominatedCandidateDetails(txtPassportNo.Text, txtAadhar.Text, txtName.Text, txtOrganisation.Text
                                                                                , txtDesignation.Text, txtEmail.Text, txtMobileNo.Text, txtTelephone.Text,
                                                                                Session["StudyID"].ToString());

                    if (userID != 0)
                    {
                        lblMessage.Text  = "<b>Your Nomination has been completed successfully";
                        lblMessage.Text += txtid.Text == "" ? "<br /><b>Note: Your Reference Key For Nomination Is" + " " + userID : "";
                        lblError.Text    = lblMessage.Text;
                        ModalPopupExtender1.Show();
                        funcClear();
                        this.bindNominatedUser(Convert.ToInt32(Session["StudyID"].ToString()));
                    }
                    else
                    {
                        lblMessage.Text = "Some error occured";
                    }
                }
            }
            catch (Exception ex)
            {
                lblMessage.Text = "Some Error Occure";

                ViewState["isSuccess"] = null;
                ModalPopupExtender1.Show();
            }
        }
        protected void SubmitNewData()
        {
            NominationDetailsWB objNomDetail = new NominationDetailsWB();

            try
            {
                if (ViewState["iNominatedUserId"] != null)
                {
                    if (ViewState["iNominatedUserId"].ToString() != "")
                    {
                        int userID = objNomDetail.updateNominatedUserDetails(ViewState["iNominatedUserId"].ToString(), txtName.Text, txtOrganisation.Text
                                                                             , txtDesignation.Text, txtEmail.Text, txtMobileNo.Text, txtTelephone.Text,
                                                                             Session["SouthID"].ToString());

                        if (userID != 0)
                        {
                            lblMessage.Text = "<b>Your Record updated successfully";
                            lblError.Text   = lblMessage.Text;
                            //ModalPopupExtender1.Show();
                            Alert.show("Your Record updated successfully");
                            funcClear();
                            this.bindNominatedUser(Convert.ToInt32(Session["SouthID"].ToString()));
                            ViewState["iSouthID"] = null;
                            //lnkBtnAdd.ToolTip = "Click to Save";
                        }
                        else
                        {
                            lblMessage.Text = "Some error occured";
                        }
                    }
                }
                else
                {
                    int userID = objNomDetail.AddNominatedCandidateDetails(txtName.Text, txtOrganisation.Text
                                                                           , txtDesignation.Text, txtEmail.Text, txtMobileNo.Text, txtTelephone.Text,
                                                                           Session["SouthID"].ToString());

                    if (userID != 0)
                    {
                        lblMessage.Text  = "Your Nomination has been completed successfully, ";
                        lblMessage.Text += txtid.Text == "" ? "Note: Your Reference Key For Nomination is - " + " " + userID : "";
                        lblError.Text    = lblMessage.Text;
                        //ModalPopupExtender1.Show();
                        Alert.show(lblMessage.Text);
                        funcClear();
                        this.bindNominatedUser(Convert.ToInt32(Session["SouthID"].ToString()));
                    }
                    else
                    {
                        lblMessage.Text = "Some error occured";
                    }
                }
            }
            catch (Exception ex)
            {
                lblMessage.Text = "Some Error Occure";

                ViewState["isSuccess"] = null;
                ModalPopupExtender1.Show();
            }
        }