public override int GetHashCode()
    {
        int hash = 1;

        if (isValid_ != null)
        {
            hash ^= IsValid.GetHashCode();
        }
        if (CountryCode.Length != 0)
        {
            hash ^= CountryCode.GetHashCode();
        }
        if (Userid.Length != 0)
        {
            hash ^= Userid.GetHashCode();
        }
        if (TrialURL.Length != 0)
        {
            hash ^= TrialURL.GetHashCode();
        }
        if (ErrorMessage.Length != 0)
        {
            hash ^= ErrorMessage.GetHashCode();
        }
        if (_unknownFields != null)
        {
            hash ^= _unknownFields.GetHashCode();
        }
        return(hash);
    }
Example #2
0
        private string userids2jsonstr(Userid d)
        {
            string ret = "";

            ret = UmsJson.Serialize(d);
            return(ret);
        }
Example #3
0
        public string obj2jsonstr(object obj, int type)
        {
            string ret = "";

            switch (type)
            {
            case 0:
                ClientData d = (ClientData)obj;
                ret = clientData2jsonstr(d);
                break;

            case 1:
                OnLineConfig con = (OnLineConfig)obj;
                ret = onlineconfig2jsonstr(con);
                break;

            case 2:
                UpdatePreference pre = (UpdatePreference)obj;
                ret = update2jsonstr(pre);
                break;

            case 3:
                Event e = (Event)obj;
                ret = eventData2jsonstr(e);
                break;

            case 4:    //all data
                ret = allData2jsonstr();
                break;

            case 5:    //error
                ErrorInfo err = (ErrorInfo)obj;
                ret = errorData2jsonstr(err);
                break;

            case 6:    //page info
                PageInfo page = (PageInfo)obj;
                ret = pageData2jsonstr(page);
                break;

            case 7:    //tag data
                Tag tag = (Tag)obj;
                ret = tag2jsonstr(tag);
                break;

            case 8:    //userid data
                Userid userids = (Userid)obj;
                ret = userids2jsonstr(userids);
                break;

            case 9:    //pushid data
                Pushid pushids = (Pushid)obj;
                ret = pushids2jsonstr(pushids);
                break;

            default:
                break;
            }
            return(ret);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (Result != global::Playermgr.LoginRsp.Types.Result.Success)
            {
                hash ^= Result.GetHashCode();
            }
            if (Userid != 0)
            {
                hash ^= Userid.GetHashCode();
            }
            if (Username.Length != 0)
            {
                hash ^= Username.GetHashCode();
            }
            if (Glod != 0)
            {
                hash ^= Glod.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #5
0
        //userid data proceed
        public void useridDataProceed(string userid)
        {
            Userid obj  = model.getUseridData(userid);
            Post   post = new Post((int)UMSAgent.UMSApi.DataType.USERID, obj);

            post.stateChanged += new Post.stateChangedHandler(this.getData);
            post.sendData(model.getUrl((int)UMSAgent.UMSApi.DataType.USERID));
        }
Example #6
0
        public void ExecuteSubmitCommand( )
        {
            testPanel = new TestPanel();
            MainPage.mainPage.RightPanelHolder.Navigate(typeof(TestPanel), testPanel);
            if (videcallPage == null)
            {
                videcallPage = new Videocallpage();
            }
            MainPage.mainPage.pagePlaceHolder.Navigate(typeof(Videocallpage), videcallPage);

            SBCDB dbmodule     = new SBCDB();
            User  loggedinUser = dbmodule.GetLoggedinUser(Userid.Trim().ToLower());

            if (loggedinUser == null)
            {
                LoginFailedMsg1Visible = true;
                LoginFailedMsg2Visible = true;
                LoginFailedMsg3Visible = true;

                LoginErrorMessage  = "User name: " + Userid + " not found.";
                LoginErrorMessage2 = "Please enter valid user id or contact admin.";
                OnPropertyChanged("LoginFailedMsg1Visible");
                OnPropertyChanged("LoginFailedMsg2Visible");
                OnPropertyChanged("LoginFailedMsg3Visible");
                OnPropertyChanged("LoginErrorMessage");
                OnPropertyChanged("LoginErrorMessage2");
                return;
            }

            if (string.Compare(PasswordTxt, loggedinUser.Password) == 0)
            {
                if (testPanel == null)
                {
                    testPanel = new TestPanel();
                }
                MainPage.mainPage.RightPanelHolder.Navigate(typeof(TestPanel), testPanel);
                if (videcallPage == null)
                {
                    videcallPage = new Videocallpage();
                }
                MainPage.mainPage.pagePlaceHolder.Navigate(typeof(Videocallpage), videcallPage);
            }
            else
            {
                LoginFailedMsg1Visible = true;
                LoginFailedMsg2Visible = true;
                LoginFailedMsg3Visible = true;
                LoginErrorMessage      = "Password not matched.";
                LoginErrorMessage2     = "Please enter valid password or contact admin.";

                OnPropertyChanged("LoginFailedMsg1Visible");
                OnPropertyChanged("LoginFailedMsg2Visible");
                OnPropertyChanged("LoginFailedMsg3Visible");
                OnPropertyChanged("LoginErrorMessage");
                OnPropertyChanged("LoginErrorMessage2");
            }
        }
Example #7
0
        //get Userid data
        public Userid getUseridData(string userid)
        {
            Userid userids = new Userid();

            userids.appkey   = UmsManager.appkey;
            userids.userid   = userid;
            userids.deviceid = Utility.getDeviceId();
            return(userids);
        }
Example #8
0
        public override int GetHashCode()
        {
            int hash = GetType().GetHashCode();

            hash = (hash * 397) ^ Userid.GetHashCode();
            hash = (hash * 397) ^ Branchid.GetHashCode();
            hash = (hash * 397) ^ Seq.GetHashCode();
            hash = (hash * 397) ^ Sdate.GetHashCode();
            hash = (hash * 397) ^ Typecode.GetHashCode();

            return(hash);
        }
Example #9
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Userid.Length != 0)
            {
                hash ^= Userid.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Money != 0L)
            {
                hash ^= Money.GetHashCode();
            }
            return(hash);
        }
