コード例 #1
0
    public DataSet BLLFriendRelativeShowById(UserRegistrationBLL ur)
    {
        DataSet ds;

        ds = urUserRegDALObj.DALFriendRelativeShowAllById(ur);
        return(ds);
    }
コード例 #2
0
    public DataSet DalFienSearchFriend(UserRegistrationBLL ur)
    {
        DataSet ds;

        ds = urUserRegDALObj.DALFriendRelativeSearchAllById(ur);
        return(ds);
    }
コード例 #3
0
    //protected void btnUpdateContact_Click(object sender, EventArgs e)
    //{

    //    string Id = tmp.Value;
    //    urUserRegBLLObj.frnrelUserId = Convert.ToString(Session["User"]);
    //    urUserRegBLLObj.frnrelFriendId = Convert.ToString(Id);

    //    urUserRegBLLObj.FrnrelPrefix = Convert.ToString(ddlprefix.SelectedItem.Text);
    //    if (ddlprefix.SelectedItem.Text == null)
    //    {
    //        urUserRegBLLObj.FrnrelPrefix = "Dear";
    //    }
    //    urUserRegBLLObj.Frnrelinfix = Convert.ToString(ddlinfix.SelectedItem.Text);
    //    if (ddlinfix.SelectedItem.Text == null)
    //    {
    //        urUserRegBLLObj.Frnrelinfix = infix[0];
    //    }
    //    urUserRegBLLObj.Frnrelpostfix = Convert.ToString(ddlpostfix.SelectedItem.Text);
    //    if (ddlpostfix.SelectedItem.Text == null)
    //    {
    //        urUserRegBLLObj.Frnrelpostfix = " ";
    //    }

    //    try
    //    {
    //        status = urUserRegBLLObj.BLLPrefixUpdate(urUserRegBLLObj);
    //        if (status == 0)
    //        {
    //            //ScriptManager.RegisterStartupScript(this, typeof(Page), "msg", "alert('User already Exists')", true);
    //        }
    //    }
    //    catch (Exception ex)
    //    {
    //        throw ex;
    //    }

    //    string Sql = "Delete from friendGroupRelation where RelId=" + Id + "  ";
    //    Sql = Sql + " Update FriendRelationMaster set Relation='" + txtRelation.Text.ToString() + "' " +
    //        " where FriRelId=" + Id + " ";
    //    //sql1=Sql+"update "
    //    //for (int i = 0; i < chkGroup.Items.Count - 1; i++)
    //    //{
    //    //    if (chkGroup.Items[i].Selected == true)
    //    //    {
    //    //        Sql = Sql + " Insert into FriendGroupRelation (RelId, GroupId) Values " +
    //    //            " (" + Id + "," + chkGroup.Items[i].Value.ToString() + " ) ";
    //    //    }
    //    //}
    //    CommonCode cc = new CommonCode();
    //    int tmp1 = cc.ExecuteNonQuery(Sql);
    //    urUserRegBLLObj.usrUserId = Convert.ToString(Session["User"]);
    //   DataSet dtFriendRelList = urUserRegBLLObj.BLLFriendRelativeShowById(urUserRegBLLObj);
    //    gvRemoveFriend.DataSource = dtFriendRelList;
    //    gvRemoveFriend.DataBind();

    //    urUserRegBLLObj.frnrelUserId = Convert.ToString(Session["User"]);
    //    string query = "select * from FriendRelationMaster where UserId='" + urUserRegBLLObj.frnrelUserId.ToString() + "'";
    //    DataSet ds = cc.ExecuteDataset(query);
    //    foreach (DataRow dr in ds.Tables[0].Rows)
    //    {
    //        string userid = Convert.ToString(dr["UserId"]);
    //        string frienduserid = Convert.ToString(dr["FriendId"]);

    //    }


    //}



    public void LoadFriendGroup(UserRegistrationBLL ur)
    {
        //chkGroup
        DataTable dtFriendGroup = urUserRegBLLObj.BLLShowAllFriendGroup(urUserRegBLLObj);

        string Sql  = " Select GroupName from UserMaster where usrUserId='" + Convert.ToString(Session["User"]) + "' ";
        string Data = Convert.ToString(cc.ExecuteScalar(Sql));

        string[] tmp = Data.Split(',');
        int      i   = 0;

        foreach (DataRow dr in dtFriendGroup.Rows)
        {
            string tmpName = Convert.ToString(dr["GroupName"]);
            string tmpData = "";
            try
            {
                tmpData = tmp[i].ToString();
            }
            catch
            { }

            if (tmpData != "")
            {
                dr["GroupName"] = tmpData;
            }

            i++;
        }
    }
コード例 #4
0
    //public int BLLUserFriendRelativeRelationUpdate(UIUserRegistrationBLL ur)
    //{
    //    status = urUserRegDALObj.DALFriendRelativeRelationUpdate(ur);
    //    return status;
    //}

    public DataTable BLLShowAllFriendGroup(UserRegistrationBLL ur)
    {
        //status = urUserRegDALObj.DALSelectAllFriendGroup(ur);
        DataTable dt = urUserRegDALObj.DALSelectAllFriendGroup(ur);

        return(dt);
    }
