public async void RequestDetailsByRequestID()
        {
            try
            {
                progressDialog = ProgressDialog.Show(this, Android.Text.Html.FromHtml("<font color='#EC407A'> Please wait...</font>"), Android.Text.Html.FromHtml("<font color='#EC407A'> Checking User Info...</font>"), true);

                string     Url        = StatusModel.Url + "GetProcessRequestDetailsByRequestID";
                WebHelpper _objHelper = new WebHelpper();
                ProcessRequestDetailsByRequestIDModel _objProcessRequestDetailsByRequestIDModel = new ProcessRequestDetailsByRequestIDModel();

                _objProcessRequestDetailsByRequestIDModel.RequestProcessSrNo = Convert.ToInt32(StatusModel.RequestProcessSrNo);

                var PostString = JsonConvert.SerializeObject(_objProcessRequestDetailsByRequestIDModel);
                var request    = await _objHelper.MakePostRequest(Url, PostString, true);

                ResultProcessRequestDetailsByRequestIDModel = JsonConvert.DeserializeObject <ProcessRequestDetailsByRequestIDModel>(request);

                tvActivityOwner.Text = ResultProcessRequestDetailsByRequestIDModel.ActivityOwnerStatus;
                tvAreaOwner.Text     = ResultProcessRequestDetailsByRequestIDModel.AreaOwnerStatus;
                tvSafety.Text        = ResultProcessRequestDetailsByRequestIDModel.SafetyStatus;
                tvContractor.Text    = ResultProcessRequestDetailsByRequestIDModel.ContractorStatus;

                progressDialog.Hide();
            }

            catch (Exception e)
            {
                progressDialog.Hide();

                string ErrorMsg = e.ToString();
                Toast.MakeText(this, ErrorMsg, ToastLength.Long).Show();
            }
        }
        public async void RequestDetailsByRequestID()
        {
            try
            {
                progressDialog = ProgressDialog.Show(this, Android.Text.Html.FromHtml("<font color='#EC407A'> Please wait...</font>"), Android.Text.Html.FromHtml("<font color='#EC407A'> Checking User Info...</font>"), true);
                string     Url        = StatusModel.Url + "GetProcessRequestDetailsByRequestID";
                WebHelpper _objHelper = new WebHelpper();
                ProcessRequestDetailsByRequestIDModel _objProcessRequestDetailsByRequestIDModel = new ProcessRequestDetailsByRequestIDModel();

                _objProcessRequestDetailsByRequestIDModel.RequestProcessSrNo = Convert.ToInt32(StatusModel.RequestProcessSrNo);

                var PostString = JsonConvert.SerializeObject(_objProcessRequestDetailsByRequestIDModel);
                var request    = await _objHelper.MakePostRequest(Url, PostString, true);

                ResultProcessRequestDetailsByRequestIDModel = JsonConvert.DeserializeObject <ProcessRequestDetailsByRequestIDModel>(request);

                tvRequestID.Text    = Convert.ToString(ResultProcessRequestDetailsByRequestIDModel.RequestProcessSrNo);
                tvEmployeeName.Text = ResultProcessRequestDetailsByRequestIDModel.EmployeeName;
                tvDepartment.Text   = ResultProcessRequestDetailsByRequestIDModel.EmployeeDepartmentName;
                tvVendorNAme.Text   = ResultProcessRequestDetailsByRequestIDModel.VendorName;
                tvContractor.Text   = ResultProcessRequestDetailsByRequestIDModel.ContractorName;
                tvNatureOfWork.Text = ResultProcessRequestDetailsByRequestIDModel.NatureOfWork;
                tvStartTime.Text    = ResultProcessRequestDetailsByRequestIDModel.VisitStartTime.ToString();
                tvEndTime.Text      = ResultProcessRequestDetailsByRequestIDModel.VisitEndTime.ToString();
                tvNoOfPerson.Text   = ResultProcessRequestDetailsByRequestIDModel.NoOfVendors.ToString();
                tvReasons.Text      = ResultProcessRequestDetailsByRequestIDModel.VendorVisitResons;
                progressDialog.Hide();
            }
            catch (Exception e)
            {
                progressDialog.Hide();
                string ErrorMsg = e.ToString();
                Toast.MakeText(this, ErrorMsg, ToastLength.Long).Show();
            }
        }
