当前位置: 首页>>代码示例>>C#>>正文


C# BLLCollection类代码示例

本文整理汇总了C#中BLLCollection的典型用法代码示例。如果您正苦于以下问题:C# BLLCollection类的具体用法?C# BLLCollection怎么用?C# BLLCollection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


BLLCollection类属于命名空间,在下文中一共展示了BLLCollection类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BindDrpsite

    public void BindDrpsite()
    {
        BLLCollection<Site_mst> col = new BLLCollection<Site_mst>();
        BLLCollection<Site_mst> colSite1 = new BLLCollection<Site_mst>();
        int custid = Convert.ToInt16(drpCustomer.SelectedValue);
        col = ObjSite.Get_All();
        foreach (Site_mst obj in col)
        {
            int flag;
            flag = objCustToSite.Get_By_Id(custid, obj.Siteid);
            if (flag == 1)
            {
                colSite1.Add(obj);

            }
        }
        drpsite.DataTextField = "SiteName";
        drpsite.DataValueField = "Siteid";
        drpsite.DataSource = colSite1;
        drpsite.DataBind();
        ListItem item = new ListItem();
        item.Text = "--------------Select---------------";
        item.Value = "0";
        drpsite.Items.Add(item);
        drpsite.SelectedValue = "0";
        lblerrmsg.Text = "";
    }
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_TerexBest,代码行数:27,代码来源:AddHoliday.aspx.cs

示例2: BindGrid

    protected void BindGrid()
    {
        int TotalSpentTimeInMins = 0;
        int filterid = Convert.ToInt16(drpFilter.SelectedValue);
        BLLCollection<Contract_mst> col = new BLLCollection<Contract_mst>();
        colContract = objContract.Get_All();
        foreach (Contract_mst obj in colContract)
        {
            Contract_mst objCon = new Contract_mst();
            objCon = obj.Get_By_id(obj.Contractid);
            if (filterid == 1)
            {
                TotalSpentTimeInMins = obj.Get_Contract_Status(objCon.Activeto);
                if (TotalSpentTimeInMins>0)
                 {
                     col.Add(objCon);
                 }

            }
            if (filterid == 2)
            {
                TotalSpentTimeInMins = obj.Get_Contract_Status(objCon.Activeto);
                if (TotalSpentTimeInMins <= 0)
                {
                    col.Add(objCon);
                }

            }
            if (filterid == 3)
            {
                TotalSpentTimeInMins = obj.Get_Contract_Status(objCon.Activeto);
                if (TotalSpentTimeInMins <= 0 && TotalSpentTimeInMins > (-10080))
                {
                    col.Add(objCon);
                }

            }
            if (filterid == 4)
            {
                TotalSpentTimeInMins = obj.Get_Contract_Status(objCon.Activeto);
                if (TotalSpentTimeInMins >0 && TotalSpentTimeInMins < 10080)
                {
                    col.Add(objCon);
                }

            }
            if (filterid == 5)
            {
                TotalSpentTimeInMins = obj.Get_Contract_Status(objCon.Activeto);
                if (TotalSpentTimeInMins > 0 && TotalSpentTimeInMins < 21600)
                {
                    col.Add(objCon);
                }

            }

        }
        grvwContract.DataSource = col;
        grvwContract.DataBind();
    }
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_TerexBest,代码行数:60,代码来源:DisplayAllContract.aspx.cs

示例3: BindListBox

    protected void BindListBox()
    {
        txtContractName.Text = Session["contractname"].ToString();
        txtdesc.Text = Session["description"].ToString();
        drpVendor.SelectedValue = Session["vendorid"].ToString();
        Asset_mst ObjAsset = new Asset_mst();
        BLLCollection<Asset_mst> col = new BLLCollection<Asset_mst>();
        string varAsset = Session["AssetContract"].ToString();
        string[] arrAsset = varAsset.Split(',');
        int FlagCount = arrAsset.Length;
        for (int i = 0; i < FlagCount; i++)
        {
            if (arrAsset[i] != "," && arrAsset[i]!="")
            {
                Asset_mst obj = new Asset_mst();
                obj = ObjAsset.Get_By_id(Convert.ToInt16(arrAsset[i].ToString()));
                col.Add(obj);
            }

        }
        ListAsset.DataTextField = "computerName";
        ListAsset.DataValueField = "assetid";
        ListAsset.DataSource = col;
        ListAsset.DataBind();
        Session["AssetContract"] = "";
    }
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_TerexBest,代码行数:26,代码来源:AddContract.aspx.cs

示例4: BindGrid

 public void BindGrid()
 {
     BLLCollection<Cab_mst> col = new BLLCollection<Cab_mst>();
     col = ObjCab.Get_All();
     Cabgrdvw.DataSource = col;
     Cabgrdvw.DataBind();
 }
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_TerexBest,代码行数:7,代码来源:AddCabMembers.aspx.cs