コード例 #5
0
    public void GetPassword(string MobileNo)
    {
        UserRegistrationBLL balobj = new UserRegistrationBLL();
        DataTable           dtUserInfoList;
        CommonCode          cc = new CommonCode();
        int status, smslength;

        balobj.BLLUserPasswordRecovery(MobileNo, out dtUserInfoList, out status);
        if (status == 0)
        {
        }
        else
        {
            DataTable dtUserSMSInfoList = dtUserInfoList;
            DataRow   dRowUserInfo      = dtUserSMSInfoList.Rows[0];
            string    myPassword        = cc.DESDecrypt(Convert.ToString(dRowUserInfo["usrPassword"]));
            string    myName            = Convert.ToString(dRowUserInfo["usrFullName"]);
            string    Message           = "Dear " + myName + " Password for Login is " + myPassword + " Thanks via www.myct.in";
            smslength = Message.Length;

            //cc.SendMessageMahatetSMS("Mahatet", MobileNo, Message, smslength);

            cc.TransactionalSMSCountry("Mahatet", MobileNo, Message, smslength, 20);
        }
    }
コード例 #6
0
ファイル: FriendGroupDAL.cs プロジェクト: Ramkendre/Mycity
    public DataTable DALShowFriendInGroup(UserRegistrationBLL ur)
    {
        using (SqlConnection con = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]))
        {
            try
            {
                SqlParameter[] par = new SqlParameter[3];
                par[0] = new SqlParameter("@groupId", ur.frnrelGroup);
                par[1] = new SqlParameter("@userId", ur.usrUserId);
                ds     = SqlHelper.ExecuteDataset(con, CommandType.StoredProcedure, "UserFriendInGroupShow", par);
                ds.Tables[0].Columns.Add("rowNumber");
                int i = 0;
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    i++;
                    dr["rowNumber"] = i.ToString();
                }
                ds.AcceptChanges();
            }

            catch (SqlException ex)
            {
                throw ex;
            }
            finally
            {
                con.Close();
            }
        }
        return(ds.Tables[0]);
    }
コード例 #7
0
ファイル: FriendGroupDAL.cs プロジェクト: Ramkendre/Mycity
    //For Adding New Country
    //public int DALFriendGroupInsert(FriendGroupBLL fg)
    //{
    //    using (SqlConnection con = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]))
    //    {

    //        try
    //        {
    //            SqlParameter[] par = new SqlParameter[2];
    //            par[0] = new SqlParameter("@friendGroupName",fg.friendGroupName);
    //            par[1] = new SqlParameter("@status", 100);
    //            par[1].Direction = ParameterDirection.Output;

    //            SqlHelper.ExecuteNonQuery(con, CommandType.StoredProcedure, "spFriendGroupInsert", par);
    //            status = (int)par[1].Value;
    //        }
    //        catch (Exception ex)
    //        {
    //            throw ex;
    //        }
    //        finally
    //        {
    //            con.Close();
    //        }
    //    }
    //    return status;
    //}

    //public DataTable DALSelectAllFriendGroup(UserRegistrationBLL ur)
    //{

    //    using (SqlConnection con = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]))
    //    {
    //        try
    //        {
    //            SqlParameter[] par = new SqlParameter[1];
    //            par[0] = new SqlParameter("@usrUserId", ur.usrUserId);
    //            ds = SqlHelper.ExecuteDataset(con, CommandType.StoredProcedure, "GroupSelectbyuser");

    //        }

    //        catch (SqlException ex)
    //        {
    //            throw ex;
    //        }
    //        finally
    //        {
    //            con.Close();
    //        }
    //    }
    //    return ds.Tables[0];
    //}



    //public DataTable DALFriendGroupSelectedById(FriendGroupBLL fg)
    //{
    //    using (SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]))
    //    {
    //        try
    //        {

    //            SqlParameter[] par = new SqlParameter[2];
    //            par[0] = new SqlParameter("@friendGroupId", fg.friendGroupId);

    //            ds = SqlHelper.ExecuteDataset(con, CommandType.StoredProcedure,"spFriendGroupSelectedById", par);

    //        }
    //        catch (SqlException ex)
    //        {
    //            throw ex;
    //        }
    //        finally
    //        {
    //            con.Close();
    //        }
    //    }
    //    return ds.Tables[0];
    //}


    //public DataTable DALFriendGroupNameSelectedById(FriendGroupBLL fg)
    //{
    //    using (SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]))
    //    {
    //        try
    //        {

    //            SqlParameter[] par = new SqlParameter[2];
    //            par[0] = new SqlParameter("@friendGroupName", fg.friendGroupName);

    //            ds = SqlHelper.ExecuteDataset(con, CommandType.StoredProcedure, "spFriendGroupNameSelectedById", par);

    //        }
    //        catch (SqlException ex)
    //        {
    //            throw ex;
    //        }
    //        finally
    //        {
    //            con.Close();
    //        }
    //    }
    //    return ds.Tables[0];
    //}



    //public int DALFriendGroupUpdate(FriendGroupBLL fg)
    //{
    //    using (SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]))
    //    {

    //        try
    //        {
    //            SqlParameter[] par = new SqlParameter[3];
    //            par[0] = new SqlParameter("@friendGroupId", fg.friendGroupId);
    //            par[1] = new SqlParameter("@friendGroupName", fg.friendGroupName);
    //            par[2] = new SqlParameter("@status", 11);
    //            par[2].Direction = ParameterDirection.Output;

    //            SqlHelper.ExecuteNonQuery(con, CommandType.StoredProcedure,"spFriendGroupUpdate", par);

    //            status = (int)par[2].Value;

    //        }
    //        catch (SqlException ex)
    //        {
    //            throw ex;
    //        }
    //        finally
    //        {
    //            con.Close();
    //        }
    //    }
    //    return status;
    //}

    public DataTable DALShowFriendGroupForUser(UserRegistrationBLL ur)
    {
        //Monali
        ArrayList a = new ArrayList();

        string[]  arr;
        ArrayList groupNm = new ArrayList();
        string    MyValue = "";

        using (SqlConnection con = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]))
        {
            try
            {
                // Monali
                SqlParameter[] par = new SqlParameter[3];
                par[0] = new SqlParameter("@userId", ur.usrUserId);


                ds = SqlHelper.ExecuteDataset(con, CommandType.StoredProcedure, "UserFriendGroupSelect", par);
                DataTable dt = ds.Tables[0];
            }

            catch (SqlException ex)
            {
                throw ex;
            }
            finally
            {
                con.Close();
            }
        }
        return(ds.Tables[0]);
    }