Exemplo n.º 3
0
        public async void GetAllDesignationByDepartment(string sDepartmentID)
        {
            try
            {
                string                Url                   = StatusModel.Url + "GetDesignationMasterByDepartment";
                WebHelpper            _objHelper            = new WebHelpper();
                tbl_DesignationMaster _objDesignationMaster = new tbl_DesignationMaster();
                tbl_DepartmentMaster  _objDepartmentMaster  = new tbl_DepartmentMaster();
                _objDepartmentMaster.DepartmentID = Convert.ToInt32(sDepartmentID);
                var PostString = JsonConvert.SerializeObject(_objDepartmentMaster);
                var request    = await _objHelper.MakePostRequest(Url, PostString, true);

                ResultAllDesignationMaster = JsonConvert.DeserializeObject <List <tbl_DesignationMaster> >(request);

                DesignationByDepartment = new string[ResultAllDesignationMaster.Count + 1];

                int i = 1;
                DesignationByDepartment[0] = "--Select Designation--";
                foreach (var item in ResultAllDesignationMaster)
                {
                    DesignationByDepartment[i] = item.DesignationName;
                    i++;
                }


                ArrayAdapter _adapterDesignationByDepartment = new ArrayAdapter(this, Android.Resource.Layout.SimpleSpinnerDropDownItem, DesignationByDepartment);

                txt_EmployeeDesignationID.Adapter = _adapterDesignationByDepartment;
            }
            catch (Exception e)
            {
                string ErrorMsg = e.ToString();
                Toast.MakeText(this, ErrorMsg, ToastLength.Long).Show();
            }
        }
        public async void GetAllEmployeeDepartmentInfoByTokenNo()
        {
            try
            {
                progressDialog = ProgressDialog.Show(this, Android.Text.Html.FromHtml("<font color='#EC407A'> Please wait...</font>"), Android.Text.Html.FromHtml("<font color='#EC407A'> Checking User Info...</font>"), true);
                string     Url        = StatusModel.Url + "GetDepartmentEmployeeInformationByTokenNo";
                WebHelpper _objHelper = new WebHelpper();
                GetAllDepartmentEmployeeNameModel _objGetAllDepartmentEmployeeNameModel = new GetAllDepartmentEmployeeNameModel();

                _objGetAllDepartmentEmployeeNameModel.EmployeeTokenNo = StatusModel.LoginUserName;

                var PostString = JsonConvert.SerializeObject(_objGetAllDepartmentEmployeeNameModel);
                var request    = await _objHelper.MakePostRequest(Url, PostString, true);

                GetAllDepartmentEmployeeNameModel ResultGetAllDepartmentEmployeeNameModel = JsonConvert.DeserializeObject <GetAllDepartmentEmployeeNameModel>(request);

                lblTokenNo.Text      = ResultGetAllDepartmentEmployeeNameModel.EmployeeTokenNo;
                lblEmployeeName.Text = ResultGetAllDepartmentEmployeeNameModel.EmployeeName;
                lblDepartment.Text   = ResultGetAllDepartmentEmployeeNameModel.EmployeeDepartmentName;
                StatusModel.EmployeeDesignationName = ResultGetAllDepartmentEmployeeNameModel.EmployeeDesignationName;


                string     Url1        = StatusModel.Url + "GetProcessRequestByUser";
                WebHelpper _objHelper1 = new WebHelpper();

                var PostString1 = JsonConvert.SerializeObject(ResultGetAllDepartmentEmployeeNameModel);
                var request1    = await _objHelper.MakePostRequest(Url1, PostString1, true);

                ResultListProcessRequestByDepartmentEmployeeModel = JsonConvert.DeserializeObject <List <ListProcessRequestByDepartmentEmployeeModel> >(request1);


                mListView.Adapter = new RPItemListForDeptEmployeeAdapter(this, ResultListProcessRequestByDepartmentEmployeeModel);
                progressDialog.Hide();
            }
            catch (Exception e)
            {
                progressDialog.Hide();
                string ErrorMsg = e.ToString();
                Toast.MakeText(this, ErrorMsg, ToastLength.Long).Show();
            }
        }