Example #10
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (MsgID != 0)
            {
                hash ^= MsgID.GetHashCode();
            }
            if (Userid != 0)
            {
                hash ^= Userid.GetHashCode();
            }
            if (Username.Length != 0)
            {
                hash ^= Username.GetHashCode();
            }
            return(hash);
        }
            //Delete Messages
            private void DeleteItems()
            {
                try
                {
                    if (Timer != null)
                    {
                        Timer.Enabled = true;
                        Timer.Start();
                    }

                    if (TopChatToolBar.Visibility != ViewStates.Visible)
                    {
                        TopChatToolBar.Visibility = ViewStates.Visible;
                    }

                    if (Methods.CheckConnectivity())
                    {
                        List <int> selectedItemPositions = MAdapter.GetSelectedItems();
                        List <int> selectedItemId        = new List <int>();
                        for (int i = selectedItemPositions.Count - 1; i >= 0; i--)
                        {
                            var datItem = MAdapter.GetItem(selectedItemPositions[i]);
                            if (datItem != null)
                            {
                                selectedItemId.Add(datItem.Id);
                                MAdapter.RemoveData(selectedItemPositions[i], datItem);
                            }
                        }

                        //Send Api Delete By id
                        RequestsAsync.Messages.DeleteMessages(Userid.ToString(), selectedItemId).ConfigureAwait(false);

                        MAdapter.NotifyDataSetChanged();
                    }
                    else
                    {
                        Toast.MakeText(Activity, Activity.GetText(Resource.String.Lbl_CheckYourInternetConnection), ToastLength.Short).Show();
                    }
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                }
            }
        public override int GetHashCode()
        {
            int hash = 1;

            if (Userid != 0L)
            {
                hash ^= Userid.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (contact_ != null)
            {
                hash ^= Contact.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #13
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (MsgID != 0)
            {
                hash ^= MsgID.GetHashCode();
            }
            if (Userid != 0)
            {
                hash ^= Userid.GetHashCode();
            }
            if (Username.Length != 0)
            {
                hash ^= Username.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #14
0
        public override string ToString()
        {
            this.Init__jsonIgnore();
            string json = string.Concat(
                __jsonIgnore.ContainsKey("Pkid") ? string.Empty : string.Format(", Pkid : {0}", Pkid == null ? "null" : Pkid.ToString()),
                __jsonIgnore.ContainsKey("Addtime") ? string.Empty : string.Format(", Addtime : {0}", Addtime == null ? "null" : Addtime.Value.Subtract(new DateTime(1970, 1, 1)).TotalMilliseconds.ToString()),
                __jsonIgnore.ContainsKey("Code") ? string.Empty : string.Format(", Code : {0}", Code == null ? "null" : string.Format("'{0}'", Code.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))),
                __jsonIgnore.ContainsKey("Gate") ? string.Empty : string.Format(", Gate : {0}", Gate == null ? "null" : string.Format("'{0}'", Gate.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))),
                __jsonIgnore.ContainsKey("Mobile") ? string.Empty : string.Format(", Mobile : {0}", Mobile == null ? "null" : string.Format("'{0}'", Mobile.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))),
                __jsonIgnore.ContainsKey("Number") ? string.Empty : string.Format(", Number : {0}", Number == null ? "null" : Number.ToString()),
                __jsonIgnore.ContainsKey("Param") ? string.Empty : string.Format(", Param : {0}", Param == null ? "null" : string.Format("'{0}'", Param.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))),
                __jsonIgnore.ContainsKey("Server") ? string.Empty : string.Format(", Server : {0}", Server == null ? "null" : Server.ToString()),
                __jsonIgnore.ContainsKey("State") ? string.Empty : string.Format(", State : {0}", State == null ? "null" : State.ToString()),
                __jsonIgnore.ContainsKey("Type") ? string.Empty : string.Format(", Type : {0}", Type == null ? "null" : Type.ToString()),
                __jsonIgnore.ContainsKey("Updatetime") ? string.Empty : string.Format(", Updatetime : {0}", Updatetime == null ? "null" : Updatetime.Value.Subtract(new DateTime(1970, 1, 1)).TotalMilliseconds.ToString()),
                __jsonIgnore.ContainsKey("Userid") ? string.Empty : string.Format(", Userid : {0}", Userid == null ? "null" : Userid.ToString()), " }");

            return(string.Concat("{", json.Substring(1)));
        }
