Exemple #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string Application_ID = Request.Params["Application_ID"].ToString();
        string passportType   = Request.Params["passportType"].ToString();
        string noP            = Request.Params["NoOfPages"].ToString();
        int    noOfPages      = int.Parse(noP);

        PassportBusinessLayer.PassportBL Pbl = new PassportBusinessLayer.PassportBL();
        int result = Pbl.CheckApplicationID(Application_ID);

        if (result == 0)
        {
            PassportBusinessObjects.PassportType pType   = new PassportType(passportType, noOfPages, Application_ID);
            PassportBusinessLayer.PassportBL     pTypeBL = new PassportBusinessLayer.PassportBL();
            int res = pTypeBL.PassportTypeEntry(pType);
            if (res > 0)
            {
                Response.Redirect("http://localhost:62241/passportStateDistrictRpo.html?=" + Application_ID);
            }
            else
            {
                Response.Write("<script>alert('Invalid Application Id')</script><script>window.location.href ='http://localhost:62241/Passport.aspx'</script>");
            }
        }
        else
        {
            Response.Write("<script>alert('Application ID already Exits')</script><script>window.location.href ='http://localhost:62241/Passport.aspx'</script>");
        }
    }
Exemple #2
0
    //[WebMethod]
    //public static void Payment(string CardNumber,string ApplicationID)
    //{
    //    PassportBusinessLayer.PassportBL pbl = new PassportBusinessLayer.PassportBL();
    //    DataTable dt = pbl.Payment(CardNumber, ApplicationID);
    //    string s = "";
    //    for (int i = 0; i < dt.Rows.Count; i++)
    //    {
    //        for (int j = 0; j < dt.Columns.Count; j++)
    //        {
    //            s += dt.Rows[i][j].ToString()+",";
    //        }
    //    }
    //    string[] array = s.Split(',');
    //    long Balance = long.Parse(array[3]);
    //    if (Balance!=0)
    //    {

    //        int res = paymentPage.PayMentEntry(ApplicationID,CardNumber,Balance);
    //        if (res > 0)
    //        {
    //            string result = "<script>alert('Payment SucessFull')</script>";
    //            Console.Write(result);
    //        }
    //    }
    //    //return s;
    //}
    public static int PayMentEntry(string ApplicationID, string CardNumber, long Balance)
    {
        PassportBusinessLayer.PassportBL pbl = new PassportBusinessLayer.PassportBL();
        int res = pbl.PassportPayMentEntry(ApplicationID, CardNumber, Balance);

        return(res);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        string ApplicationID     = Request.Params["ApplicationID"].ToString();
        string F_name            = Request.Params["F_name"].ToString();
        string M_name            = Request.Params["M_name"].ToString();
        string L_name            = Request.Params["L_name"].ToString();
        string Father_Name       = Request.Params["Father_Name"].ToString();
        string Mother_Name       = Request.Params["Mother_Name"].ToString();
        string Dob               = Request.Params["DateOfBirth"].ToString();
        string Email             = Request.Params["Email"].ToString();
        string Phone_No          = Request.Params["Phone_no"].ToString();
        string Present_Address   = Request.Params["Present_Address"].ToString();
        string Permanent_Address = Request.Params["Permanent_Address"].ToString();
        string City              = Request.Params["City"].ToString();
        string State             = Request.Params["State"].ToString();
        string Pin_Code          = Request.Params["Pin_Code"].ToString();
        int    PinCode           = int.Parse(Pin_Code);
        string Country           = Request.Params["Country"].ToString();
        string Crime_Record      = Request.Form["record"].ToString();
        string C_Record          = "";

        if (Crime_Record == "Yes")
        {
            C_Record = Request.Params["C_Record"].ToString();
        }
        string Running_Case = Request.Form["r_case"].ToString();
        string r_case       = "";

        if (Running_Case == "Yes")
        {
            r_case = Request.Params["r_case"].ToString();
        }
        string Pan_Number        = Request.Params["Pan_Card"].ToString();
        string Aadhar_Number     = Request.Params["Aadhar_Card"].ToString();
        string Edu_Details       = Request.Params["Education_Details"].ToString();
        string Edu_Proof         = Request.Params["Education_Proof"].ToString();
        string Birth_Certificate = Request.Params["Birth_Certificate"].ToString();
        string Address_Proof     = Request.Params["Address_Proof"].ToString();

        string   d   = Convert.ToDateTime(Dob).ToString("dd-MM-yyyy");
        DateTime DOB = DateTime.ParseExact(d, "dd-MM-yyyy", null);

        PassportBusinessObjects.ApplicantDetails PAD = new PassportBusinessObjects.ApplicantDetails(ApplicationID, Father_Name,
                                                                                                    Mother_Name, Present_Address, Permanent_Address, C_Record, r_case, Country, DOB, Phone_No, City, State, PinCode, Email,
                                                                                                    Pan_Number, Aadhar_Number, Address_Proof, Edu_Proof, Edu_Details, Birth_Certificate);
        PassportBusinessLayer.PassportBL PBL = new PassportBusinessLayer.PassportBL();
        int res = PBL.ApplicantDetails(PAD);

        if (res > 0)
        {
            Response.Redirect("http://localhost:62241/paymentPage.html?=" + ApplicationID);
            //Response.Write("<script>alert('Details Filled')</script>");
        }
    }