Exemplo n.º 5
0
        private async void RequestProcess()
        {
            try
            {
                Drawable icon_error = Resources.GetDrawable(Resource.Drawable.alert);
                icon_error.SetBounds(0, 0, 40, 30);

                if (txt_EmployeeName.Text != "")
                {
                    if (txt_EmployeeDepartmentID.Text != "")
                    {
                        if (dtp_RequestStartTime.Text != "")
                        {
                            if (dtp_RequestEndTime.Text != "")
                            {
                                if (txt_Associries.Text != "")
                                {
                                    if (txt_NoOFVendors.Text != "")
                                    {
                                        if (txt_Reasons.Text != "")
                                        {
                                            foreach (var item in ResultGetAllDepartmentEmployeeNameModel)
                                            {
                                                if (item.EmployeeName.ToString().Trim() == (txt_EmployeeName.Text.Trim()))
                                                {
                                                    _ObjRequestProcess.EmployeeDepartmentID = item.EmployeeDepartmentID;
                                                    _ObjRequestProcess.EmployeeId           = item.EmployeeSrNo;
                                                }
                                            }

                                            progressDialog = ProgressDialog.Show(this, Android.Text.Html.FromHtml("<font color='#EC407A'> Please wait...</font>"), Android.Text.Html.FromHtml("<font color='#EC407A'> Creating New Request...</font>"), true);


                                            string     Url        = StatusModel.Url + "GetVendorUserInformationByVendorUserID";
                                            WebHelpper _objHelper = new WebHelpper();
                                            VendorUserRegistrationModel _objVendorUserRegistrationModel = new VendorUserRegistrationModel();

                                            _objVendorUserRegistrationModel.VendorUserID = StatusModel.LoginUserName;

                                            var PostString = JsonConvert.SerializeObject(_objVendorUserRegistrationModel);
                                            var request    = await _objHelper.MakePostRequest(Url, PostString, true);

                                            VendorUserRegistrationModel ResultVendorUserRegistrationModel = JsonConvert.DeserializeObject <VendorUserRegistrationModel>(request);



                                            _ObjRequestProcess.VendorSrNo          = ResultVendorUserRegistrationModel.VendorSrNo;
                                            _ObjRequestProcess.VisitStartTime      = Convert.ToDateTime(dtp_RequestStartTime.Text);
                                            _ObjRequestProcess.VisitEndTime        = Convert.ToDateTime(dtp_RequestEndTime.Text);
                                            _ObjRequestProcess.VendorAccessories   = txt_Associries.Text;
                                            _ObjRequestProcess.NoOfVendors         = Convert.ToInt32(txt_NoOFVendors.Text);
                                            _ObjRequestProcess.VendorVisitResons   = txt_Reasons.Text;
                                            _ObjRequestProcess.RequestProcessDate  = Convert.ToDateTime(DateTime.Now.ToString("dd/MM/yyyy hh:mm:ss tt"));
                                            _ObjRequestProcess.ActivityOwnerStatus = "None";
                                            _ObjRequestProcess.AreaOwnerStatus     = "None";
                                            _ObjRequestProcess.SafetyStatus        = "None";
                                            _ObjRequestProcess.ContractorStatus    = "None";
                                            // ADD Insert Code Here

                                            WebHelpper _objHelper1 = new WebHelpper();

                                            string Url1 = StatusModel.Url + "AddRequestProcess";

                                            var PostString1  = JsonConvert.SerializeObject(_ObjRequestProcess);
                                            var requestTemp1 = await _objHelper1.MakePostRequest(Url1, PostString1, true);

                                            ResultModel ResultgetRequest1 = JsonConvert.DeserializeObject <ResultModel>(requestTemp1);

                                            if (ResultgetRequest1.success == 1)
                                            {
                                                progressDialog.Hide();
                                                Toast.MakeText(this, ResultgetRequest1.msg, ToastLength.Short).Show();
                                            }

                                            else
                                            {
                                                progressDialog.Hide();
                                                Toast.MakeText(this, ResultgetRequest1.msg, ToastLength.Short).Show();
                                                return;
                                            }

                                            clear();
                                        }
                                        else
                                        {
                                            txt_Reasons.RequestFocus();
                                            txt_Reasons.SetError("Please Enter Visit Reason First", icon_error);
                                        }
                                    }
                                    else
                                    {
                                        txt_NoOFVendors.RequestFocus();
                                        txt_NoOFVendors.SetError("Please Select No of Vendors First", icon_error);
                                    }
                                }
                                else
                                {
                                    txt_Associries.RequestFocus();
                                    txt_Associries.SetError("Please Enter Associries First", icon_error);
                                }
                            }

                            else
                            {
                                dtp_RequestEndTime.RequestFocus();
                                dtp_RequestEndTime.SetError("Please Select End Time First", icon_error);
                            }
                        }
                        else
                        {
                            dtp_RequestEndTime.RequestFocus();
                            dtp_RequestEndTime.SetError("Please Select Start Time First", icon_error);
                        }
                    }
                    else
                    {
                        txt_EmployeeDepartmentID.RequestFocus();
                        txt_EmployeeDepartmentID.SetError("Please Select Employee Department First", icon_error);
                    }
                }
                else
                {
                    txt_EmployeeName.RequestFocus();
                    txt_EmployeeName.SetError("Please Enter Full Name First", icon_error);
                }
            }
            catch (Exception e)
            {
                string ErrorMsg = e.ToString();
                Toast.MakeText(this, ErrorMsg, ToastLength.Long).Show();
            }
        }
        public async void StatusUpdate()
        {
            try
            {
                progressDialog = ProgressDialog.Show(this, Android.Text.Html.FromHtml("<font color='#EC407A'> Please wait...</font>"), Android.Text.Html.FromHtml("<font color='#EC407A'> Checking User Info...</font>"), true);

                tbl_RequestProcess _objRequestProcessModel = new tbl_RequestProcess();

                _objRequestProcessModel.EmployeeId           = ResultProcessRequestDetailsByRequestIDModel.EmployeeId;
                _objRequestProcessModel.VendorSrNo           = ResultProcessRequestDetailsByRequestIDModel.VendorSrNo;
                _objRequestProcessModel.RequestProcessSrNo   = ResultProcessRequestDetailsByRequestIDModel.RequestProcessSrNo;
                _objRequestProcessModel.EmployeeDepartmentID = ResultProcessRequestDetailsByRequestIDModel.EmployeeDepartmentID;
                _objRequestProcessModel.VisitStartTime       = ResultProcessRequestDetailsByRequestIDModel.VisitStartTime;
                _objRequestProcessModel.VisitEndTime         = ResultProcessRequestDetailsByRequestIDModel.VisitEndTime;
                _objRequestProcessModel.VendorAccessories    = ResultProcessRequestDetailsByRequestIDModel.VendorAccessories;
                _objRequestProcessModel.NoOfVendors          = ResultProcessRequestDetailsByRequestIDModel.NoOfVendors;
                _objRequestProcessModel.VendorVisitResons    = ResultProcessRequestDetailsByRequestIDModel.VendorVisitResons;
                _objRequestProcessModel.RequestProcessDate   = ResultProcessRequestDetailsByRequestIDModel.RequestProcessDate;

                if (ButtonAcceptOrDecline == "Decline")
                {
                    if (StatusModel.EmployeeDesignationName == "Activity Owner")
                    {
                        _objRequestProcessModel.ActivityOwnerStatus = "Decline";
                    }
                    else
                    {
                        _objRequestProcessModel.ActivityOwnerStatus = ResultProcessRequestDetailsByRequestIDModel.ActivityOwnerStatus;
                    }

                    if (StatusModel.EmployeeDesignationName == "Area Owner")
                    {
                        _objRequestProcessModel.AreaOwnerStatus = "Decline";
                    }
                    else
                    {
                        _objRequestProcessModel.AreaOwnerStatus = ResultProcessRequestDetailsByRequestIDModel.AreaOwnerStatus;
                    }

                    if (StatusModel.EmployeeDesignationName == "Safety")
                    {
                        _objRequestProcessModel.SafetyStatus = "Decline";
                    }
                    else
                    {
                        _objRequestProcessModel.SafetyStatus = ResultProcessRequestDetailsByRequestIDModel.SafetyStatus;
                    }

                    if (StatusModel.LoginUserStatus == 1)
                    {
                        _objRequestProcessModel.ContractorStatus = "Decline";
                    }
                    else
                    {
                        _objRequestProcessModel.ContractorStatus = ResultProcessRequestDetailsByRequestIDModel.ContractorStatus;
                    }
                }
                else
                {
                    if (StatusModel.EmployeeDesignationName == "Activity Owner")
                    {
                        _objRequestProcessModel.ActivityOwnerStatus = "Accepted";
                    }
                    else
                    {
                        _objRequestProcessModel.ActivityOwnerStatus = ResultProcessRequestDetailsByRequestIDModel.ActivityOwnerStatus;
                    }

                    if (StatusModel.EmployeeDesignationName == "Area Owner")
                    {
                        _objRequestProcessModel.AreaOwnerStatus = "Accepted";
                    }
                    else
                    {
                        _objRequestProcessModel.AreaOwnerStatus = ResultProcessRequestDetailsByRequestIDModel.AreaOwnerStatus;
                    }

                    if (StatusModel.EmployeeDesignationName == "Safety")
                    {
                        _objRequestProcessModel.SafetyStatus = "Accepted";
                    }
                    else
                    {
                        _objRequestProcessModel.SafetyStatus = ResultProcessRequestDetailsByRequestIDModel.SafetyStatus;
                    }

                    if (StatusModel.LoginUserStatus == 1)
                    {
                        _objRequestProcessModel.ContractorStatus = "Accepted";
                    }
                    else
                    {
                        _objRequestProcessModel.ContractorStatus = ResultProcessRequestDetailsByRequestIDModel.ContractorStatus;
                    }
                }



                string     Url        = StatusModel.Url + "ManageProcessRequestStatusUpdate";
                WebHelpper _objHelper = new WebHelpper();

                var PostString = JsonConvert.SerializeObject(_objRequestProcessModel);
                var request    = await _objHelper.MakePostRequest(Url, PostString, true);

                ResultModel ResultgetRequest = JsonConvert.DeserializeObject <ResultModel>(request);

                if (ResultgetRequest.success == 1)
                {
                    progressDialog.Hide();
                    Toast.MakeText(this, ResultgetRequest.msg, ToastLength.Short).Show();
                }

                else
                {
                    progressDialog.Hide();
                    Toast.MakeText(this, ResultgetRequest.msg, ToastLength.Short).Show();
                    return;
                }
            }
            catch (Exception ex)
            {
                progressDialog.Hide();
                string ErrorMsg = ex.ToString();
                Toast.MakeText(this, ErrorMsg, ToastLength.Long).Show();
            }
        }