Example #15
0
        public void PostUpdateLiker(object parameter)
        {
            try
            {
                try
                {
                    if (!IsStop)
                    {
                        lstGroupUpdateThread.Add(Thread.CurrentThread);
                        lstGroupUpdateThread.Distinct().ToList();
                        Thread.CurrentThread.IsBackground = true;
                    }
                }
                catch
                {
                }

                Array paramsArray = new object[1];

                paramsArray = (Array)parameter;

                KeyValuePair <string, LinkedInMaster> item = (KeyValuePair <string, LinkedInMaster>)paramsArray.GetValue(0);

                GlobusHttpHelper HttpHelper = new GlobusHttpHelper();
                LinkedinLogin    Login      = new LinkedinLogin();
                Login.accountUser   = item.Key;
                Login.accountPass   = item.Value._Password;
                Login.proxyAddress  = item.Value._ProxyAddress;
                Login.proxyPort     = item.Value._ProxyPort;
                Login.proxyUserName = item.Value._ProxyUsername;
                Login.proxyPassword = item.Value._ProxyPassword;
                string user = item.Key;

                Groups.GroupUpdate obj_GroupUpdate = new Groups.GroupUpdate(Login.accountUser, Login.accountPass, Login.proxyAddress, Login.proxyPort, Login.proxyUserName, Login.proxyPassword);

                Login.logger.addToLogger           += new EventHandler(AddToLogger_GroupStatus);
                obj_GroupUpdate.logger.addToLogger += new EventHandler(AddToLogger_GroupStatus);

                if (!Login.IsLoggedIn)
                {
                    Login.LoginHttpHelper(ref HttpHelper);
                    //AddLoggerGroupAdd("Login Process completed..  ");
                }

                List <string> GetCheckedItems = new List <string>();

                if (chkUpdateCollection.InvokeRequired)
                {
                    chkUpdateCollection.Invoke(new MethodInvoker(delegate
                    {
                        foreach (string Userid in chkUpdateCollection.CheckedItems)
                        {
                            string[] Uid = Userid.Split('#');
                            GetCheckedItems.Add(Uid[1]);
                        }
                    }));
                }

                List <string> SelectedItem = new List <string>();

                foreach (KeyValuePair <string, Dictionary <string, string> > NewValue in GrpMess)
                {
                    if (NewValue.Key == item.Key)
                    {
                        foreach (KeyValuePair <string, string> GroupId in NewValue.Value)
                        {
                            foreach (string selectedgroup in GetCheckedItems)
                            {
                                if (GroupId.Key.Contains(selectedgroup))
                                {
                                    SelectedItem.Add(GroupId + "#" + selectedgroup);
                                }
                            }
                        }
                    }
                }


                int minDelay = 20;
                int maxDelay = 25;

                if (!string.IsNullOrEmpty(txtGroupUpdateMinDelay.Text) && NumberHelper.ValidateNumber(txtGroupUpdateMinDelay.Text))
                {
                    minDelay = Convert.ToInt32(txtGroupUpdateMinDelay.Text);
                }
                if (!string.IsNullOrEmpty(txtGroupUpdateMaxDelay.Text) && NumberHelper.ValidateNumber(txtGroupUpdateMaxDelay.Text))
                {
                    maxDelay = Convert.ToInt32(txtGroupUpdateMaxDelay.Text);
                }

                obj_GroupUpdate.PostCommentLikerUpdate(ref HttpHelper, SelectedItem, new object[] { item, user }, minDelay, maxDelay);
            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Update Liker --> PostUpdateLiker() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
                GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Update Liker --> PostUpdateLiker() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinGetGroupMemberErrorLogs);
            }
            finally
            {
                counter_GroupMemberSearch--;
                int cnt = LinkedInManager.linkedInDictionary.Count - 1;
                if (counter_GroupMemberSearch == cnt)
                {
                    if (btnUpdateLike.InvokeRequired)
                    {
                        btnUpdateLike.Invoke(new MethodInvoker(delegate
                        {
                            AddLoggerCommentLiker("[ " + DateTime.Now + " ] => [ PROCESS COMPLETED ]");
                            AddLoggerCommentLiker("---------------------------------------------------------------------------------------------------------------------------");
                            btnUpdateLike.Cursor = Cursors.Default;
                        }));
                    }
                }
            }
        }