コード例 #8
0
    public string GetRegisterToMahatet(string MobileNo, string Fname, string Lname, string address, string pincode, string EmailId)
    {
        int    status, smslength;
        string id = "";

        try
        {
            UserRegistrationBLL balobj = new UserRegistrationBLL();
            CommonCode          cc     = new CommonCode();
            balobj.usrFirstName = Fname;
            balobj.usrLastName  = Lname;
            balobj.usrMobileNo  = MobileNo;
            balobj.usrAddress   = address;
            balobj.usrPIN       = pincode;
            balobj.usrEmailId   = EmailId;
            status = balobj.BLLIsExistUserRegistrationInitial(balobj);
            if (status > 0)
            {
                balobj.usrUserId = System.Guid.NewGuid().ToString();
                Random rnd = new Random();
                balobj.usrPassword = cc.DESEncrypt(Convert.ToString(rnd.Next(10001, 99999)));
                status             = balobj.BLLInsertUserRegistrationInitial(balobj);
                if (status > 0)
                {
                    id = balobj.usrUserId;
                    string myMobileNo      = balobj.usrMobileNo;
                    string myPassword      = cc.DESDecrypt(balobj.usrPassword);
                    string myName          = balobj.usrFirstName;
                    string passwordMessage = "Welcome " + myName + ", to www.mahatet.co.in,Password for ur First Login is " + myPassword + " " + cc.AddSMS(myMobileNo);
                    smslength = passwordMessage.Length;
                    //cc.SendMessageMahatetSMS("Mahatet", myMobileNo, passwordMessage, smslength);

                    cc.TransactionalSMSCountry("Mahatet", myMobileNo, passwordMessage, smslength, 20);
                }
            }
            else
            {
                DataSet ds = new DataSet();
                ds = balobj.BLLGetUserIdPassword(balobj);
                string name     = Convert.ToString(ds.Tables[0].Rows[0]["FullName"]);
                string password = Convert.ToString(ds.Tables[0].Rows[0]["usrPassword"]);
                password = cc.DESDecrypt(password);
                id       = Convert.ToString(ds.Tables[0].Rows[0]["usrUserid"]);
                string passwordMessage = "Welcome " + name + ", to www.mahatet.co.in,Password is " + password + " " + cc.AddSMS(MobileNo);
                smslength = passwordMessage.Length;
                //cc.SendMessageMahatetSMS("Mahatet", MobileNo, passwordMessage, smslength);

                cc.TransactionalSMSCountry("Mahatet", MobileNo, passwordMessage, smslength, 20);
            }
        }
        catch (Exception ex)
        { }
        // Insert into [Come2MyCityDB].[dbo].[sendercode](ProjectName,Code)values('Mahatet',20)
        return(id);
    }
