Exemple #1
0
    protected void btn_save_Click(object sender, EventArgs e)
    {
        bl_RTI_Registration bl = new bl_RTI_Registration();
        dl_RTI_Registration dl = new dl_RTI_Registration();

        ReturnClass.ReturnDataTable rd     = new ReturnClass.ReturnDataTable();
        HttpBrowserCapabilities     browse = Request.Browser;

        bl.UserID = txt_user_name.Text;
        rd        = dl.CheckUserID(bl);
        if (rd.table.Rows.Count == 0)
        {
            bl.Password       = util.GenerateMd5Hash(txt_password.Text.Trim());
            bl.LoginID        = ddl_employee.SelectedValue;
            bl.RegistrationID = bl.LoginID;
            bl.PasswordChange = ddl_change_pass.SelectedValue;
            bl.Active         = ddl_active.SelectedValue;
            bl.UserIP         = util.GetClientIpAddress(this.Page);

            bl.UserAgent    = Request.UserAgent.ToString();
            bl.UserOS       = Utilities.System_Info(this.Page);
            bl.User_browser = browse.Browser;
            rb = dl.Insert_Login(bl);
            if (rb.status == true)
            {
                ddl_employee.SelectedValue = "0";
                txt_user_name.Text         = "";

                Utilities.MessageBox_UpdatePanel(UpdatePanel1, "Record Saved Successfully");
                grid_bind();
                clear();
            }
            else
            {
                Utilities.MessageBox_UpdatePanel(UpdatePanel1, "User Id For this Employee Already exist ");
            }
        }
        else
        {
            Utilities.MessageBox_UpdatePanel(UpdatePanel1, "User ID Not Available Please Choose Another UserID ");
        }
    }
Exemple #2
0
    protected void btn_save_Click(object sender, EventArgs e)
    {
        if (Session["CheckRefresh"].ToString() == ViewState["CheckRefresh"].ToString())
        {
            Session["CheckRefresh"] = Server.UrlDecode(System.DateTime.Now.ToString());
            bl_RTI_Registration         bl     = new bl_RTI_Registration();
            dl_RTI_Registration         dl     = new dl_RTI_Registration();
            ReturnClass.ReturnDataTable rd     = new ReturnClass.ReturnDataTable();
            HttpBrowserCapabilities     browse = Request.Browser;
            bl.UserID = txt_user_name.Text;
            rd        = dl.CheckUserID(bl);
            if (rd.table.Rows.Count == 0)
            {
                bl.UserID         = txt_user_name.Text;
                bl.Password       = util.GenerateMd5Hash(txt_password.Text.Trim());
                bl.LoginID        = ddl_employee.SelectedValue;
                bl.RegistrationID = bl.LoginID;
                bl.PasswordChange = ddl_change_pass.SelectedValue;
                bl.Active         = ddl_active.SelectedValue;
                bl.UserIP         = util.GetClientIpAddress(this.Page);

                bl.UserAgent    = Request.UserAgent.ToString();
                bl.UserOS       = Utilities.System_Info(this.Page);
                bl.User_browser = browse.Browser;
                rb = dl.Insert_Login(bl);
                if (rb.status == true)
                {
                    ddl_employee.SelectedValue = "0";
                    txt_user_name.Text         = "";

                    if (Session["language"].ToString() == "en-GB")
                    {
                        Utilities.MessageBox_UpdatePanel_Redirect(UpdatePanel1, "Record Saved Successfully", "user_login_entry.aspx");
                    }
                    else
                    {
                        Utilities.MessageBox_UpdatePanel_Redirect(UpdatePanel1, "रिकॉर्ड सफलतापूर्वक सुरक्षित रखा गया", "user_login_entry.aspx");
                    }

                    //Utilities.MessageBox_UpdatePanel_Redirect(UpdatePanel1, "Record Saved Successfully", "user_login_entry.aspx");
                    grid_bind();
                    clear();
                }
                else
                {
                    if (Session["language"].ToString() == "en-GB")
                    {
                        Utilities.MessageBox_UpdatePanel(UpdatePanel1, "User Id For this Employee Already exist ");
                    }
                    else
                    {
                        Utilities.MessageBox_UpdatePanel(UpdatePanel1, "इस कर्मचारी के लिए उपयोगकर्ता आईडी पहले से मौजूद है ");
                    }
                    // Utilities.MessageBox_UpdatePanel(UpdatePanel1, "User Id For this Employee Already exist ");
                }
            }
            else
            {
                if (Session["language"].ToString() == "en-GB")
                {
                    Utilities.MessageBox_UpdatePanel(UpdatePanel1, "User ID Not Available Please Choose Another UserID ");
                }
                else
                {
                    Utilities.MessageBox_UpdatePanel(UpdatePanel1, "उपयोगकर्ता आईडी उपलब्ध नहीं है कृपया अन्य यूजरआईडी चुनें ");
                }
                // Utilities.MessageBox_UpdatePanel(UpdatePanel1, "User ID Not Available Please Choose Another UserID ");
            }
        }
    }