Example #16
0
    public override int GetHashCode()
    {
        int hashcode = 157;

        unchecked {
            if (__isset.mid)
            {
                hashcode = (hashcode * 397) + Mid.GetHashCode();
            }
            if (__isset.userid)
            {
                hashcode = (hashcode * 397) + Userid.GetHashCode();
            }
            if (__isset.phone)
            {
                hashcode = (hashcode * 397) + Phone.GetHashCode();
            }
            if (__isset.email)
            {
                hashcode = (hashcode * 397) + Email.GetHashCode();
            }
            if (__isset.regionCode)
            {
                hashcode = (hashcode * 397) + RegionCode.GetHashCode();
            }
            if (__isset.displayName)
            {
                hashcode = (hashcode * 397) + DisplayName.GetHashCode();
            }
            if (__isset.phoneticName)
            {
                hashcode = (hashcode * 397) + PhoneticName.GetHashCode();
            }
            if (__isset.pictureStatus)
            {
                hashcode = (hashcode * 397) + PictureStatus.GetHashCode();
            }
            if (__isset.thumbnailUrl)
            {
                hashcode = (hashcode * 397) + ThumbnailUrl.GetHashCode();
            }
            if (__isset.statusMessage)
            {
                hashcode = (hashcode * 397) + StatusMessage.GetHashCode();
            }
            if (__isset.allowSearchByUserid)
            {
                hashcode = (hashcode * 397) + AllowSearchByUserid.GetHashCode();
            }
            if (__isset.allowSearchByEmail)
            {
                hashcode = (hashcode * 397) + AllowSearchByEmail.GetHashCode();
            }
            if (__isset.picturePath)
            {
                hashcode = (hashcode * 397) + PicturePath.GetHashCode();
            }
            if (__isset.musicProfile)
            {
                hashcode = (hashcode * 397) + MusicProfile.GetHashCode();
            }
            if (__isset.videoProfile)
            {
                hashcode = (hashcode * 397) + VideoProfile.GetHashCode();
            }
        }
        return(hashcode);
    }