コード例 #9
0
ファイル: ExamMyct.cs プロジェクト: Ramkendre/Mycity
    public string GetRegisterRecord(string MobileNo, string Fname, string Lname, string address, string pincode, string status)
    {
        int    i, smslength;
        string id = "";
        UserRegistrationBLL balobj = new UserRegistrationBLL();
        CommonCode          cc     = new CommonCode();

        balobj.usrFirstName = Fname;
        balobj.usrLastName  = Lname;
        balobj.usrMobileNo  = MobileNo;
        balobj.usrAddress   = address;
        balobj.usrPIN       = pincode;
        i = balobj.BLLIsExistUserRegistrationInitial(balobj);
        if (i > 0)
        {
            balobj.usrUserId = System.Guid.NewGuid().ToString();
            Random rnd = new Random();
            balobj.usrPassword = cc.DESEncrypt(Convert.ToString(rnd.Next(10001, 99999)));
            i = balobj.BLLInsertUserRegistrationInitial(balobj);
            if (i > 0)
            {
                id = balobj.usrUserId;
                string myMobileNo      = balobj.usrMobileNo;
                string myPassword      = cc.DESDecrypt(balobj.usrPassword);
                string myName          = balobj.usrFirstName;
                string passwordMessage = "Welcome " + myName + ", to www.exam.myct.in,for ur First Login Username="******" & Password is " + myPassword + "  " + cc.AddSMS(myMobileNo);
                smslength = passwordMessage.Length;
                cc.TransactionalSMSCountry("OnlineExam", myMobileNo, passwordMessage, smslength, 22);
            }
        }
        else
        {
            if (status == "1")
            {
                DataSet ds = new DataSet();
                ds = balobj.BLLGetUserIdPassword(balobj);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    string name     = Convert.ToString(ds.Tables[0].Rows[0]["FullName"]);
                    string password = Convert.ToString(ds.Tables[0].Rows[0]["usrPassword"]);
                    password = cc.DESDecrypt(password);
                    id       = Convert.ToString(ds.Tables[0].Rows[0]["usrUserid"]);
                    string passwordMessage = "Welcome " + name + ", to www.exam.myct.in,Password for ur First Login is " + password + " " + cc.AddSMS(MobileNo);
                    smslength = passwordMessage.Length;
                    cc.TransactionalSMSCountry("OnlineExam", MobileNo, passwordMessage, smslength, 22);
                }
            }
        }
        return(id);
    }
コード例 #10
0
    public List <UserRegistrationBLL> UserProfileHeaderInfo()
    {
        List <UserRegistrationBLL> upHeadList = new List <UserRegistrationBLL>();

        try
        {
            urUserRegBLLObj.usrUserId = userid;
            ds = urUserRegBLLObj.BLLGetUserContactInfo(urUserRegBLLObj);
            DataRow dRowUserList = ds.Tables[0].Rows[0];

            // profileImage.ImageUrl = Convert.ToString(dRowUserList["usrProfilePhoto"]);
            name          = Convert.ToString(dRowUserList["usrFullName"]);
            dob           = Convert.ToString(dRowUserList["usrDOB"]);
            city          = Convert.ToString(dRowUserList["usrCity"]);
            recentVisitor = Convert.ToString(dRowUserList["usrRecentVisitor"]);


            rvisitor = recentVisitor.Split(',');
            for (int j = 0; j < rvisitor.Length; j++)
            {
                if (rvisitor[j] != "")
                {
                    urUserRegBLLObj.usrUserId = rvisitor[j];
                    DataSet dsRecentUserInfo = urUserRegBLLObj.BLLGetUserContactInfo(urUserRegBLLObj);

                    for (int k = 0; k < dsRecentUserInfo.Tables[0].Rows.Count; k++)
                    {
                        DataRow             dRowUserInfo = dsRecentUserInfo.Tables[0].Rows[k];
                        UserRegistrationBLL ur           = new UserRegistrationBLL();
                        ur.usrRecentVisitorName = Convert.ToString(dRowUserInfo["usrFirstName"]);
                        ur.usrUserId            = rvisitor[j];
                        upHeadList.Add(ur);
                    }
                }
            }
        }
        catch (Exception ex)
        {
            // throw ex;
        }
        return(upHeadList);
    }
コード例 #11
0
ファイル: MyctToNSS..cs プロジェクト: Ramkendre/Mycity
    public DataTable UserLoginAuthenticate(string MobileNo, string Password)
    {
        DataSet             ds     = new DataSet();
        CommonCode          cc     = new CommonCode();
        UserRegistrationBLL balobj = new UserRegistrationBLL();

        balobj.usrMobileNo = MobileNo;
        int roleid = balobj.BLLGetUserRoleId(balobj);

        balobj.usrPassword = cc.DESEncrypt(Password);
        ds = cc.getLoginDetails(MobileNo, balobj.usrPassword);
        DataTable dt = ds.Tables[0];

        dt.Columns.Add("Roleid", typeof(Int32));
        foreach (DataRow dr in dt.Rows)
        {
            dr["Roleid"] = roleid;
            dt           = dr.Table;
        }

        return(dt);
    }
