public void BindGrid()
 {
     DataTable dtTable = new DataTable();
     dtTable = CreateDataTable();
     Asset_mst objAsset = new Asset_mst();
     BLLCollection<Asset_mst> colAsset = new BLLCollection<Asset_mst>();
     colAsset = objAsset.Get_All();
     foreach (Asset_mst obj in colAsset)
     {
         DataRow row;
         row = dtTable.NewRow();
         row["computername"] = Convert.ToString(obj.Computername);
         assetid = Convert.ToInt16(obj.Assetid);
         Asset_OperatingSystem_mst objos = new Asset_OperatingSystem_mst();
         objos = objos.Get_By_Assetid(assetid);
         row["osname"] = Convert.ToString(objos.Os_name);
         row["username"] = Convert.ToString(objos.User_name);
         row["productkey"] = Convert.ToString(objos.Product_key);
         Asset_ProductInfo_mst objproduct = new Asset_ProductInfo_mst();
         objproduct = objproduct.Get_By_Assetid(assetid);
         row["productname"] = Convert.ToString(objproduct.Product_name);
         row["productmanu"] = Convert.ToString(objproduct.Product_manufacturer);
         row["serialno"] = Convert.ToString(objproduct.Serial_number);
         Asset_Processor_mst objprocessor = new Asset_Processor_mst();
         objprocessor = objprocessor.Get_By_Assetid(assetid);
         row["processorname"] = Convert.ToString(objprocessor.Processor_name);
         Asset_Memory_mst objmemory = new Asset_Memory_mst();
         objmemory = objmemory.Get_By_Assetid(assetid);
         row["physicalmemory"] = Convert.ToString(objmemory.Physical_mem);
         dtTable.Rows.Add(row);
     }
     dtgrid.DataSource = dtTable;
     dtgrid.DataBind();
 }
Esempio n. 2
0
    public void Asset_Processor_Info(XmlDocument xmldoc)
    {
        XmlNode inventory_date = xmldoc.DocumentElement.SelectSingleNode("//Computer//Created_on");

        inventorydate2 = inventory_date.InnerText;
        XmlNode             Family       = xmldoc.DocumentElement.SelectSingleNode("//Computer//Hardware//Processors//Family");
        XmlNode             Manufacturer = xmldoc.DocumentElement.SelectSingleNode("//Computer//Hardware//Processors//Manufacturer");
        XmlNode             Max_speed    = xmldoc.DocumentElement.SelectSingleNode("//Computer//Hardware//Processors//Max_speed");
        XmlNode             Model        = xmldoc.DocumentElement.SelectSingleNode("//Computer//Hardware//Processors//Model");
        XmlNode             processors   = xmldoc.DocumentElement.SelectSingleNode("//Computer//Hardware//Processors//Processor");
        XmlNode             Speed        = xmldoc.DocumentElement.SelectSingleNode("//Computer//Hardware//Processors//Speed");
        XmlNode             Stepping     = xmldoc.DocumentElement.SelectSingleNode("//Computer//Hardware//Processors//Stepping");
        Asset_mst           objAsset     = new Asset_mst();
        int                 varassetid   = objAsset.Get_Current_Assetid();
        Asset_Processor_mst objprocessor = new Asset_Processor_mst();

        if (count1 == 0)
        {
            objprocessor.Assetid = varassetid;
        }
        else
        {
            objprocessor.Assetid = Assetid;
        }

        objprocessor.Family         = Family.InnerText;
        objprocessor.Inventory_date = inventorydate2;
        objprocessor.Manufacturer   = Manufacturer.InnerText;
        objprocessor.Max_speed      = Max_speed.InnerText;
        objprocessor.Model          = Model.InnerText;
        objprocessor.Processor_name = processors.InnerText;
        objprocessor.Speed          = Speed.InnerText;
        objprocessor.Stepping       = Stepping.InnerText;
        objprocessor.Insert();
    }
