Example #1
0
        //public string Designation
        //{
        //    get { return _Designation; }
        //    set { _Designation = value; }
        //}
        //public int DepartmentId
        //{
        //    get { return _DepartmentId; }
        //    set { _DepartmentId = value; }
        //}
        //public DateTime DOJ
        //{
        //    get { return _DOJ; }
        //    set { _DOJ = value; }
        //}
        //public DateTime DOC
        //{
        //    get { return _DOC; }
        //    set { _DOC = value; }
        //}
        //public string Bio
        //{
        //    get { return _Bio; }
        //    set { _Bio = value; }
        //}
        //public string Degree
        //{
        //    get { return _Degree; }
        //    set { _Degree = value; }
        //}
        //public string Photo
        //{
        //    get { return _Photo; }
        //    set { _Photo = value; }
        //}
        //public int Status
        //{
        //    get { return _Status; }
        //    set { _Status = value; }
        //}
        //public int Years
        //{
        //    get { return _Years; }
        //    set { _Years = value; }
        //}
        #endregion

        #region Public Methods

        public int Insert()
        {
            SqlParameter[] param = new SqlParameter[12];
            param[0]  = new SqlParameter("@Mode", "Insert");
            param[1]  = new SqlParameter("@First_Name", _FirstName);
            param[2]  = new SqlParameter("@Last_Name", _LastName);
            param[3]  = new SqlParameter("@UserName", _username);
            param[4]  = new SqlParameter("@DOB", _DOB);
            param[5]  = new SqlParameter("@Address", _Address);
            param[6]  = new SqlParameter("@Mobile", _Mobile);
            param[7]  = new SqlParameter("@Email", _Email);
            param[8]  = new SqlParameter("@Password", _password);
            param[9]  = new SqlParameter("@Seq_que", _seq_que);
            param[10] = new SqlParameter("@Ans", _answer);
            param[11] = new SqlParameter("@Type", _type);
            //param[9] = new SqlParameter("@Type",_type);
            //param[4] = new SqlParameter("@City", _City);
            //param[5] = new SqlParameter("@State", _State);
            //param[6] = new SqlParameter("@Zip", _Zip);
            //param[7] = new SqlParameter("@Phone", _Phone);
            //param[8] = new SqlParameter("@Mobile", _Mobile);
            //param[9] = new SqlParameter("@Email", _Email);
            //param[10] = new SqlParameter("@Designation", _Designation);
            //param[11] = new SqlParameter("@DepartmentId", _DepartmentId);
            //param[12] = new SqlParameter("@DOJ", _DOJ);
            //param[13] = new SqlParameter("@DOC", _DOC);
            //param[14] = new SqlParameter("@Bio", _Bio);
            //param[15] = new SqlParameter("@Degree", _Degree);
            //param[16] = new SqlParameter("@Photo", _Photo);
            //param[17] = new SqlParameter("@Status", _Status);
            return(objDBBridge.ExecuteNonQuery(_spName, param));
        }
Example #2
0
    public bool updatepayments()
    {
        SqlParameter[] param = new SqlParameter[5];
        param[0] = new SqlParameter("@phoneno", _Phoneno);
        param[1] = new SqlParameter("@messageid", _message_id);
        param[2] = new SqlParameter("@amount", _amount);
        param[3] = new SqlParameter("@username", _username);
        param[4] = new SqlParameter("@controller", _controller);
        int test = mybridge.ExecuteNonQuery(_spname, param);

        if (test <= 0)
        {
            test = mybridge.ExecuteNonQuery("pendingmoney", param);
            return(false);
        }
        else if (test > 0)
        {
            return(true);
        }

        else
        {
            return(false);
        }
    }
 public int Insert()
 {
     SqlParameter[] param = new SqlParameter[2];
     param[0] = new SqlParameter("@Mode", "Insert");
     param[1] = new SqlParameter("@DepartmentName", _departmentName);
     return(objDBBridge.ExecuteNonQuery(_spName, param));
 }
Example #4
0
 public int Insert()
 {
     SqlParameter[] param = new SqlParameter[4];
     param[0] = new SqlParameter("@Mode", "Insert");
     param[1] = new SqlParameter("@Lawyername", _lawyername);
     param[2] = new SqlParameter("@Consumername", _consumername);
     param[3] = new SqlParameter("@Comment", _comments);
     return(objDBBridge.ExecuteNonQuery(_spName, param));
 }