Example #17
0
    public override string ToString()
    {
        var  sb      = new StringBuilder("Profile(");
        bool __first = true;

        if (Mid != null && __isset.mid)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Mid: ");
            Mid.ToString(sb);
        }
        if (Userid != null && __isset.userid)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Userid: ");
            Userid.ToString(sb);
        }
        if (Phone != null && __isset.phone)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Phone: ");
            Phone.ToString(sb);
        }
        if (Email != null && __isset.email)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Email: ");
            Email.ToString(sb);
        }
        if (RegionCode != null && __isset.regionCode)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("RegionCode: ");
            RegionCode.ToString(sb);
        }
        if (DisplayName != null && __isset.displayName)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("DisplayName: ");
            DisplayName.ToString(sb);
        }
        if (PhoneticName != null && __isset.phoneticName)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("PhoneticName: ");
            PhoneticName.ToString(sb);
        }
        if (PictureStatus != null && __isset.pictureStatus)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("PictureStatus: ");
            PictureStatus.ToString(sb);
        }
        if (ThumbnailUrl != null && __isset.thumbnailUrl)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("ThumbnailUrl: ");
            ThumbnailUrl.ToString(sb);
        }
        if (StatusMessage != null && __isset.statusMessage)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("StatusMessage: ");
            StatusMessage.ToString(sb);
        }
        if (__isset.allowSearchByUserid)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("AllowSearchByUserid: ");
            AllowSearchByUserid.ToString(sb);
        }
        if (__isset.allowSearchByEmail)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("AllowSearchByEmail: ");
            AllowSearchByEmail.ToString(sb);
        }
        if (PicturePath != null && __isset.picturePath)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("PicturePath: ");
            PicturePath.ToString(sb);
        }
        if (MusicProfile != null && __isset.musicProfile)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("MusicProfile: ");
            MusicProfile.ToString(sb);
        }
        if (VideoProfile != null && __isset.videoProfile)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("VideoProfile: ");
            VideoProfile.ToString(sb);
        }
        sb.Append(")");
        return(sb.ToString());
    }