コード例 #12
0
ファイル: Default.aspx.cs プロジェクト: Ramkendre/Mycity
 public void Autenticateuser()
 {
     try
     {
         // ds = cc.getLoginDetails(txtUserId.Text.ToString(), cc.DESEncrypt(txtPassword.Text.ToString()));
         CTdll.UserLogin ul = new CTdll.UserLogin();
         sc            = ul.getLoggedIn(txtUserId.Text.ToString(), cc.DESEncrypt(txtPassword.Text.ToString()), ConfigurationManager.AppSettings["ConnectionString"], "Login");
         Session["SC"] = sc;
         if (sc != null)
         {
             if (txtUserId.Text.Length == 10)
             {
                 Session["User"] = Convert.ToString(sc.UserId);
                 //Session["MobileNoN"] = Convert.ToString(ds.Tables[0].Rows[0]["MobileNo"]);
                 Session["UserFirstNameN"] = Convert.ToString(sc.UserFName);
                 Session["UserLastNameN"]  = Convert.ToString(sc.UserLName);
                 Session["UserMiddleName"] = Convert.ToString(sc.UserMName);
                 Session["CityNameN"]      = Convert.ToString(sc.CityName);
                 Session["City"]           = Convert.ToString(sc.CityId);
                 Session["Mobile"]         = Convert.ToString(sc.Mobile);
                 Session["lastLogin"]      = Convert.ToString(sc.LastLogin);
                 Session["MobileNo"]       = txtUserId.Text.ToString();
                 if (Convert.ToString(sc.UserId).Trim() == "")
                 {
                     lblMsg.Text = "Invalid User";
                     ScriptManager.RegisterStartupScript(this, typeof(Page), "msg", "alert('User Name or Password is Incorrect ...Please try again')", true);
                 }
                 else
                 {
                     string sql = "select id from [DBCome2myct].[come2mycity].[DemoOnline] where userid='" + sc.UserId + "'";
                     string id  = cc.ExecuteScalar(sql);
                     if (id == "" || id == null)
                     {
                         sql = "insert into [DBCome2myct].[come2mycity].[DemoOnline](userid,status)values('" + sc.UserId + "','Active')";
                         int a = cc.ExecuteNonQuery(sql);
                     }
                     else
                     {
                         sql = "update [DBCome2myct].[come2mycity].[DemoOnline] set status='Active' where userid='" + sc.UserId + "'";
                         int a = cc.ExecuteNonQuery(sql);
                     }
                     string hostipadd = HttpContext.Current.Request.UserHostAddress;
                     UserRegistrationBLL userRegBLL = new UserRegistrationBLL();
                     userRegBLL.usrUserId = Convert.ToString(Session["User"]);
                     //userRegBLL.IPAddress = hostipadd;
                     Response.Redirect("html/HomePage.aspx", false); ///changes done by pooja
                 }
             }
             else
             {
                 lblMsg.Text = "10 digit Mobile no";
                 ScriptManager.RegisterStartupScript(this, typeof(Page), "msg", "alert('Please enter the 10 disit mobile No....!')", true);
             }
         }
         else
         {
             lblMsg.Text = "Invalid User";
             ScriptManager.RegisterStartupScript(this, typeof(Page), "msg", "alert('User Name or Password is Incorrect ...Please try again')", true);
         }
     }
     catch (Exception ex)
     {
         string msg = ex.Message;
         lblMsg.Text = "Invalid User";
         ScriptManager.RegisterStartupScript(this, typeof(Page), "msg", "alert('User Name or Password is Incorrect...Please try again')", true);
     }
 }