示例5: BindDrpDepartment

    public void BindDrpDepartment()
    {
        BLLCollection<Department_mst> col = new BLLCollection<Department_mst>();
        Department_mst Objdepartment = new Department_mst();
        int Selectedsiteval = Convert.ToInt16(DrpSite.SelectedValue);
        if (Selectedsiteval==0)
        {
            DrpDepartment.DataSource = col;
            DrpDepartment.DataBind();
            ListItem item = new ListItem();
            item.Text = "--------------Select---------------";
            item.Value = "0";
            DrpDepartment.Items.Add(item);
            DrpDepartment.SelectedValue = "0";
         }
          else
         {
             col = Objdepartment.Get_All_By_SiteId(Selectedsiteval);

             DrpDepartment.DataTextField = "departmentName";
             DrpDepartment.DataValueField = "deptid";
             DrpDepartment.DataSource = col;
             DrpDepartment.DataBind();
             ListItem item = new ListItem();
             item.Text = Resources.MessageResource.errSelectDept.ToString();
             item.Value = "0";
             DrpDepartment.Items.Add(item);
             DrpDepartment.SelectedValue = "0";
        }
    }
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_TerexBest,代码行数:30,代码来源:AddUser.aspx.cs

示例6: BindDrpsite

    public void BindDrpsite()
    {
        BLLCollection<Site_mst> col = new BLLCollection<Site_mst>();
        BLLCollection<Site_mst> colSite1 = new BLLCollection<Site_mst>();
        int custid = Convert.ToInt16(drpCustomer.SelectedValue);
        Site_mst ObjSite = new Site_mst();
        col = ObjSite.Get_All();
        foreach (Site_mst obj in col)
        {
            int flag;
            flag = objCustToSite.Get_By_Id(custid, obj.Siteid);
            if (flag == 1)
            {
                colSite1.Add(obj);

            }
        }
        DrpSite.DataTextField = "sitename";
        DrpSite.DataValueField = "siteid";
        DrpSite.DataSource = colSite1;
        DrpSite.DataBind();
        ListItem item = new ListItem();
        item.Text = Resources.MessageResource.errselectste.ToString();
        item.Value = "0";
        DrpSite.Items.Add(item);
        ///DrpSite.SelectedValue = "0";
    }
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_TerexBest,代码行数:27,代码来源:EditUser.aspx.cs

示例7: BindGrid

 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();
 }
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_TerexBest,代码行数:34,代码来源:GeneralReportAll.aspx.cs

示例8: BindDrpSite

    public void BindDrpSite()
    {
        // Declare col as Collection of Site_mst Object to get all records from table
        BLLCollection<Site_mst> col = new BLLCollection<Site_mst>();
        BLLCollection<Site_mst> colSite1 = new BLLCollection<Site_mst>();
        int custid = Convert.ToInt32(drpCustomer.SelectedValue);
        // declare object objOrganization of Site_mst_mst Class to call function Get_All() to fetch all records from database

        // Assign all records to variable col
        col = objSite.Get_All();
        foreach (Site_mst obj in col)
        {
            int flag;
            flag = objCustToSite.Get_By_Id(custid, obj.Siteid);
            if (flag == 1)
            {
                colSite1.Add(obj);

            }
        }
        drpSite.DataTextField = "SiteName";
        drpSite.DataValueField = "siteid";

        drpSite.DataSource = colSite1;
        drpSite.DataBind();
        // Declare item as listItem to assign default value to drop down
        ListItem item = new ListItem();
        item.Text = "--------------Select--------------";
        item.Value = "0";

        drpSite.Items.Add(item);
        drpSite.SelectedValue = "0";
    }
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_EIH,代码行数:33,代码来源:AddDepartment.aspx.cs

示例9: BindDropDownSiteRegionWise

    protected void BindDropDownSiteRegionWise()
    {
        BLLCollection<Site_mst> colSite1 = new BLLCollection<Site_mst>();

        int custid = Convert.ToInt32(drpRegion.SelectedValue);
        colSite = objSite.Get_All();
        foreach (Site_mst obj in colSite)
        {
            int flag;
            flag = objCustToSite.Get_By_Id(custid, obj.Siteid);
            if (flag == 1)
            {
                colSite1.Add(obj);

            }
        }
        drpSites.DataTextField = "sitename";
        drpSites.DataValueField = "siteid";
        drpSites.DataSource = colSite1;
        drpSites.DataBind();
        ListItem item = new ListItem();
        item.Text = "-------------Select---------------";
        item.Value = "0";
        drpSites.Items.Add(item);
        drpSites.SelectedValue = "0";
    }
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_EIH,代码行数:26,代码来源:ViewSLA.aspx.cs

示例10: BindDropDownSiteRegionWise

    protected void BindDropDownSiteRegionWise()
    {
        BLLCollection<Site_mst> colSite1 = new BLLCollection<Site_mst>();
        int custid = Convert.ToInt16(drpRegion.SelectedValue);
        // Declare collection col as Site_mst to get all Sites from database

        // By Calling Function objSite.Get_All() assign to col object
        colSite = objSite.Get_All();
        foreach (Site_mst obj in colSite)
        {
            int flag;
            flag = objCustToSite.Get_By_Id(custid, obj.Siteid);
            if (flag == 1)
            {
                colSite1.Add(obj);

            }
        }
        drpSites.DataTextField = "sitename";
        drpSites.DataValueField = "siteid";
        drpSites.DataSource = colSite1;
        drpSites.DataBind();
        ListItem item = new ListItem();
        item.Text = "------------Select-------------";
        item.Value = "0";
        drpSites.Items.Add(item);
        drpSites.SelectedValue = "0";
    }
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_TerexBest,代码行数:28,代码来源:AddSlaDefinition.aspx.cs