Exemple #4
0
    public static string ApplicantDetails(string ApplicationID)
    {
        PassportBusinessLayer.PassportBL pbl = new PassportBusinessLayer.PassportBL();
        DataTable dt = pbl.ApplicantDetails(ApplicationID);
        string    applicantDetails = "";

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            for (int j = 0; j < dt.Columns.Count; j++)
            {
                applicantDetails += dt.Rows[i][j].ToString() + ",";
            }
        }
        return(applicantDetails);
    }
Exemple #5
0
    public static string SelectRpo(string stateID)
    {
        PassportBusinessLayer.PassportBL pbl = new PassportBusinessLayer.PassportBL();
        DataTable dt  = pbl.SelectRpo(stateID);
        string    Rpo = "";

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            for (int j = 0; j < dt.Columns.Count; j++)
            {
                Rpo += dt.Rows[i][j].ToString() + ",";
            }
        }
        return(Rpo);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        string Application_ID = Request.Params["Application_ID"].ToString();

        PassportBusinessLayer.PassportBL Pbl = new PassportBusinessLayer.PassportBL();
        int res = Pbl.ApplicationUser(Application_ID);

        if (res > 0)
        {
            ViewState["Application_ID"] = Application_ID;
            Response.Redirect("http://localhost:62241/Passport_Type.html?=" + Application_ID);
        }
        else
        {
            Response.Write("<script>alert('Invalid Application Id')</script><script>window.location.href ='http://localhost:62241/Passport.aspx'</script>");
        }
    }
Exemple #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string PassportNumber = Request.Params["passport_number"].ToString();
        string Name           = Request.Params["name"].ToString();
        string Months         = Request.Params["months"].ToString();
        string Year           = Request.Params["year"].ToString();

        PassportBusinessLayer.PassportBL pbl = new PassportBusinessLayer.PassportBL();
        DataTable dt  = pbl.PassPortDetails(PassportNumber, Name);
        string    str = "";

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            for (int j = 0; j < dt.Columns.Count; j++)
            {
                str += dt.Rows[i][j].ToString() + ",";
            }
        }
    }
Exemple #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string   RpoState        = Request.Params["State_Selection"].ToString();
        string   District_Rpo    = Request.Params["District_Rpo"].ToString();
        string   ApplicationID   = Request.Params["ApplicationID"].ToString();
        string   Rpo             = Request.Params["Rpo"].ToString();
        string   Date            = Request.Params["AppointmentDate"].ToString();
        string   aD              = Convert.ToDateTime(Date).ToString("dd-MM-yyyy");
        DateTime AppointmnetDate = DateTime.ParseExact(aD, "dd-MM-yyyy", null);

        PassportBusinessObjects.PassportRpo Prpo = new PassportRpo(RpoState, District_Rpo, Rpo, AppointmnetDate, ApplicationID);
        PassportBusinessLayer.PassportBL    pbl  = new PassportBusinessLayer.PassportBL();
        int res = pbl.RpoEntry(Prpo);

        if (res > 0)
        {
            Response.Redirect("http://localhost:62241/Applicant_full_details.html?=" + ApplicationID);
        }
    }