Example #18
0
        public override string ToString()
        {
            this.Init__jsonIgnore();
            string json = string.Concat(
                __jsonIgnore.ContainsKey("Id") ? string.Empty : string.Format(", Id : {0}", Id == null ? "null" : Id.ToString()),
                __jsonIgnore.ContainsKey("Extends") ? string.Empty : string.Format(", Extends : {0}", Extends == null ? "null" : string.Format("'{0}'", Extends.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))),
                __jsonIgnore.ContainsKey("Gate") ? string.Empty : string.Format(", Gate : {0}", Gate == null ? "null" : string.Format("'{0}'", Gate.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))),
                __jsonIgnore.ContainsKey("Guid") ? string.Empty : string.Format(", Guid : {0}", Guid == null ? "null" : string.Format("'{0}'", Guid.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))),
                __jsonIgnore.ContainsKey("Ip") ? string.Empty : string.Format(", Ip : {0}", Ip == null ? "null" : string.Format("'{0}'", Ip.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))),
                __jsonIgnore.ContainsKey("Number") ? string.Empty : string.Format(", Number : {0}", Number == null ? "null" : Number.ToString()),
                __jsonIgnore.ContainsKey("Server") ? string.Empty : string.Format(", Server : {0}", Server == null ? "null" : Server.ToString()),
                __jsonIgnore.ContainsKey("Shareid") ? string.Empty : string.Format(", Shareid : {0}", Shareid == null ? "null" : string.Format("'{0}'", Shareid.Replace("\\", "\\\\").Replace("\r\n", "\\r\\n").Replace("'", "\\'"))),
                __jsonIgnore.ContainsKey("State") ? string.Empty : string.Format(", State : {0}", State == null ? "null" : State.ToString()),
                __jsonIgnore.ContainsKey("Time") ? string.Empty : string.Format(", Time : {0}", Time == null ? "null" : Time.Value.Subtract(new DateTime(1970, 1, 1)).TotalMilliseconds.ToString()),
                __jsonIgnore.ContainsKey("Used_number") ? string.Empty : string.Format(", Used_number : {0}", Used_number == null ? "null" : Used_number.ToString()),
                __jsonIgnore.ContainsKey("Used_userid") ? string.Empty : string.Format(", Used_userid : {0}", Used_userid == null ? "null" : Used_userid.ToString()),
                __jsonIgnore.ContainsKey("Userid") ? string.Empty : string.Format(", Userid : {0}", Userid == null ? "null" : Userid.ToString()), " }");

            return(string.Concat("{", json.Substring(1)));
        }
