Exemple #1
0
        protected void Verify_Click(object sender, EventArgs e)
        {
            if (this.rbval_text == "")
            {
                this.rbval_text = "Valid";
            }

            this.c_mark = this.z.getMarkInfoByUserID(this.pID);
            this.c_p    = this.z.getPwalletDetailsByID(this.c_mark.log_staff);

            string repname  = c_rep.xname;
            string repemail = c_aos.email1;

            var vapplicant = z.getApplicant(c_mark.log_staff);

            TmOffice toffice       = z.getLastTmOfficeByID(c_mark.log_staff);
            string   oldstatus     = "Verification";
            string   olddatastatus = "Fresh";

            //if (toffice != null)
            //{
            //    oldstatus = z.getCurrentStage2(toffice);
            //    olddatastatus = toffice.data_status;
            //}
            this.succ = this.z.a_tm_office(this.c_mark.log_staff, this.admin_status, this.rbValid.SelectedValue, this.comment.Text, "", "", "", this.admin);
            if (this.succ != "0")
            {
                if (this.rbValid.SelectedValue == "Kiv")
                {
                    z.sendemail2(repname, c_mark, repemail, this.comment.Text, this.admin_status, this.admin_status, oldstatus, olddatastatus, c_p.validationID);
                }
                base.Response.Write("<script language=JavaScript>alert('Data verified successfully')</script>");
                base.Response.Redirect("./verify_data.aspx");
            }
            else
            {
                base.Response.Write("<script language=JavaScript>alert('Data not verified, Please try again later')</script>");
            }
        }
Exemple #2
0
 public List<TmOffice> getCurrentTmOfficeDetailsByID(string pwalletID, string admin_status, string data_status)
 {
     List<TmOffice> list = new List<TmOffice>();
     SqlConnection connection = new SqlConnection(this.Connect());
     SqlCommand command = new SqlCommand("SELECT top 1 * FROM tm_office where pwalletID='" + pwalletID + "' AND admin_status='" + admin_status + "' AND data_status='" + data_status + "' ORDER BY ID ASC", connection);
     connection.Open();
     SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
     while (reader.Read())
     {
         TmOffice office2 = new TmOffice();
         office2.ID = reader["ID"].ToString();
         office2.pwalletID = reader["pwalletID"].ToString();
         office2.admin_status = reader["admin_status"].ToString();
         office2.data_status = reader["data_status"].ToString();
         office2.xcomment = reader["xcomment"].ToString();
         office2.xdoc1 = reader["xdoc1"].ToString();
         office2.xdoc2 = reader["xdoc2"].ToString();
         office2.xdoc3 = reader["xdoc3"].ToString();
         office2.xofficer = reader["xofficer"].ToString();
         office2.reg_date = reader["reg_date"].ToString();
         office2.xvisible = reader["xvisible"].ToString();
         TmOffice item = office2;
         list.Add(item);
     }
     reader.Close();
     return list;
 }
Exemple #3
0
 public List<TmOffice> getTmOfficeDetailsByID(string ID)
 {
     List<TmOffice> list = new List<TmOffice>();
     SqlConnection connection = new SqlConnection(this.Connect());
     SqlCommand command = new SqlCommand("SELECT * FROM tm_office WHERE pwalletID='" + ID + "' ", connection);
     connection.Open();
     SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
     while (reader.Read())
     {
         TmOffice office2 = new TmOffice();
         office2.ID = "";
         office2.pwalletID = "";
         office2.admin_status = "";
         office2.data_status = "";
         office2.xcomment = "";
         office2.xdoc1 = "";
         office2.xdoc2 = "";
         office2.xdoc3 = "";
         office2.xofficer = "";
         office2.reg_date = "";
         office2.xvisible = "";
         TmOffice item = office2;
         item.ID = reader["ID"].ToString();
         item.pwalletID = reader["pwalletID"].ToString();
         item.admin_status = reader["admin_status"].ToString();
         item.data_status = reader["data_status"].ToString();
         item.xcomment = reader["xcomment"].ToString();
         item.xdoc1 = reader["xdoc1"].ToString();
         item.xdoc2 = reader["xdoc2"].ToString();
         item.xdoc3 = reader["xdoc3"].ToString();
         item.xofficer = reader["xofficer"].ToString();
         item.reg_date = reader["reg_date"].ToString();
         item.xvisible = reader["xvisible"].ToString();
         list.Add(item);
     }
     reader.Close();
     return list;
 }
Exemple #4
0
        public int addReversal(TmOffice c_tm_office)
        {
            string connectionString = this.Connect();
            int succ = 0;
            SqlConnection connection = new SqlConnection(connectionString);
            SqlCommand command = connection.CreateCommand();
            command.CommandText = "INSERT INTO tm_office (pwalletID,admin_status,data_status,xcomment,xdoc1,xdoc2,xdoc3,xofficer,reg_date,xvisible) VALUES ('" + c_tm_office.pwalletID + "','" + c_tm_office.admin_status + "','" + c_tm_office.data_status + "','" + c_tm_office.xcomment + "','" + c_tm_office.xdoc1 + "','" + c_tm_office.xdoc2 + "','" + c_tm_office.xdoc3 + "','" + c_tm_office.xofficer + "','" + c_tm_office.reg_date + "','" + c_tm_office.xvisible + "') SELECT SCOPE_IDENTITY()";
            connection.Open();
            succ =Convert.ToInt32(command.ExecuteScalar());

            if (succ > 0)
            {
                SqlCommand command2 = connection.CreateCommand();
                command2.CommandText = "update pwallet set  status='" + c_tm_office.admin_status + "' ,data_status='" + c_tm_office.data_status + "' where ID='" + c_tm_office.pwalletID + "' ";
                succ += command2.ExecuteNonQuery();
            }
            connection.Close();
            return succ;
        }
Exemple #5
0
        protected string getCurrentStage(TmOffice lt_pwx)
        {
            if (lt_pwx.admin_status == "1")
            {
                return("VERIFICATION UNIT");
            }
            if (lt_pwx.admin_status == "2")
            {
                return("SEARCH UNIT");
            }
            if (lt_pwx.admin_status == "22")
            {
                return("SEARCH 2 UNIT");
            }
            if (lt_pwx.admin_status == "3")
            {
                if (lt_pwx.data_status == "Search Conducted")
                {
                    return("SEARCH 2 unit");
                }
                else if (lt_pwx.data_status == "Re-examine")
                {
                    return("EXAMINERS UNIT");
                }
            }
            if (lt_pwx.admin_status == "33")
            {
                return("EXAMINERS UNIT");
            }
            if (lt_pwx.admin_status == "4")
            {
                return("ACCEPTANCE UNIT");
            }
            if (lt_pwx.admin_status == "5")
            {
                if (lt_pwx.data_status == "Accepted")
                {
                    return("PUBLICATION UNIT");
                }
                else if (lt_pwx.data_status == "Deferred")
                {
                    return("PUBLICATION UNIT");
                }
            }
            if (lt_pwx.admin_status == "6")
            {
                return("OPPOSITION UNIT");
            }
            if (lt_pwx.admin_status == "7")
            {
                if (lt_pwx.data_status == "Not Opposed")
                {
                    return("CERTIFICATION UNIT");
                }
                else if (lt_pwx.data_status == "Deferred")
                {
                    return("CERTIFICATION UNIT");
                }
            }
            if (lt_pwx.admin_status == "8")
            {
                return("Registrars REGISTRARS UNIT");
            }
            if (lt_pwx.admin_status == "9")
            {
                return("Registrars REGISTRARS UNIT");
            }

            return("");
        }