Example #5
0
 public int Insert()
 {
     SqlParameter[] param = new SqlParameter[4];
     param[0] = new SqlParameter("@Mode", "Insert");
     param[1] = new SqlParameter("@Topicname", _topic_name);
     param[2] = new SqlParameter("@Topic_description", _topic_description);
     param[3] = new SqlParameter("@Post_by", _post_by);
     return(objDBBridge.ExecuteNonQuery(_spName, param));
 }
Example #6
0
 public int Insert()
 {
     SqlParameter[] param = new SqlParameter[5];
     param[0] = new SqlParameter("@Mode", "Insert");
     param[1] = new SqlParameter("@Eventname", _event_name);
     param[2] = new SqlParameter("@Time", _time);
     param[3] = new SqlParameter("@Date", _date);
     param[4] = new SqlParameter("@Lawyername", _lawyername);
     return(objDBBridge.ExecuteNonQuery(_spName, param));
 }
Example #7
0
 public int Insert()
 {
     SqlParameter[] param = new SqlParameter[6];
     param[0] = new SqlParameter("@Mode", "Insert");
     param[1] = new SqlParameter("@LoginName", _loginName);
     param[2] = new SqlParameter("@Email", _email);
     param[3] = new SqlParameter("@Username", _username);
     param[4] = new SqlParameter("@Password", _password);
     param[5] = new SqlParameter("@Rights", _rights);
     return(objDBBridge.ExecuteNonQuery(_spName, param));
 }
Example #8
0
 public int Insert()
 {
     SqlParameter[] param = new SqlParameter[7];
     param[0] = new SqlParameter("@StartDate", _startDate);
     param[1] = new SqlParameter("@EndDate", _endDate);
     param[2] = new SqlParameter("@TrainingDetails", _trainingDetails);
     param[3] = new SqlParameter("@Effectiveness", _effectiveness);
     param[4] = new SqlParameter("@JobType", _jobType);
     param[5] = new SqlParameter("@EmployeeId", _employeeId);
     param[6] = new SqlParameter("@Mode", "Insert");
     return(objDBBridge.ExecuteNonQuery(_spname, param));
 }
Example #9
0
 public int InsertPlayerBet()
 {
     SqlParameter[] param = new SqlParameter[10];
     param[0] = new SqlParameter("@Mode", "insertbet");
     param[1] = new SqlParameter("@betdate", DateTime.Now);
     param[2] = new SqlParameter("@betmoney", _betmoney);
     param[3] = new SqlParameter("@bet_type", _bettype);
     param[5] = new SqlParameter("@BetServiceMatchNo", _matchno);
     param[6] = new SqlParameter("@oddname", _oddname);
     param[7] = new SqlParameter("@betid", _RecieptID.Trim());
     param[8] = new SqlParameter("@username", _username);
     param[9] = new SqlParameter("@setno", _matchno);
     return(objDBBridge.ExecuteNonQuery(_spName, param));
 }
 public int Insert()
 {
     SqlParameter[] param = new SqlParameter[9];
     param[0] = new SqlParameter("@Mode", "Insert");
     param[1] = new SqlParameter("@Lawyername", _lawyername);
     param[2] = new SqlParameter("@Clientname", _clientname);
     param[3] = new SqlParameter("@Remarks", _Remarks);
     param[4] = new SqlParameter("@Details", _Details);
     param[5] = new SqlParameter("@Address", _Address);
     param[6] = new SqlParameter("@Mobile", _Mobile);
     param[7] = new SqlParameter("@Email", _Email);
     param[8] = new SqlParameter("@id", _no);
     return(objDBBridge.ExecuteNonQuery(_spName, param));
 }
Example #11
0
 public int Insert()
 {
     SqlParameter[] param = new SqlParameter[11];
     param[0]  = new SqlParameter("@Mode", "Insert");
     param[1]  = new SqlParameter("@First_Name", _FirstName);
     param[2]  = new SqlParameter("@Last_Name", _LastName);
     param[3]  = new SqlParameter("@UserName", _username);
     param[4]  = new SqlParameter("@DOB", _DOB);
     param[5]  = new SqlParameter("@Address", _Address);
     param[6]  = new SqlParameter("@Mobile", _Mobile);
     param[7]  = new SqlParameter("@Email", _Email);
     param[8]  = new SqlParameter("@Password", _password);
     param[9]  = new SqlParameter("@Seq_que", _seq_que);
     param[10] = new SqlParameter("@Ans", _answer);
     return(objDBBridge.ExecuteNonQuery(_spName, param));
 }
