internal void PopulateControls(string assno)
        {
            using (AccetManagementEntities db = new AccetManagementEntities())
            {
                var assDetails = db.ASSETs.Where(c => c.ASSETNO == assno).ToList();

                var assetId = assDetails[0].ASSETTYPEID;
                var dd      = db.ASSETTYPEs.Where(e => e.ASSETTYPEID == assetId).Select(e => e.ASSETTYPE1).ToList();

                var loc   = assDetails[0].LOCATIONID;
                var ddLoc = db.LOCATIONs.Where(e => e.LOCATIONID == loc).Select(e => e.LOCATIONNAME).ToList();

                var statusId = assDetails[0].STATUSID;
                var ddsi     = db.STATUS.Where(e => e.STATUSID == statusId).Select(e => e.STATUSNAME).ToList();

                var cond  = assDetails[0].CONDITIONID;
                var ddCon = db.CONDITIONs.Where(e => e.CONDITIONID == cond).Select(e => e.CONDITIONNAME).ToList();

                txtDesription.Text                 = assDetails[0].DESCRIPTION;
                cmBAssetType.Text                  = dd[0].ToString();
                cmBLocation.Text                   = ddLoc[0].ToString();
                txtmanu.Text                       = assDetails[0].MANUFACTURER;
                txtBrand.Text                      = assDetails[0].BRAND;
                txtAssetNumber.Text                = assDetails[0].ASSETNO;
                userControl11.txtserial.Text       = assDetails[0].SERIALNUMBER;
                userControl11.cmBStatus.Text       = ddsi[0].ToString();
                userControl11.cmBCondition.Text    = ddCon[0].ToString();
                userControl11.txtcheckedOutto.Text = assDetails[0].EMPNAME.ToString();
                userControl11.dueDatepicker.Text   = assDetails[0].DUEDATE.ToString();
                userControl11.txtNotes.Text        = assDetails[0].NOTES;
                this.Text = "Edit Asset  " + assDetails[0].ASSETNO;
                var er = userControlFinance1.Controls.Find("txtPoNumber", true);
                var financeTableData = db.FINANCEs.SingleOrDefault(c => c.ASSETNO == assno);

                if (financeTableData != null)
                {
                    if (financeTableData.VENDORNO != "")
                    {
                        var vendorId = db.VENDORs.Where(e => e.VENDORNO == financeTableData.VENDORNO).ToList();
                        userControlFinance1.txtPoNumber.Text      = financeTableData.PONO;
                        userControlFinance1.cmdVendor.Text        = vendorId[0].VENDORNAME;
                        userControlFinance1.recPeriod.Value       = financeTableData.RECOVERYPERIOD;
                        userControlFinance1.txtPurchasePrice.Text = financeTableData.PURCHASEPRICE.ToString();
                        userControlFinance1.txtScrapValue.Text    = financeTableData.SCRAPEVALUE.ToString();
                        userControlFinance1.txtMarketVlaue.Text   = financeTableData.MARKETVALUE.ToString();
                        userControlFinance1.dtpPurchase.Value     = financeTableData.PURCHASEDATE;
                        userControlFinance1.dtpWarranty.Value     = financeTableData.WARRANTYEND;
                        userControlFinance1.dtpService.Value      = financeTableData.INSERVICEDATE;
                    }
                }



                CommonData.SelectedEmpId = assDetails[0].EMPID;

                //picture

                string fileName = db.ASSETIMAGEs.Where(f => f.ASSETID == assno).Select(f => f.Filepath).FirstOrDefault();

                if (fileName != null && fileName != "")
                {
                    userControl11.pictureBox1.Image = UserControl1.ResizeImage(Image.FromFile(fileName), this.Width, this.Height);
                }
                else
                {
                }
            }
        }