コード例 #13
0
    public void AddFriendByLongCodeF(UserRegistrationBLL ur, string userMobileWhoSendFriendReq, int grid)
    {//Mahesh: Use second parameter mobile for only send sms only, because at run time mobile number of sender change.
        try
        {
            string sender  = "";
            string joiner  = "";
            bool   JoinAll = false;
            string flagMob = ur.usrAltMobileNo;
            status = urRegistBll.BLLIsExistUserRegistrationInitial(ur);
            if (status == 0)
            {
                status = urRegistBll.BLLIsExistUserRegistrationInitialByLc(ur);
                if (status == 0)
                {
                    string sqlFlagStr = "select JoinFlag from userMaster where usrMobileNo='" + flagMob.ToString() + "'";
                    int    jof        = Convert.ToInt32(cc.ExecuteScalar(sqlFlagStr));
                    if (jof > 1)
                    {
                        JoinAll         = true;
                        ur.JoinFlagProp = Convert.ToString(jof);
                    }
                    //DataTable dt1 = new DataTable();
                    string  sql = "select usrUserId, usrFirstName,usrCityId from UserMaster where usrMobileNo='" + ur.usrMobileNo + "'";
                    DataSet ds  = new DataSet();
                    ds = cc.ExecuteDataset(sql);
                    //dt1 = ds.Tables[0];
                    string userId;
                    string usrName = "";
                    int    cityId;
                    foreach (DataRow dr1 in ds.Tables[0].Rows)
                    {
                        userId            = Convert.ToString(dr1["usrUserId"]);
                        usrName           = Convert.ToString(dr1["usrFirstName"]);
                        cityId            = Convert.ToInt32(dr1["usrCityId"]);
                        ur.frnrelFriendId = userId;
                        ur.usrCityId      = cityId;
                        joiner            = Convert.ToString(usrName);
                        //ur.frnrelFrnRelName = usrName;
                        //ur.frnrelRelation = "friend";
                        //ur.frnrelGroup = "1";
                    }
                    string  sql1 = "select usrUserId, usrFirstName from UserMaster where usrMobileNo='" + ur.usrAltMobileNo + "'";
                    DataSet ds1  = new DataSet();
                    ds1 = cc.ExecuteDataset(sql1);
                    //dt1 = ds.Tables[0];
                    string FriId;
                    string FriName;
                    foreach (DataRow dr2 in ds1.Tables[0].Rows)
                    {
                        FriId               = Convert.ToString(dr2["usrUserId"]);
                        FriName             = Convert.ToString(dr2["usrFirstName"]);
                        ur.frnrelUserId     = FriId;
                        ur.frnrelFrnRelName = FriName;
                        ur.frnrelRelation   = "friend";
                        sender              = Convert.ToString(FriName);
                        //ur.frnrelGroup = "1";
                        //status = ur.BLLInsertUserFriendRelative(ur);
                        ur.frnrelGroup = Convert.ToString(grid);
                    }

                    status = ur.BLLInsertUserFriendRelative(ur);
                    if (status > 0)
                    {
                        string SendTo   = ur.usrAltMobileNo;
                        string sendFrom = ur.usrMobileNo;
                        string message  = "I " + usrName + "(" + sendFrom.ToString() + ") added u in www.myct.in to send SMS." + cc.AddSMS(SendTo);

                        cc.SendMessage1(sendFrom, SendTo, message);
                        if (JoinAll == true)
                        {
                            string resJoinAll = "Thanks " + joiner.ToString() + ", I " + sender.ToString() + "( " + SendTo.ToString() + " ) also added u on www.myct.in " + cc.AddSMS(sendFrom);
                            cc.SendMessage1(SendTo, sendFrom, resJoinAll);
                        }
                        string changeFlagSql = "update come2mycity.test set FlagStatus = 0 where PK=" + Convert.ToInt32(ur.usrPKval);
                        int    pkchange      = 0;
                        pkchange = cc.ExecuteNonQuery(changeFlagSql);
                        if (pkchange == 0)
                        {
                            pkchange = cc.ExecuteNonQuery(changeFlagSql);
                        }
                    }
                    else
                    {
                        string SendTo   = ur.usrAltMobileNo;
                        string sendFrom = ur.usrMobileNo;
                        string message  = "Dear " + joiner.ToString() + " u already added " + sender.ToString() + " in www.myct.in to send SMS." + cc.AddSMS(sendFrom);

                        cc.SendMessage1(SendTo, sendFrom, message);

                        string changeFlagSql = "update come2mycity.test set FlagStatus = 0 where PK=" + Convert.ToInt32(ur.usrPKval);
                        int    pkchange      = 0;
                        pkchange = cc.ExecuteNonQuery(changeFlagSql);
                        if (pkchange == 0)
                        {
                            pkchange = cc.ExecuteNonQuery(changeFlagSql);
                        }
                    }
                }
                else
                {
                    string  sql3 = "select usrUserId, usrFirstName,usrCityId from UserMaster where usrMobileNo='" + ur.usrMobileNo + "'";
                    DataSet ds   = new DataSet();
                    ds = cc.ExecuteDataset(sql3);
                    //dt1 = ds.Tables[0];
                    string userId;
                    flagMob = ur.usrAltMobileNo;
                    string usrName  = "";
                    int    cityId   = 0;
                    string cityName = "";
                    foreach (DataRow dr1 in ds.Tables[0].Rows)
                    {
                        userId          = Convert.ToString(dr1["usrUserId"]);
                        usrName         = Convert.ToString(dr1["usrFirstName"]);
                        cityId          = Convert.ToInt32(dr1["usrCityId"]);
                        ur.frnrelUserId = userId;
                        ur.usrCityId    = cityId;
                        joiner          = Convert.ToString(usrName);
                        //ur.frnrelFrnRelName = usrName;
                        //ur.frnrelRelation = "friend";
                        //ur.frnrelGroup = "1";
                    }
                    string sqlFlagStr = "select JoinFlag from userMaster where usrMobileNo='" + flagMob.ToString() + "'";
                    int    jof        = Convert.ToInt32(cc.ExecuteScalar(sqlFlagStr));
                    if (jof >= 1)
                    {
                        JoinAll         = true;
                        ur.JoinFlagProp = Convert.ToString(jof);
                    }
                    string sqlquery = "select cityName from CityMaster where cityId='" + Convert.ToString(cityId) + "'";
                    cityName = cc.ExecuteScalar(sqlquery);

                    urRegistBll.usrUserId = System.Guid.NewGuid().ToString();

                    ur.usrMobileNo = ur.usrAltMobileNo;

                    ur.usrFirstName = ur.frnrelFrnRelName;

                    Random rnd = new Random();
                    urRegistBll.usrPassword = cc.DESEncrypt(Convert.ToString(rnd.Next(10001, 99999)));

                    status = urRegistBll.BLLInsertUserRegistrationInitial(urRegistBll);
                    if (status > 0)
                    {
                        string  sql1 = "select usrUserId, usrFirstName from UserMaster where usrMobileNo='" + ur.usrAltMobileNo + "'";
                        DataSet ds1  = new DataSet();
                        ds1 = cc.ExecuteDataset(sql1);
                        //dt1 = ds.Tables[0];
                        string FriId;
                        string FriName;
                        foreach (DataRow dr2 in ds1.Tables[0].Rows)
                        {
                            FriId               = Convert.ToString(dr2["usrUserId"]);
                            FriName             = Convert.ToString(dr2["usrFirstName"]);
                            ur.frnrelFriendId   = FriId;
                            ur.frnrelFrnRelName = FriName;
                            ur.frnrelRelation   = "friend";
                            ur.frnrelGroup      = Convert.ToString(grid);
                            sender              = Convert.ToString(FriName);
                        }

                        status = ur.BLLInsertUserFriendRelative(ur);
                        if (status > 0)
                        {
                        }
                        string senderId   = userMobileWhoSendFriendReq.ToString();
                        string myMobileNo = urRegistBll.usrMobileNo;
                        string myPassword = cc.DESDecrypt(urRegistBll.usrPassword);
                        string myName     = ur.frnrelFrnRelName;
                        string thisDir    = Server.MapPath("~");

                        if (!System.IO.Directory.Exists(thisDir + "\\User_Resource\\" + ur.usrUserId + "\\Profile_Photo\\"))
                        {
                            System.IO.Directory.CreateDirectory(thisDir + "\\User_Resource\\" + ur.usrUserId + "\\Profile_Photo\\");

                            File.Copy(thisDir + "\\User_Resource\\Profile_Photo\\default_user.jpg", thisDir + "\\User_Resource\\" + ur.usrUserId + "\\Profile_Photo\\default_user.jpg");
                        }

                        //string passwordMessage = "Dear " + myName + ", Password for ur First Login is " + myPassword + " " + cc.AdvMessage();
                        string passwordMessage = "I " + usrName + "(" + senderId.ToString() + ") added u in come2mycity.com. U use it to send SMS.Dear " + myName + ",Password for ur First Login is " + myPassword + " for come2myCity.com";
                        cc.SendMessage1(senderId, myMobileNo, passwordMessage);
                        cc.SendMessageImp1(senderId, myMobileNo, passwordMessage);
                        if (JoinAll == true)
                        {
                            string resJoinAll = "Thanks " + joiner.ToString() + ", I " + sender.ToString() + "( " + myMobileNo.ToString() + " ) also added u on www.myct.in " + cc.AddSMS(senderId);
                            cc.SendMessage1(myMobileNo, senderId, resJoinAll);
                        }
                        string changeFlagSql = "update come2mycity.test set FlagStatus = 0 where PK=" + Convert.ToInt32(ur.usrPKval);
                        int    pkchange      = 0;
                        pkchange = cc.ExecuteNonQuery(changeFlagSql);
                        if (pkchange == 0)
                        {
                            pkchange = cc.ExecuteNonQuery(changeFlagSql);
                        }
                    }
                }
            }
            else
            {
                //NotRegisterMessageForLongCode(urRegistBll);
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
コード例 #14
0
    //public DataTable BLLFriendRelativeByMob(UserRegistrationBLL ur)
    //{
    //    DataTable dtFriendRelativeByMob = urUserRegDALObj.DALFriendRelativeSelectByMobileNo(ur);
    //    return dtFriendRelativeByMob;
    //}

    public DataTable BLLFriendRelativeByMob(UserRegistrationBLL ur)
    {
        DataTable dtFriendRelativeByMob = urUserRegDALObj.DALFriendRelativeSelectByMobileNo(ur);

        return(dtFriendRelativeByMob);
    }
コード例 #15
0
 public int InsertFamilyInfo(UserRegistrationBLL obj)
 {
     return(urUserRegDALObj.InsertFamilyInfo(obj));
 }
コード例 #16
0
 public int UpdateFamilyInfo(UserRegistrationBLL obj)
 {
     return(urUserRegDALObj.UpdateFamilyInfo(obj));
 }
コード例 #17
0
    public DataTable BLLUserMobileNoSelectById(UserRegistrationBLL ur)
    {
        DataTable dtUserMobileNo = urUserRegDALObj.DALUserMobileSelectById(ur);

        return(dtUserMobileNo);
    }
コード例 #18
0
    //------------------------------------------------------User Registration To MYCT------------------------------------------------------------------

    #region GetRegistration
    public string GetRegisterRecord(string MobileNo, string Fname, string Lname, string address, string pincode, string strDevId)
    {
        int     i, smslength;
        string  id = "";
        DataSet ds = new DataSet();

        try
        {
            UserRegistrationBLL balobj = new UserRegistrationBLL();
            CommonCode          cc     = new CommonCode();
            balobj.usrFirstName = Fname;
            balobj.usrLastName  = Lname;
            balobj.usrMobileNo  = MobileNo;
            balobj.usrAddress   = address;
            balobj.usrPIN       = pincode;
            balobj.StrDevId     = strDevId;
            i = balobj.BLLIsExistUserRegistrationInitial(balobj);//check user is exist or not if i = 0 then already exist
            if (i > 0)
            {
                balobj.usrUserId = System.Guid.NewGuid().ToString();
                Random rnd = new Random();
                balobj.usrPassword = cc.DESEncrypt(Convert.ToString(rnd.Next(10001, 99999)));
                i = balobj.BLLInsertUserRegistrationInitial(balobj);
                if (i > 0)
                {
                    id = balobj.usrUserId;
                    string myMobileNo      = balobj.usrMobileNo;
                    string myPassword      = cc.DESDecrypt(balobj.usrPassword);
                    string myName          = balobj.usrFirstName;
                    string passwordMessage = "Welcome " + myName + ",for ur First Login Username="******" & Password is " + myPassword + "  " + cc.AddSMS(myMobileNo);
                    smslength = passwordMessage.Length;
                    cc.TransactionalSMSCountry("OnlineExam", myMobileNo, passwordMessage, smslength, 22);

                    //------------------------------ For Dublicate IMEI number....................

                    string sql3 = "select [usrMobileNo] from usermaster where strDevId = '" + strDevId + "'";//takes all mobile number who have same IMEI number
                    ds = cc.ExecuteDataset(sql3);

                    foreach (DataRow row in ds.Tables[0].Rows)
                    {
                        if (row[0].Equals(MobileNo))
                        {
                        }
                        else
                        {
                            string sql = "update usermaster set StrDevId = '0' where [usrMobileNo] ='" + row[0] + "' ";
                            int    j   = cc.ExecuteNonQuery(sql);
                        }
                    }
                }
            }
            else
            {
                string sqlget = "select usrUserid from usermaster where usrMobileNo='" + MobileNo + "'";//geting userid of user
                id = cc.ExecuteScalar(sqlget);

                string sql2 = "select strDevId from usermaster where usrUserid='" + id + "' ";
                string str  = cc.ExecuteScalar(sql2);

                if (str == "" || str == null || str == "0")                                                            // If IMEI no is null
                {
                    string sql = "Update usermaster set StrDevId = '" + strDevId + "' where usrUserid ='" + id + "' "; //to add/update IMEI no's for old entries
                    int    j   = cc.ExecuteNonQuery(sql);
                }
                string sql3 = "select [usrMobileNo] from usermaster where strDevId = '" + str + "'";//takes all mobile number who have same IMEI number
                ds = cc.ExecuteDataset(sql3);

                foreach (DataRow row in ds.Tables[0].Rows)
                {
                    if (row[0].Equals(MobileNo))
                    {
                    }
                    else
                    {
                        string sql = "update usermaster set StrDevId = '0' where [usrMobileNo] ='" + row[0] + "' ";
                        int    j   = cc.ExecuteNonQuery(sql);
                    }
                }
            }
        }
        catch (Exception ex)
        { }
        return(id);
    }
コード例 #19
0
 public int BLLUpdatePinByLongCodePIN(UserRegistrationBLL ur)
 {
     status = urUserRegDALObj.DALUpdatePinByLongCodePIN(ur);
     return(status);
 }
コード例 #20
0
 public int BLLUpdateUserAddressByLongCode(UserRegistrationBLL ur)
 {
     status = urUserRegDALObj.DALUpdateUserAddressByLongCode(ur);
     return(status);
 }
コード例 #21
0
 public int BLLChangeMobileNoByLongCode(UserRegistrationBLL ur)
 {
     status = urUserRegDALObj.DALChangeMobileNoByLongCode(ur);
     return(status);
 }
コード例 #22
0
    public int BLLUpdateUserRecentVisitor(UserRegistrationBLL ur)
    {
        int i = urUserRegDALObj.DALUserRecentVisitorUpdate(ur);

        return(i);
    }
コード例 #23
0
 public void BLLUserProfessionInsert(UserRegistrationBLL ur, out int id, out int status)
 {
     urUserRegDALObj.DALUserProfessionInsert(ur, out id, out status);
 }
コード例 #24
0
 public void BLLUserBoardUniversityInsert(UserRegistrationBLL ur, out int id, out int status)
 {
     urUserRegDALObj.DALUserBoardUniversityInsert(ur, out id, out status);
 }
コード例 #25
0
 public int BLLUserRegisteredMobileNoUpdate(UserRegistrationBLL ur)
 {
     status = urUserRegDALObj.DALUserRegistrationMobileNoUpdate(ur);
     return(status);
 }
コード例 #26
0
 public int BLLFriendRelativeIsViewProfile(UserRegistrationBLL ur)
 {
     status = urUserRegDALObj.DALFriendRelativeIsViewProfile(ur);
     return(status);
 }
コード例 #27
0
 public int BLLSendMessageToAllByLongCode(UserRegistrationBLL ur)
 {
     status = urUserRegDALObj.DALSendMessageToAllByLongCode(ur);
     return(status);
 }
コード例 #28
0
 public List <UserRegistrationBLL> GetUsrFamiInfo(UserRegistrationBLL obj)
 {
     return(urUserRegDALObj.GetUsrFamInfoFun(obj));
 }
コード例 #29
0
 public int BLLUpdateFirstNameByLongCode(UserRegistrationBLL ur)
 {
     status = urUserRegDALObj.DALUpdateFirstNameByLongCode(ur);
     return(status);
 }
コード例 #30
0
 public void BLLUserMembershipPoliticalInsert(UserRegistrationBLL ur, out int id, out int status)
 {
     urUserRegDALObj.DALUserMembershipPoliticalInsert(ur, out id, out status);
 }