private void GetUserByID()
        {
            BrilliantWMS.UserCreationService.iUserCreationClient userClient = new BrilliantWMS.UserCreationService.iUserCreationClient();
            try
            {
                CustomProfile profile = CustomProfile.GetProfile();

                BrilliantWMS.UserCreationService.vGetUserProfileByUserID objuser = new BrilliantWMS.UserCreationService.vGetUserProfileByUserID();
                objuser = userClient.GetUserProfileByUserID(profile.Personal.UserID, profile.DBConnection._constr);

                lblEmpNo.Text                = objuser.EmployeeID;
                lblUserName.Text             = objuser.Title != null ? objuser.Title + " " + objuser.userName : objuser.userName;
                lblDepartment.Text           = objuser.deptname;
                lblDesignation.Text          = objuser.desiName;
                lblDOB.Text                  = objuser.DateOfBirth == null ? "" : Convert.ToDateTime(objuser.DateOfBirth).ToString("dd-MMM-yyyy");
                lblDOJ.Text                  = objuser.DateOfJoining == null ? "" : Convert.ToDateTime(objuser.DateOfJoining).ToString("dd-MMM-yyyy");
                txtPhone.Text                = objuser.PhoneNo;
                txtMobile.Text               = objuser.MobileNo;
                txtEmailID.Text              = objuser.EmailID;
                txtOtherEmailID.Text         = objuser.OtherID;
                txtHighestQualification.Text = objuser.HighestQualification;
                txtInstratedIn.Text          = objuser.InterestedIn;
                lblReportingTo.Text          = objuser.ReportingTo;

                if (objuser.ProfileImg != null)
                {
                    Session["ProfileImg"] = objuser.ProfileImg;
                    ImgProfile.Src        = "../Image.aspx";
                }
                else
                {
                    ImgProfile.Src = "../App_Themes/Blue/img/Male.png";
                    if (profile.Personal.Gender != null)
                    {
                        if (profile.Personal.Gender != "M")
                        {
                            ImgProfile.Src = "../App_Themes/Blue/img/Female.png";
                        }
                    }
                }

                UCAddress1.ClearAddress("User");
                UCAddress1.FillAddressByObjectNameReferenceID("User", profile.Personal.UserID, "User");
            }
            catch (System.Exception ex)
            {
                Login.Profile.ErrorHandling(ex, this, "ProfileSetting", "GetUserByID");
            }
            finally
            {
                userClient.Close();
            }
        }
Ejemplo n.º 2
0
 protected void FillUserControl(long resultId)
 {
     try
     {
         CustomProfile profile = CustomProfile.GetProfile();
         UCAddress1.FillAddressByObjectNameReferenceID("Vendor", resultId, "Vendor");
         UCContactPerson1.FillContactPersonByObjectNameReferenceID("Vendor", resultId, "Vendor");
         UC_AttachDocument1.FillDocumentByObjectNameReferenceID(Convert.ToInt64(resultId), "Vendor", "Vendor");
         //UCPaymentDetail1.FillOutstandingGrid(resultId.ToString());
     }
     catch (System.Exception ex)
     {
         Login.Profile.ErrorHandling(ex, this, "Vendor Master", "FillUserControl");
     }
     finally
     {
     }
 }
 protected void FillUserControl(long resultId)
 {
     try
     {
         CustomProfile profile = CustomProfile.GetProfile();
         UCAddress1.FillAddressByObjectNameReferenceID("Client", resultId, "Client");
         UCContactPerson1.FillContactPersonByObjectNameReferenceID("Client", resultId, "Client");
         UC_AttachDocument1.FillDocumentByObjectNameReferenceID(Convert.ToInt64(resultId), "Client", "Client");
         /*  UC_StatutoryDetails1.BindGridStatutoryDetails(Convert.ToInt64(resultId), "Customer", profile.Personal.CompanyID);*/
         // UCPaymentDetail1.FillOutstandingGrid(resultId.ToString());                                                            // Coomented in BrilliantWMS to check first
     }
     catch (System.Exception ex)
     {
         Login.Profile.ErrorHandling(ex, this, "Client Master", "FillUserControl");
     }
     finally
     {
     }
 }