Exemple #3
0
    protected void btn_otp_Click(object sender, EventArgs e)
    {
        if (Session["CheckRefresh"].ToString() == ViewState["CheckRefresh"].ToString())
        {
            Session["CheckRefresh"] = Server.UrlDecode(System.DateTime.Now.ToString());
            string OTP = Session["OTP"].ToString();
            if (txt_otp.Text == OTP)
            {
                HttpBrowserCapabilities browse = Request.Browser;
                if (Session["VERIFICATION_TYPE"].ToString() == "User")
                {
                    bl.RegistrationID = Session["REGID"].ToString();
                    dt = dl.Select_User_detail(bl);
                    if (dt.table.Rows.Count > 0)
                    {
                        bl.UserID         = dt.table.Rows[0]["UserID"].ToString();
                        bl.RegistrationID = dt.table.Rows[0]["RegistrationID"].ToString();
                        bl.Password       = dt.table.Rows[0]["Password"].ToString();
                        bl.RollID         = "2";
                        bl.PasswordChange = "N";
                        bl.Active         = "Y";
                        bl.IsValid        = "Y";
                        bl.UserIP         = ul.GetClientIpAddress(this.Page);
                        bl.UserAgent      = Request.UserAgent.ToString();
                        bl.UserOS         = Utilities.System_Info(this.Page);
                        bl.User_browser   = browse.Browser;
                        using (TransactionScope ts = new TransactionScope())
                        {
                            rb = dl.Update_registration(bl);
                            if (rb.status == true)
                            {
                                rb = dl.Insert_Login(bl);
                                if (rb.status == true)
                                {
                                    ts.Complete();

                                    string str_msg = "";
                                    if (Session["language"].ToString() == "en-GB")
                                    {
                                        str_msg = "Your Mobile Varification Is successful. Your Userid is " + bl.UserID + " and Password is That You Have selected";
                                    }
                                    else
                                    {
                                        str_msg = "आपके मोबाईल की जाँच सफलतापूर्वक हो गई है| आपका यूजर आई. डी. है " + bl.UserID + "और पासवर्ड वह है जो आपने चुन लिया है |";
                                    }


                                    Utilities.MessageBox_UpdatePanel_Redirect(udp, str_msg, "../LogOut.aspx");
                                }
                            }
                        }
                    }
                }
                else if (Session["VERIFICATION_TYPE"].ToString() == "Rti")
                {
                    bl_rti.RTI_Request_id = Session["RTI_ID"].ToString();
                    dt = dl_rti.GetRtiStatus_detail(bl_rti);
                    if (dt.table.Rows.Count > 0)
                    {
                        bl_rti.IsValid = dt.table.Rows[0]["isvalid"].ToString();
                    }
                    if (bl_rti.IsValid == "N" || bl_rti.IsValid == "")
                    {
                        bl_rti.RTI_Request_id = Session["RTI_ID"].ToString();
                        bl_rti.IsValid        = "Y";
                        rb = dl_rti.update_Rti_status(bl_rti);
                        if (rb.status == true)
                        {
                            bl_rti.RTI_Request_id = Session["RTI_ID"].ToString();
                            dt = dl_rti.GetRtiStatus_detail(bl_rti);
                            if (dt.table.Rows.Count > 0)
                            {
                                bl_rti.Securitycode = dt.table.Rows[0]["seqcode"].ToString();
                                bl_rti.IsValid      = dt.table.Rows[0]["isvalid"].ToString();
                            }
                            string rti_message = "";
                            if (Session["language"].ToString() == "en-GB")
                            {
                                rti_message = "RTI Submission successfull your Registration no. is: " + bl_rti.RTI_Request_id + "  And  Your Security Code is:  " + bl_rti.Securitycode + "   please save  details for further Information.";
                            }
                            else
                            {
                                rti_message = "आपका आर. टी. आई. सफलता पूर्वक सबमिट हो गया, आपका रजिस्ट्रेशन न. है " + bl_rti.RTI_Request_id + " और सुरक्षा कोड है " + bl_rti.Securitycode + "कृपया विवरण को उपयोग के लिए सुरक्षित रखें|";
                            }


                            // string rti_message = "Your Mobile Varification Is successful. Your Rti Has Been Registered with registration no.: " + bl_rti.RTI_Request_id + " AND Your Security Code is " + bl_rti.Securitycode + ". Please Save Both For Details";
                            Utilities.MessageBox_UpdatePanel_Redirect(udp, rti_message, "../user/UserWelcome.aspx");
                        }
                    }
                    else
                    {
                        txt_otp.Text    = "";
                        div_otp.Visible = false;
                        if (Session["language"].ToString() == "en-GB")
                        {
                            Utilities.MessageBox_UpdatePanel_Redirect(udp, "Rti Already Registered", "../user/UserWelcome.aspx");
                        }
                        else
                        {
                            Utilities.MessageBox_UpdatePanel_Redirect(udp, "आर. टी. आई. पहले से ही रजिस्टर्ड है", "../user/UserWelcome.aspx");
                        }
                        //  Utilities.MessageBox_UpdatePanel_Redirect(udp, "Rti Already Registered", "../user/UserWelcome.aspx");
                    }
                }
            }
            else
            {
                if (Session["language"].ToString() == "en-GB")
                {
                    Utilities.MessageBox_UpdatePanel(udp, "Your Mobile Varification Is Unsuccessful. You Entered Wrong OTP");
                }
                else
                {
                    Utilities.MessageBox_UpdatePanel(udp, "गलत ओ. टी. पी. के कारण आपका मोबाईल जाँच असफल हो गया है|");
                }
                //Utilities.MessageBox_UpdatePanel(udp, "Your Mobile Varification Is Unsuccessful. You Entered Wrong OTP");
                txt_otp.Text    = "";
                div_otp.Visible = false;
            }
        }
    }
 protected void btn_otp_Click(object sender, EventArgs e)
 {
     if (Session["CheckRefresh"].ToString() == ViewState["CheckRefresh"].ToString())
     {
         Session["CheckRefresh"] = Server.UrlDecode(System.DateTime.Now.ToString());
         string OTP = Session["OTP"].ToString();
         if (txt_otp.Text == OTP)
         {
             HttpBrowserCapabilities browse = Request.Browser;
             if (Session["VERIFICATION_TYPE"].ToString() == "User")
             {
                 bl.RegistrationID = Session["REGID"].ToString();
                 dt = dl.Select_User_detail(bl);
                 if (dt.table.Rows.Count > 0)
                 {
                     bl.UserID         = dt.table.Rows[0]["UserID"].ToString();
                     bl.RegistrationID = dt.table.Rows[0]["RegistrationID"].ToString();
                     bl.Password       = dt.table.Rows[0]["Password"].ToString();
                     bl.RollID         = "2";
                     bl.PasswordChange = "N";
                     bl.Active         = "Y";
                     bl.IsValid        = "Y";
                     bl.UserIP         = ul.GetClientIpAddress(this.Page);
                     bl.UserAgent      = Request.UserAgent.ToString();
                     bl.UserOS         = Utilities.System_Info(this.Page);
                     bl.User_browser   = browse.Browser;
                     using (TransactionScope ts = new TransactionScope())
                     {
                         rb = dl.Update_registration(bl);
                         if (rb.status == true)
                         {
                             rb = dl.Insert_Login(bl);
                             if (rb.status == true)
                             {
                                 ts.Complete();
                                 Utilities.MessageBox_UpdatePanel_Redirect(udp, "Your Mobile Varification Is successful. Your Userid is " + bl.UserID + " and Password is That You Have selected", "../LogOut.aspx");
                             }
                         }
                     }
                 }
             }
             else if (Session["VERIFICATION_TYPE"].ToString() == "Rti")
             {
                 bl_rti.RTI_Request_id = Session["RTI_ID"].ToString();
                 dt = dl_rti.GetRtiStatus_detail(bl_rti);
                 if (dt.table.Rows.Count > 0)
                 {
                     bl_rti.IsValid = dt.table.Rows[0]["isvalid"].ToString();
                 }
                 if (bl_rti.IsValid == "N" || bl_rti.IsValid == "")
                 {
                     bl_rti.RTI_Request_id = Session["RTI_ID"].ToString();
                     bl_rti.IsValid        = "Y";
                     rb = dl_rti.update_Rti_status(bl_rti);
                     if (rb.status == true)
                     {
                         bl_rti.RTI_Request_id = Session["RTI_ID"].ToString();
                         dt = dl_rti.GetRtiStatus_detail(bl_rti);
                         if (dt.table.Rows.Count > 0)
                         {
                             bl_rti.Securitycode = dt.table.Rows[0]["seqcode"].ToString();
                             bl_rti.IsValid      = dt.table.Rows[0]["isvalid"].ToString();
                         }
                         string rti_message = "Your Mobile Varification Is successful. Your Rti Has Been Registered with registration no.: " + bl_rti.RTI_Request_id + " AND Your Security Code is " + bl_rti.Securitycode + ". Please Save Both For Details";
                         Utilities.MessageBox_UpdatePanel_Redirect(udp, rti_message, "../user/UserWelcome.aspx");
                     }
                 }
                 else
                 {
                     txt_otp.Text    = "";
                     div_otp.Visible = false;
                     Utilities.MessageBox_UpdatePanel_Redirect(udp, "Rti Already Registered", "../user/UserWelcome.aspx");
                 }
             }
         }
         else
         {
             Utilities.MessageBox_UpdatePanel(udp, "Your Mobile Varification Is Unsuccessful. You Entered Wrong OTP");
             txt_otp.Text    = "";
             div_otp.Visible = false;
         }
     }
 }