Example #12
0
 public int Insert()
 {
     SqlParameter[] param = new SqlParameter[11];
     param[0]  = new SqlParameter("@Mode", "Insert");
     param[1]  = new SqlParameter("@Lawyername", _lawyer_name);
     param[2]  = new SqlParameter("@Working_field", _working_field);
     param[3]  = new SqlParameter("@Experience", _experience);
     param[4]  = new SqlParameter("@Address", _address);
     param[5]  = new SqlParameter("@City", _city);
     param[6]  = new SqlParameter("@State", _state);
     param[7]  = new SqlParameter("@Contact_O", _contact_1);
     param[8]  = new SqlParameter("@Contact_M", _contact_2);
     param[9]  = new SqlParameter("@Email", _email);
     param[10] = new SqlParameter("@About", _about_me);
     return(objDBBridge.ExecuteNonQuery(_spName, param));
 }
Example #13
0
 public int Delete()
 {
     SqlParameter[] param = new SqlParameter[2];
     param[0] = new SqlParameter("@Mode", "Delete");
     param[1] = new SqlParameter("@EmployeeId", _EmployeeId);
     return(objDBBridge.ExecuteNonQuery(_spName, param));
 }
Example #14
0
 public int Insert()
 {
     SqlParameter[] param = new SqlParameter[18];
     param[0]  = new SqlParameter("@Mode", "Insert");
     param[1]  = new SqlParameter("@Name", _name);
     param[2]  = new SqlParameter("@DOB", _dob);
     param[3]  = new SqlParameter("@Degree", _degree);
     param[4]  = new SqlParameter("@Address", _address);
     param[5]  = new SqlParameter("@City", _city);
     param[6]  = new SqlParameter("@State", _state);
     param[7]  = new SqlParameter("@Zip", _zip);
     param[8]  = new SqlParameter("@Phone", _phone);
     param[9]  = new SqlParameter("@Mobile", _mobile);
     param[10] = new SqlParameter("@Email", _email);
     param[11] = new SqlParameter("@Designation", _designation);
     param[12] = new SqlParameter("@DepartmentID", _departmentID);
     param[13] = new SqlParameter("@DOJ", _doj);
     param[14] = new SqlParameter("@DOC", _doc);
     param[15] = new SqlParameter("@Bio", _bio);
     param[16] = new SqlParameter("@Photo", _photo);
     param[17] = new SqlParameter("@Status", _status);
     return(objDBBridge.ExecuteNonQuery(_spName, param));
 }
Example #15
0
    public string epay()
    {
        DataTable dt    = new DataTable();
        string    res   = null;
        string    users = null;

        try
        {
            SqlParameter[] dtm = new SqlParameter[5];

            dtm[0] = new SqlParameter("@username", _username.Trim());
            dtm[1] = new SqlParameter("@balbefore", balbefore);
            dtm[2] = new SqlParameter("@amount", _amount);
            dtm[3] = new SqlParameter("@serial", _serial.Trim());
            dtm[4] = new SqlParameter("@controller", _controller);
            //dtm[2] = new SqlParameter("@serial", _serial.Trim());

            dt = mybridge.ExecuteDataset("pay_epay", dtm).Tables[0];
            int no = dt.Rows.Count;
            if (no == 0)
            {
                res = "failed";
                return(mybridge.ExecuteNonQuery("", dtm).ToString());
            }



            else
            {
                res = "failed";
            }
        }
        catch (Exception ex)
        {
            String error = ex.Message;
            res = "failed";
        }
        return(res);
    }