Exemplo n.º 7
0
        private async void DepartmentEmployeeRegistration()
        {
            try

            {
                TokenNo();

                Drawable icon_error = Resources.GetDrawable(Resource.Drawable.alert);
                icon_error.SetBounds(0, 0, 40, 30);
                if (txt_EmployeeTokenNo.Text != "")
                {
                    if (txt_EmployeeName.Text != "")
                    {
                        if (txt_EmployeeAddress.Text != "")
                        {
                            if (txt_EmployeeContactNo.Text != "")
                            {
                                if (txt_EmployeeEmailID.Text != "")
                                {
                                    if (txt_EmployeeDepartmentID.Text != "")
                                    {
                                        if (txt_EmployeeDesignationID.Text != "")
                                        {
                                            if (txt_EmployeePassword.Text != "")
                                            {
                                                foreach (var item in ResultAllDesignationMaster)
                                                {
                                                    if (item.DesignationName.ToString().Trim() == (txt_EmployeeDesignationID.Text.Trim()))
                                                    {
                                                        _ObjDepartmentEmployeeRegistration.EmployeeDepartmentID  = item.DepartmentID;
                                                        _ObjDepartmentEmployeeRegistration.EmployeeDesignationID = item.DesignationID;
                                                    }
                                                }


                                                _ObjDepartmentEmployeeRegistration.DeviceTokenId     = DTI.ToString();
                                                _ObjDepartmentEmployeeRegistration.EmployeeTokenNo   = txt_EmployeeTokenNo.Text;
                                                _ObjDepartmentEmployeeRegistration.EmployeeName      = txt_EmployeeName.Text;
                                                _ObjDepartmentEmployeeRegistration.EmployeeAddress   = txt_EmployeeAddress.Text;
                                                _ObjDepartmentEmployeeRegistration.EmployeeContactNo = txt_EmployeeContactNo.Text;
                                                _ObjDepartmentEmployeeRegistration.EmployeeEmailID   = txt_EmployeeEmailID.Text;
                                                //_ObjDepartmentEmployeeRegistration.EmployeeDepartmentID = Convert.ToInt32(txt_EmployeeDepartmentID.Text);
                                                //_ObjDepartmentEmployeeRegistration.EmployeeDesignationID = Convert.ToInt32(txt_EmployeeDesignationID.Text);
                                                _ObjDepartmentEmployeeRegistration.EmployeePassword = txt_EmployeePassword.Text;
                                                _ObjDepartmentEmployeeRegistration.Date             = Convert.ToDateTime(DateTime.Now.ToString("dd/MM/yyyy hh:mm:ss tt"));
                                                // ADD Insert Code Here

                                                WebHelpper _objHelper = new WebHelpper();

                                                string Url = StatusModel.Url + "AddDepartmentEmployeeRegistration";

                                                progressDialog = ProgressDialog.Show(this, Android.Text.Html.FromHtml("<font color='#EC407A'> Please wait...</font>"), Android.Text.Html.FromHtml("<font color='#EC407A'> Data Inserting...</font>"), true);

                                                var PostString  = JsonConvert.SerializeObject(_ObjDepartmentEmployeeRegistration);
                                                var requestTemp = await _objHelper.MakePostRequest(Url, PostString, true);

                                                ResultModel ResultgetRequest = JsonConvert.DeserializeObject <ResultModel>(requestTemp);

                                                if (ResultgetRequest.success == 1)
                                                {
                                                    progressDialog.Hide();
                                                    Toast.MakeText(this, ResultgetRequest.msg, ToastLength.Short).Show();
                                                }

                                                else
                                                {
                                                    progressDialog.Hide();
                                                    Toast.MakeText(this, ResultgetRequest.msg, ToastLength.Short).Show();
                                                    return;
                                                }


                                                clear();
                                            }
                                            else
                                            {
                                                txt_EmployeePassword.RequestFocus();
                                                txt_EmployeePassword.SetError("Please Enter Password First", icon_error);
                                            }
                                        }
                                        else
                                        {
                                            txt_EmployeeDesignationID.RequestFocus();
                                            txt_EmployeeDesignationID.SetError("Please Select Designation First", icon_error);
                                        }
                                    }
                                    else
                                    {
                                        txt_EmployeeDepartmentID.RequestFocus();
                                        txt_EmployeeDepartmentID.SetError("Please Select Department First", icon_error);
                                    }
                                }
                                else
                                {
                                    txt_EmployeeEmailID.RequestFocus();
                                    txt_EmployeeEmailID.SetError("Please Enter Email ID First", icon_error);
                                }
                            }
                            else
                            {
                                txt_EmployeeContactNo.RequestFocus();
                                txt_EmployeeContactNo.SetError("Please Enter Contact Number First", icon_error);
                            }
                        }
                        else
                        {
                            txt_EmployeeAddress.RequestFocus();
                            txt_EmployeeAddress.SetError("Please Enter Address First", icon_error);
                        }
                    }
                    else
                    {
                        txt_EmployeeName.RequestFocus();
                        txt_EmployeeName.SetError("Please Enter Full Name First", icon_error);
                    }
                }
                else
                {
                    txt_EmployeeTokenNo.RequestFocus();
                    txt_EmployeeTokenNo.SetError("Please Enter Token Number First", icon_error);
                }
            }
            catch (Exception e)
            {
                progressDialog.Hide();
                string ErrorMsg = e.ToString();
                Toast.MakeText(this, ErrorMsg, ToastLength.Long).Show();
            }
        }