示例11: BindGrid

 public void BindGrid()
 {
     BLLCollection<Customer_mst> col = new BLLCollection<Customer_mst>();
     col = ObjCustomer.Get_All();
     Customergrdvw.DataSource = col;
     Customergrdvw.DataBind();
     clear();
 }
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_TerexBest,代码行数:8,代码来源:AddCustomer.aspx.cs

示例12: BindSite

    protected void BindSite()
    {
        colSite = objSite.Get_All();
        for (int i = 0; i < colSite.Count; i++)
        {
            for (int j = i; j < colSite.Count; j++)
            {

                if (String.Compare(colSite[i].Sitename, colSite[j].Sitename) > 0)
                {
                    Site_mst obj = new Site_mst();
                    obj = colSite[i];
                    colSite[i] = colSite[j];
                    colSite[j] = obj;

                }
            }

        }
        drpsite.DataTextField = "sitename";
        drpsite.DataValueField = "siteid";
        drpsite.DataSource = colSite;
        drpsite.DataBind();
        ListItem item = new ListItem();
        item.Text = "All";
        item.Value = "0";
        drpsite.Items.Add(item);
        //item.Text = "---Select Site---";
        //item.Value = "0";
        //drpsite.Items.Add(item);
        drpsite.SelectedValue = "0";
    }
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_EIH,代码行数:32,代码来源:PendingCallReport.aspx.cs

示例13: btnsearch_Click

    protected void btnsearch_Click(object sender, EventArgs e)
    {
        //Add Exception handilng try catch change by vishal 21-05-2012
        try
        {
            string name;

            if (txtname.Text == "")
            {
                col = ObjAsset.Get_By_comandname("");
                grdvwViewAsset.DataSource = col;
                grdvwViewAsset.DataBind();
                ViewState["commandname"] = "";
            }
            else
            {
                name = txtname.Text.ToString();
                col = ObjAsset.Get_By_comandname(name);
                grdvwViewAsset.DataSource = col;
                grdvwViewAsset.DataBind();
                ViewState["commandname"] = name;
            }
        }
        catch (Exception ex)
        {
            string myScript;
            myScript = "<script language=javascript>alert('Exception - '" + ex + "');</script>";
            Page.RegisterClientScriptBlock("MyScript", myScript);
            return;
        }
    }
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_EIH,代码行数:31,代码来源:ViewAsset.aspx.cs

示例14: grdvwUser_RowCommand

    protected void grdvwUser_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName.Equals("AlphaPaging"))
        {
            string commandname = e.CommandArgument.ToString();
            ViewState["commandname"] = e.CommandArgument.ToString();
            col = ObjUserlogin.Get_By_comandname(commandname);
            if (col.Count!=0)
            {
                grdvwUser.DataSource = col;
                grdvwUser.DataBind();
            }
            else
            {
                DataTable dt = new DataTable();
                dt.Columns.Add("userid");
                dt.Columns.Add("username");
                dt.Columns.Add("Enable");
                dt.Columns.Add("createdatetime");

                DataRow dr = dt.NewRow();
                dt.Rows.Add(dr);

                grdvwUser.DataSource = dt;
                grdvwUser.DataBind();

               grdvwUser.Rows[0].Cells[4].Visible = false;
               grdvwUser.Rows[0].Cells[5].Visible = false;

            }

        }
    }
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_TerexBest,代码行数:33,代码来源:ViewUser.aspx.cs

示例15: BindDropRegion

    // Definition BindDropRegion() Function , To Bind Drop Down drpRegion
    public void BindDropRegion()
    {
        // Bind Drop Down Region,By Calling Function Get_All() via objRegion Object and assign to collection colRegion
        //colRegion = objRegion.Get_All();
        //drpRegion.DataTextField = "regionname";
        //drpRegion.DataValueField = "regionid";
        //drpRegion.DataSource = colRegion;
        //drpRegion.DataBind();
        //// Declare List Item item and add text ALL and value 0 to it and add to drpRegion Drop Down
        //ListItem item = new ListItem();
        //item.Text = "All";
        //item.Value = "0";
        //drpRegion.Items.Add(item);
        //drpRegion.SelectedValue = "0";

        colCustomer = objCustomer.Get_All();
        drpRegion.DataTextField = "Customer_Name";
        drpRegion.DataValueField = "custid";
        drpRegion.DataSource = colCustomer;
        drpRegion.DataBind();
        ListItem item = new ListItem();
        item.Text = "------------Select------------";
        item.Value = "0";
        drpRegion.Items.Add(item);
        drpRegion.SelectedValue = "0";
    }
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_TerexBest,代码行数:27,代码来源:UserToSiteMapping.aspx.cs


注:本文中的BLLCollection类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。