Exemple #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string   Fname            = Request.Params["fname"].ToString();
        string   Mname            = Request.Params["mname"].ToString();
        string   Lname            = Request.Params["lname"].ToString();
        string   Gender           = Request.Params["gender"].ToString();
        string   D                = Request.Params["date"].ToString();
        string   Phone            = Request.Params["phone"].ToString();
        string   Email            = Request.Params["email"].ToString();
        string   pAddress         = Request.Params["pAddress"].ToString();
        string   perAddress       = Request.Params["perAddress"].ToString();
        string   pCode            = Request.Params["pincode"].ToString();
        int      pinCode          = Convert.ToInt32(pCode);
        string   city             = Request.Params["city"].ToString();
        string   state            = Request.Params["state"].ToString();
        string   Country          = Request.Params["country"].ToString();
        string   Education        = Request.Params["education"].ToString();
        string   HintQuestion     = Request.Params["hintqusetion"].ToString();
        string   HintAnswer       = Request.Params["hintanswer"].ToString();
        string   date1            = Convert.ToDateTime(D).ToString("dd-MM-yyyy");
        DateTime Date             = DateTime.ParseExact(date1, "dd-MM-yyyy", null);
        DateTime Application_Date = DateTime.Now;
        string   User_id          = Request.Params["UserID"].ToString();
        Guid     g;

        g = Guid.NewGuid();
        //Console.WriteLine(g);
        long Card_Number = 0;

        Random random = new Random();

        for (int i = 0; i < 17; i++)
        {
            Card_Number += (long)(Math.Pow(10, i) * random.Next(1, 10));
        }

        string Application_ID = Convert.ToString(g);

        PassportBusinessLayer.PassportBL pbl = new PassportBusinessLayer.PassportBL();

        int checkUser = pbl.CheckUser(User_id);

        if (checkUser == 0)
        {
            PassportBusinessObjects.Passport p = new PassportBusinessObjects.Passport(Application_ID, User_id, Fname, Mname, Lname, Gender, pAddress,
                                                                                      perAddress, Country, Date, Phone, city, state, pinCode, Email, Education, HintQuestion, HintAnswer,
                                                                                      Application_Date, Card_Number);
            PassportBusinessLayer.PassportBL Pbl = new PassportBL();
            int res = Pbl.PassPortRegister(p);
            if (res > 0)
            {
                var application_ID = Application_ID;
                Response.Write("<script>alert('Your Application Id = " + application_ID + "')</script><script>alert('Your Card Number Is = " + Card_Number + "')</script><script>window.location.href ='http://localhost:62241/Passport.aspx'</script>");
            }
            else
            {
                Response.Write("<script>alert('Registration Failed')</script><script>window.location.href ='http://localhost:62241/Passport.aspx'</script>");
            }
        }
        else
        {
            Response.Write("<script>alert('User Already Exit')</script><script>window.location.href ='http://localhost:62241/Passport.aspx'</script>");
        }
    }
Exemple #10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string ApplicationID = Request.Params["ApplicationID"].ToString();
        string CardNumber    = Request.Params["Card_Number"].ToString();

        PassportBusinessLayer.PassportBL pbl = new PassportBusinessLayer.PassportBL();
        DataTable dt = pbl.Payment(CardNumber, ApplicationID);

        string s = "";

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            for (int j = 0; j < dt.Columns.Count; j++)
            {
                s += dt.Rows[i][j].ToString() + ",";
            }
        }
        if (s != "")
        {
            string[] array   = s.Split(',');
            string   bal     = array[2].ToString();
            long     Balance = (long)Convert.ToDecimal(bal);
            if (Balance >= 1500)
            {
                PassportBusinessLayer.PassportBL PBL = new PassportBusinessLayer.PassportBL();
                DataTable Dt  = PBL.PassportName(ApplicationID);
                string    str = "";
                for (int i = 0; i < Dt.Rows.Count; i++)
                {
                    for (int j = 0; j < Dt.Columns.Count; j++)
                    {
                        str += Dt.Rows[i][j].ToString();
                    }
                }

                Random random = new Random();
                long   pass   = 0;
                for (int i = 0; i < 12; i++)
                {
                    pass += (long)(Math.Pow(10, i) * random.Next(1, 10));
                }
                string   PassportNumber = pass.ToString();
                string   issue_Date     = DateTime.Now.ToString("dd-MM-yyyy");
                DateTime IssueDate      = DateTime.ParseExact(issue_Date, "dd-MM-yyyy", null);
                DateTime valid_date     = DateTime.Now.AddYears(10);
                string   Val            = valid_date.ToString("dd-MM-yyyy");
                DateTime ValidDate      = DateTime.ParseExact(Val, "dd-MM-yyyy", null);
                //int result =
                PassportBusinessLayer.PassportBL pBl = new PassportBusinessLayer.PassportBL();
                int result = pBl.PassPortDetailsEntry(PassportNumber, IssueDate, ValidDate, str, ApplicationID);
                int res    = paymentPage.PayMentEntry(ApplicationID, CardNumber, Balance);
                if (res > 0 && result > 0)
                {
                    Response.Write("<script>alert('Payment SucessFull')</script>");
                    //Console.Write(result);
                }
                Gridview1.DataSource = pBl.PassportDetails(ApplicationID);
                Gridview1.DataBind();
            }
        }
        else
        {
            Response.Write("<script>alert('Payment UnSucessFull Due To Insufficient Balance')</script>");
        }
    }