Example #16
0
    public string sendpayment(String apiusername, String apipassword, String amount, String sender, String reason, string msgid)
    {
        string result = null, message = "No message";

        users.Phoneno = sender;
        if ((reason.ToLower() == "global") || (reason.ToLower() == "smsbet"))
        {
            users.source = "UGMART_API";
        }
        else
        {
            return("INVALID PAYMENT");
        }
        if (CheckMMPayment(msgid))
        {
            return(msgid + " transaction ID already logged.");
        }
        users.msgid   = msgid;
        users.Message = amount;
        if ((reason.ToLower() == "global") || (reason.ToLower() == "smsbet"))
        {
            users.reason = reason = sender;
        }
        else
        {
            users.reason = sender;
        }
        users.recievedmmsms();



        try
        {
            if ((apiusername == "globalbets") && (apipassword == "dewilos"))
            {
                if (reason.Substring(0, 3) != "256")
                {
                    if (reason.StartsWith("0"))
                    {
                        reason = "256" + reason.Substring(1);
                    }
                }
                if (sender.Substring(0, 3) != "256")
                {
                    if (sender.StartsWith("0"))
                    {
                        sender = "256" + sender.Substring(1);
                    }
                }

                users.Phoneno = sender;
                users.msgid   = msgid;
                users.Message = amount;
                if ((reason.ToLower() == "global") || (reason.ToLower() == "smsbet"))
                {
                    users.reason = reason = sender;
                    users.source = "UGMART_API";
                }
                else
                {
                    users.reason = sender;
                }

                _amount       = Convert.ToDouble(amount);
                _Phoneno      = sender;
                _message_id   = msgid;
                _username     = sender;
                _controller   = users.source;
                users.Phoneno = _Phoneno;

                try
                {
                    SqlParameter[] param = new SqlParameter[2];
                    param[0] = new SqlParameter("@Mode", "getusernamedeposit");
                    param[1] = new SqlParameter("@userphonenumber", sender);
                    DataTable dtDepartment = new DataTable();
                    dtDepartment = objDBBridge.ExecuteDataset("Sp_Admin", param).Tables[0];
                    if (dtDepartment.Rows.Count != 0)
                    {
                        DataRow drDepartment;
                        drDepartment = dtDepartment.Rows[0];
                        _username    = drDepartment["username"].ToString();
                    }
                }
                catch (Exception eee) { }

                if (updatepayments())
                {
                    if (users.getpendingset())
                    {
                        message = "";
                        message = successmessage(Convert.ToDecimal(users.betmoney), users.betId, Convert.ToDecimal(users.setodd), Convert.ToDecimal(amount), sender);
                        sendcustomersms(message, sender);
                        users.Message = message;
                        users.mmresponsesms();
                        return(message);
                    }
                    else
                    {
                        users.getfixmessage();
                        {
                            users.Username = sender;
                            users.getuser_info();
                        }
                        message = "Your+Globalbets+betting+account+has+been+topped+up+with+UGX+" + amount + ".+Your+betting+account+balance+is+UGX" + (users.balance + amount) + ".+Start+betting+now.+www.smsbet.ug";
                        sendcustomersms(message, sender);
                        users.Message = message;
                        users.mmresponsesms();
                        return(message);
                    }
                }
                else
                { // register new user
                    SqlParameter[] param = new SqlParameter[6];
                    param[0] = new SqlParameter("@username", _username);
                    param[1] = new SqlParameter("@amount", Convert.ToDecimal(amount));
                    param[2] = new SqlParameter("@messageid", messageid);
                    param[3] = new SqlParameter("@controller", "UGMART_API");
                    param[4] = new SqlParameter("@transaction", "Deposited money through Mobile money");
                    param[5] = new SqlParameter("@phone", sender);
                    int check = objDBBridge.ExecuteNonQuery("updateaccount", param);
                    if (check > 0)
                    {
                        {
                            users.Username = sender;
                            users.getuser_info();
                        }
                        string msg = "Thanks for joining SMS Bet. Bet using your phone and get results on phone. Visit www.smsbet.ug for more details.";
                        message = "Your+Globalbets+betting+account+has+been+topped+up+with+UGX+" + amount + ".+Your+betting+account+balance+is+UGX" + (users.balance + amount) + ".+Start+betting+now.+www.smsbet.ug";
                        sendcustomersms(msg, sender);
                        sendcustomersms(message, sender);
                        users.Message = msg;
                        users.responsesms();
                        users.Message = message;
                        users.responsesms();
                    }
                    else
                    {
                        string msg = "Something went wrong! Your account has not been credited. Please try again. Call 0793993375 for help or Visit www.smsbet.ug for more details.";
                        sendcustomersms(msg, sender);
                        users.Message = msg;
                        users.responsesms();
                    }
                    return(message);
                }
            }
            else
            {
                result = "Your account has not been credited. Please try again. Visit www.smsbet.ug for more details.";
            }
        }
        catch (Exception ex)
        {
            string error = ex.Message;
            result = "Your account has not been credited. Please try again shortly. Visit www.smsbet.ug for more details.";
        }
        return(result);
    }