Example #19
0
        public override bool Equals(object paramObject)
        {
            if (!(paramObject is LicenseRowItem))
            {
                return(false);
            }
            if (paramObject == this)
            {
                return(true);
            }
            LicenseRowItem licenseRowItem = (LicenseRowItem)paramObject;
            bool           @bool          = false;

            if (CheckedIn == licenseRowItem.CheckedIn && CID.Equals(licenseRowItem.CID, StringComparison.OrdinalIgnoreCase) && Userid.Equals(licenseRowItem.Userid, StringComparison.OrdinalIgnoreCase) && CheckedInDate.Equals(licenseRowItem.CheckedInDate) && ExpDate.Equals(licenseRowItem.ExpDate))
            {
                @bool = true;
            }
            return(@bool && hasSamePlugins(licenseRowItem));
        }
    protected void Login_Click(object sender, EventArgs e)
    {
        sResult = LG.CheckLoginStage(Userid.Value, encrypt(pass.Value));
        if (sResult == "1004")
        {
            WebMsgBox.Show("Login Failed!! User is Suspended!!", this.Page);
            return;
        }
        else
        {
            //Below commented by Abhishek as per requirement on 19-02-2018
            string RC = LG.CheckLoginStatus(Userid.Value, encrypt(pass.Value));
            if (RC == "1")
            {
                pass.Focus();
                pass.Value        = "";
                Lbl_Error.Visible = true;
                Lbl_Error.Text    = "Sorry User is Already Logged in ..!!";
                return;
            }

            //cmd = "Select B.BankCD As BankCode, B.BankName, B.MidName As BranchName, " +
            //          "(Select IsNull(BrCd, 0) From BankName Where BranchDesc = 'HO') As HOBRCD, U.BrCd, " +
            //          "Left(U.UserName, Case When CharIndex(' ', U.UserName) > 0 Then CharIndex(' ', U.UserName) Else Len(U.UserName) End) As UserName, " +
            //          "U.LoginCode, U.PermissionNo, U.UserGroup, U.MultiLog, U.EPassWord From UserMaster U " +
            //          "Inner Join BankName B With(NoLock) On U.BrCd = B.BrCd "+
            //"Where U.LoginCode = '" + "ATUL7" + "' And EPassword = '******' ";
            //SqlCommand cd = new SqlCommand(cmd);
            //string cs= ConfigurationManager.ConnectionStrings["ocbs"].ConnectionString;

            //SqlConnection con = new SqlConnection(cs);

            //con.Open();

            //SqlDataAdapter dt = new SqlDataAdapter(cmd, con);


            DT = LG.GetDetaile(Userid.Value, encrypt(pass.Value));
            string       txtpath = System.Web.HttpContext.Current.Server.MapPath("~/SqlConn/SYS.dat");
            StreamReader sr      = new StreamReader(txtpath);
            string       line    = sr.ReadToEnd();
            string[]     con     = line.Split("\n".ToCharArray());
            string       Date    = Decrypt(con[5].ToString());

            string Date1 = LG.getdate(Date);
            if (Date == null || Date1 == "")
            {
                WebMsgBox.Show("Error code-305", this.Page);
                return;
            }
            else
            {
                if (DT.Rows.Count > 0)
                {
                    Session["SessionTimeout"] = LG.GetSessionTime();
                    //  Added by amol on 21/11/2018 (for bank details)
                    Session["BankCode"]   = DT.Rows[0]["BankCode"].ToString();
                    Session["BankName"]   = DT.Rows[0]["BankName"].ToString();
                    Session["BranchName"] = DT.Rows[0]["BranchName"].ToString();
                    //  End added by amol on 21/11/2018

                    Session["BRCD"]      = DT.Rows[0]["BrCd"].ToString();
                    Session["HOBRCD"]    = DT.Rows[0]["HOBRCD"].ToString();
                    Session["MID"]       = DT.Rows[0]["PermissionNo"].ToString();
                    Session["LOGINCODE"] = DT.Rows[0]["LoginCode"].ToString();
                    Session["UserName"]  = DT.Rows[0]["UserName"].ToString();
                    Session["UGRP"]      = DT.Rows[0]["UserGroup"].ToString();
                    Session["MULTILOG"]  = DT.Rows[0]["MultiLog"].ToString();

                    if (DT.Rows.Count > 0)//Dhanya Shetty-To store the activity in Avs500 table as log details//
                    {
                        CLM.LOGDETAILS("Insert", Session["BRCD"].ToString(), Session["MID"].ToString(), "Login _" + Session["LOGINCODE"].ToString() + "", "00", Session["MID"].ToString());
                    }
                    if (DT.Rows[0]["EPassWord"].ToString() == "")
                    {
                        if (DT.Rows[0]["UserGroup"].ToString() == "1" || DT.Rows[0]["UserGroup"].ToString() == "2" || DT.Rows[0]["UserGroup"].ToString() == "3")
                        {
                            string url = "FrmSetPWD.aspx";
                            NewTab(url);
                        }
                    }
                    else
                    {
                        int RS = LG.UpdateLoginsts(Userid.Value, encrypt(pass.Value), "1", Session["BRCD"].ToString());
                        if (RS > 0)
                        {
                            Session["UID"] = Userid.Value;
                            Session["PWD"] = pass.Value;
                            Response.Redirect("FrmBlank.aspx", true);
                        }
                    }
                }
                else
                {
                    Lbl_Error.Visible = true;
                    Lbl_Error.Text    = "Login Fail Please Check UserId or Password ...!!";
                    Userid.Focus();
                    return;
                }
            }
        }
    }