Exemplo n.º 8
0
        private async void BtnLogIN_Click(object sender, EventArgs e)
        {
            try
            {
                Drawable icon_error = Resources.GetDrawable(Resource.Drawable.alert);
                icon_error.SetBounds(0, 0, 40, 30);
                if (txt_UserName.Text != "")
                {
                    if (txt_Password.Text != "")
                    {
                        UserLoginModel _objUserLoginModel = new Models.UserLoginModel();
                        StatusModel.LoginUserName   = txt_UserName.Text;
                        _objUserLoginModel.UserName = txt_UserName.Text;
                        _objUserLoginModel.Password = txt_Password.Text;

                        if (StatusModel.LoginUserStatus == 0)
                        {
                            WebHelpper _objHelper = new WebHelpper();

                            string Url = StatusModel.Url + "EmployeeLogIn";

                            progressDialog = ProgressDialog.Show(this, Android.Text.Html.FromHtml("<font color='#EC407A'> Please wait...</font>"), Android.Text.Html.FromHtml("<font color='#EC407A'> Checking User Info...</font>"), true);

                            var PostString  = JsonConvert.SerializeObject(_objUserLoginModel);
                            var requestTemp = await _objHelper.MakePostRequest(Url, PostString, true);

                            ResultModel ResultgetRequest = JsonConvert.DeserializeObject <ResultModel>(requestTemp);

                            if (ResultgetRequest.success == 1)
                            {
                                _MyFirebaseIIDService.OnTokenRefresh(txt_UserName.Text.Trim(), 0);
                                clear();
                                progressDialog.Hide();
                                Toast.MakeText(this, ResultgetRequest.msg, ToastLength.Short).Show();
                                Intent intent = new Intent(this, typeof(CheckVendorRequestActivity));
                                this.StartActivity(intent);
                            }

                            else
                            {
                                progressDialog.Hide();
                                Toast.MakeText(this, ResultgetRequest.msg, ToastLength.Short).Show();
                                clear();
                                return;
                            }
                        }
                        else if (StatusModel.LoginUserStatus == 1)
                        {
                            WebHelpper _objHelper = new WebHelpper();

                            string Url = StatusModel.Url + "VendorLogIn";

                            progressDialog = ProgressDialog.Show(this, Android.Text.Html.FromHtml("<font color='#EC407A'> Please wait...</font>"), Android.Text.Html.FromHtml("<font color='#EC407A'> Checking User Info...</font>"), true);

                            var PostString  = JsonConvert.SerializeObject(_objUserLoginModel);
                            var requestTemp = await _objHelper.MakePostRequest(Url, PostString, true);

                            ResultModel ResultgetRequest = JsonConvert.DeserializeObject <ResultModel>(requestTemp);

                            if (ResultgetRequest.success == 1)
                            {
                                _MyFirebaseIIDService.OnTokenRefresh(txt_UserName.Text.Trim(), 1);
                                clear();
                                progressDialog.Hide();
                                Toast.MakeText(this, ResultgetRequest.msg, ToastLength.Short).Show();
                                Intent intent = new Intent(this, typeof(VendorCreateNewRequestActivity));
                                this.StartActivity(intent);
                            }

                            else
                            {
                                progressDialog.Hide();
                                Toast.MakeText(this, ResultgetRequest.msg, ToastLength.Short).Show();
                                clear();
                                return;
                            }
                        }
                        // ADD Insert Code Here
                    }
                    else
                    {
                        txt_Password.RequestFocus();
                        txt_Password.SetError("Please Enter Password First", icon_error);
                    }
                }
                else
                {
                    txt_UserName.RequestFocus();
                    txt_UserName.SetError("Please Enter UserName First", icon_error);
                }
            }
            catch (Exception ex)
            {
                string ErrorMsg = ex.ToString();
                Toast.MakeText(this, ErrorMsg, ToastLength.Long).Show();
            }
        }