Esempio n. 3
0
    public void BindGrid()
    {
        DataTable dtTable = new DataTable();

        dtTable = CreateDataTable();
        Asset_mst objAsset = new Asset_mst();
        BLLCollection <Asset_mst> colAsset = new BLLCollection <Asset_mst>();

        colAsset = objAsset.Get_All();
        foreach (Asset_mst obj in colAsset)
        {
            DataRow row;
            row = dtTable.NewRow();
            row["computername"] = Convert.ToString(obj.Computername);
            assetid             = Convert.ToInt32(obj.Assetid);
            Asset_OperatingSystem_mst objos = new Asset_OperatingSystem_mst();
            objos             = objos.Get_By_Assetid(assetid);
            row["osname"]     = Convert.ToString(objos.Os_name);
            row["username"]   = Convert.ToString(objos.User_name);
            row["productkey"] = Convert.ToString(objos.Product_key);
            Asset_ProductInfo_mst objproduct = new Asset_ProductInfo_mst();
            objproduct         = objproduct.Get_By_Assetid(assetid);
            row["productname"] = Convert.ToString(objproduct.Product_name);
            row["productmanu"] = Convert.ToString(objproduct.Product_manufacturer);
            row["serialno"]    = Convert.ToString(objproduct.Serial_number);
            Asset_Processor_mst objprocessor = new Asset_Processor_mst();
            objprocessor         = objprocessor.Get_By_Assetid(assetid);
            row["processorname"] = Convert.ToString(objprocessor.Processor_name);
            Asset_Memory_mst objmemory = new Asset_Memory_mst();
            objmemory             = objmemory.Get_By_Assetid(assetid);
            row["physicalmemory"] = Convert.ToString(objmemory.Physical_mem);
            dtTable.Rows.Add(row);
        }
        dtgrid.DataSource = dtTable;
        dtgrid.DataBind();
    }
    public void Asset_Processor_Info(XmlDocument xmldoc)
    {
        try
        {
            XmlNode inventory_date = xmldoc.DocumentElement.SelectSingleNode("//Computer//Created_on");
            inventorydate2 = inventory_date.InnerText;
            XmlNode Family = xmldoc.DocumentElement.SelectSingleNode("//Computer//Hardware//Processors//Family");
            XmlNode Manufacturer = xmldoc.DocumentElement.SelectSingleNode("//Computer//Hardware//Processors//Manufacturer");
            XmlNode Max_speed = xmldoc.DocumentElement.SelectSingleNode("//Computer//Hardware//Processors//Max_speed");
            XmlNode Model = xmldoc.DocumentElement.SelectSingleNode("//Computer//Hardware//Processors//Model");
            XmlNode processors = xmldoc.DocumentElement.SelectSingleNode("//Computer//Hardware//Processors//Processor");
            XmlNode Speed = xmldoc.DocumentElement.SelectSingleNode("//Computer//Hardware//Processors//Speed");
            XmlNode Stepping = xmldoc.DocumentElement.SelectSingleNode("//Computer//Hardware//Processors//Stepping");
            Asset_mst objAsset = new Asset_mst();
            int varassetid = objAsset.Get_Current_Assetid();
            Asset_Processor_mst objprocessor = new Asset_Processor_mst();
            if (count1 == 0)
            {
                objprocessor.Assetid = varassetid;
            }
            else
            {
                objprocessor.Assetid = Assetid;
            }

            objprocessor.Family = Family.InnerText;
            objprocessor.Inventory_date = inventorydate2;
            objprocessor.Manufacturer = Manufacturer.InnerText;
            objprocessor.Max_speed = Max_speed.InnerText;
            objprocessor.Model = Model.InnerText;
            objprocessor.Processor_name = processors.InnerText;
            objprocessor.Speed = Speed.InnerText;
            objprocessor.Stepping = Stepping.InnerText;
            objprocessor.Insert();
        }
        catch (Exception ex)
        {
            ex.ToString();
        }
    }
 public int Update_Asset_Processor_mst_By_id(Asset_Processor_mst objAssetProcessor)
 {
     return (int)ExecuteNonQuery(Sp_Asset_Processor_Update, new object[] { objAssetProcessor.Assetprocessorid, objAssetProcessor.Assetid, objAssetProcessor.Inventory_date, objAssetProcessor.Processor_name, objAssetProcessor.Manufacturer, objAssetProcessor.Speed, objAssetProcessor.Family, objAssetProcessor.Model, objAssetProcessor.Stepping, objAssetProcessor.Max_speed });
 }
    public object GenerateAssetProcessor_mst_ByAssetidObject(ref IDataReader returnData)
    {
        Asset_Processor_mst obj = new Asset_Processor_mst();
        while (returnData.Read())
        {
            obj.Assetid = (int)returnData["assetid"];
            obj.Assetprocessorid = (int)returnData["assetprocessorid"];
            //DateTime inventorydatetime = new DateTime();
            //inventorydatetime = (DateTime)returnData["inventorydate"];
            //obj.Inventory_date = inventorydatetime.ToString();
            obj.Family = (string)returnData["family"];
            obj.Manufacturer = (string)returnData["manufacturer"];
            obj.Max_speed = (string)returnData["max_speed"];
            obj.Model = (string)returnData["model"];
            obj.Processor_name = (string)returnData["processor_name"];
            obj.Speed = (string)returnData["speed"];
            obj.Stepping = (string)returnData["stepping"];

        }
        returnData.Close();
        returnData.Dispose();
        return obj;
    }
    public CollectionBase GenerateAssetProcessor_mstCollection(ref IDataReader returnData)
    {
        BLLCollection<Asset_Processor_mst> col = new BLLCollection<Asset_Processor_mst>();
        while (returnData.Read())
        {
            Asset_Processor_mst obj = new Asset_Processor_mst();

            obj.Assetid = (int)returnData["assetid"];
            obj.Assetprocessorid = (int)returnData["assetprocessorid"];
            DateTime inventorydatetime = new DateTime();
            inventorydatetime = (DateTime)returnData["inventorydate"];
            obj.Inventory_date = inventorydatetime.ToString();
            obj.Family = (string)returnData["family"];
            obj.Manufacturer = (string)returnData["manufacturer"];
            obj.Max_speed = (string)returnData["max_speed"];
            obj.Model = (string)returnData["model"];
            obj.Processor_name = (string)returnData["processor_name"];
            obj.Speed = (string)returnData["speed"];
            obj.Stepping = (string)returnData["stepping"];
            col.Add(obj);
        }
        returnData.Close();
        returnData.Dispose();
        return col;
    }