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


C# BLLCollection.Add方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: GenerateUserToSiteMapping_mstCollection

    public CollectionBase GenerateUserToSiteMapping_mstCollection(ref IDataReader returnData)
    {
        BLLCollection<UserToSiteMapping> col = new BLLCollection<UserToSiteMapping>();
        while (returnData.Read())
        {

            UserToSiteMapping obj = new UserToSiteMapping();
            obj.Userid = (int)returnData["Userid"];
            obj.Siteid = (int)returnData["Siteid"];
            col.Add(obj);
        }
        returnData.Close();
        returnData.Dispose();
        return col;
    }
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_EIHAutoMail,代码行数:15,代码来源:SqlDataProvider.cs

示例7: GenerateOrganization_mstCollection

    public CollectionBase GenerateOrganization_mstCollection(ref IDataReader returnData)
    {
        BLLCollection<Organization_mst> col = new BLLCollection<Organization_mst>();
        while (returnData.Read())
        {
            DateTime Mydatetime = new DateTime();

            Organization_mst obj = new Organization_mst();
            obj.Orgid = (int)returnData["Orgid"];
            obj.Orgname = (string)returnData["Orgname"];
            obj.Description = (string)returnData["Description"];
            Mydatetime = (DateTime)returnData["Createdatetime"];
            obj.Createdatetime = Mydatetime.ToString();
            col.Add(obj);
        }
        returnData.Close();
        returnData.Dispose();
        return col;
    }
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_EIHAutoMail,代码行数:19,代码来源:SqlDataProvider.cs

示例8: BindGrid

    public void BindGrid()
    {
        int custid;
        custid = Convert.ToInt16(drpRegion.SelectedValue);
        colservicewindow = objservicewindow.Get_All();
        BLLCollection<ServiceWindow_mst> colservicewindow1 = new BLLCollection<ServiceWindow_mst>();
        foreach (ServiceWindow_mst obj in colservicewindow)
        {
            int flag;
            flag = objCustToSite.Get_By_Id(custid, obj.Siteid);
            if (flag == 1)
            {
                colservicewindow1.Add(obj);

            }

        }

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

示例9: BindGridRegion

    public void BindGridRegion()
    {
        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
        col = objSite.Get_All();

        // Bind GridView by using Datasource and Databind Properties

        BLLCollection<Site_mst> col1 = new BLLCollection<Site_mst>();
        foreach (Site_mst obj in col)
        {
            int flag;
            flag = objCustToSite.Get_By_Id(custid, obj.Siteid);
            if (flag == 1)
            {
                col1.Add(obj);

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

示例10: GenerateSubcategory_mstCollection

    public CollectionBase GenerateSubcategory_mstCollection(ref IDataReader returnData)
    {
        BLLCollection<Subcategory_mst> col = new BLLCollection<Subcategory_mst>();
        while (returnData.Read())
        {

            Subcategory_mst obj = new Subcategory_mst();
            obj.Subcategoryid = (int)returnData["subcategoryid"];
            obj.Subcategoryname = (string)returnData["subcategoryname"];
            obj.Subcategorydescription = (string)returnData["subcategorydescription"];
            obj.Categoryid = (int)returnData["categoryid"];

            col.Add(obj);
        }
        returnData.Close();
        returnData.Dispose();
        return col;
    }
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_EIH,代码行数:18,代码来源:SqlDataProvider.cs

示例11: 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

示例12: Showchangeinfo

    protected void Showchangeinfo()
    {
        Approvalpanal.Visible = true;
        btnApprove.Visible = true;
        btnReject.Visible = true;
        Alreadyapprovedpanal.Visible = false;
        NameValueCollection n = Request.QueryString;

        int changeid = Convert.ToInt16(Request.QueryString[0]);
        //lblchangeid.Text = changeid.ToString();
        ObjChange = ObjChange.Get_By_id(changeid);
        lblchangeid.Text = ObjChange.Changeid.ToString();
        lbltitle.Text = ObjChange.Title;
        lbldescription.Text = ObjChange.Description;
        //lblDateDisp.Text = ObjChange.Createdtime.ToString();
        int requesterid = Convert.ToInt16(ObjChange.Requestedby);

        //lblTitle.Text = ObjChange.Title.ToString();

        //lblDescription.Text = ObjChange.Description.ToString();

        lblserviceeffected.Text = "Email";
        int chantypeid = Convert.ToInt16(ObjChange.Changetype);
        ObjChangeType = ObjChangeType.Get_By_id(chantypeid);
        if (chantypeid != 0)
        {
            lblchangetype.Text = ObjChangeType.Changetypename.ToString();
        }
        int changestatus = Convert.ToInt16(ObjChange.Statusid);
        Objchangestatus = Objchangestatus.Get_By_id(changestatus);
        if (changestatus != 0)
        {
            lblStatus.Text = Objchangestatus.Statusname;
        }
        int priorityid = Convert.ToInt16(ObjChange.Priority);
        ObjPriority = ObjPriority.Get_By_id(priorityid);
        if (priorityid != 0)
        {
            lblpriority.Text = ObjPriority.Name.ToString();

        }
        else
        {
            lblpriority.Text = "";

        }

        int category = Convert.ToInt16(ObjChange.Categoryid);
        ObjCategory = ObjCategory.Get_By_id(category);
        if (category != 0)
        {
            lblcategory.Text = ObjCategory.CategoryName.ToString();

        }
        else
        {
            lblcategory.Text = "";

        }

        int subcategory = Convert.ToInt16(ObjChange.Subcategoryid);
        Objsubcategory = Objsubcategory.Get_By_id(subcategory);
        if (subcategory != 0)
        {
            lblsubcategory.Text = Objsubcategory.Subcategoryname.ToString();

        }
        else
        {
            lblsubcategory.Text = "";

        }

        int creator = Convert.ToInt16(ObjChange.CreatedByID);
        ObjUser = ObjUser.Get_By_id(creator);
        lblCreatedby.Text = ObjUser.Username.ToString();
        lblCreatedDate.Text = ObjChange.Createdtime.ToString();
        int techid = Convert.ToInt16(ObjChange.Technician);
        ObjUser = ObjUser.Get_By_id(techid);

        if (techid != 0)
        {
            lbltechid.Text = ObjUser.Username.ToString();

        }
        else
        {
            lbltechid.Text = "";

        }
        colassetincludeinchange = objincludeasset.Get_All_IncludeAssetinchange(changeid);
        BLLCollection<Configuration_mst> colasset = new BLLCollection<Configuration_mst>();
        Configuration_mst ObjAsset = new Configuration_mst();

        foreach (IncludedAssetinchange obj in colassetincludeinchange)
        {
            ObjAsset = ObjAsset.Get_By_id(obj.Assetid);
            colasset.Add(ObjAsset);

        }
//.........这里部分代码省略.........
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_TerexBest,代码行数:101,代码来源:ApproveorRejectChangeRequest.aspx.cs

示例13: BindDropCustomer

    public void BindDropCustomer()
    {
        //colCust = objCustomer.Get_All();
        //drpCustomer.DataTextField = "Customer_Name";
        //drpCustomer.DataValueField = "CustId";
        //drpCustomer.DataSource = colCust;
        //drpCustomer.DataBind();
        //ListItem item = new ListItem();
        //item.Text = "------------Select-------------";
        //item.Value = "0";
        //drpCustomer.Items.Add(item);
        //drpCustomer.SelectedValue = "0";
        BLLCollection<Customer_mst> colCtS = new BLLCollection<Customer_mst>();
        string userName = "";
        MembershipUser User = Membership.GetUser();
        if (User != null)
        {
            userName = User.UserName.ToString();
        }
        if (userName != "")
        {
            int userid;
            int Flagcount = 0;
            objOrganization = objOrganization.Get_Organization();
            objUser = objUser.Get_UserLogin_By_UserName(userName, objOrganization.Orgid);
            if (objUser.Userid != 0)
            {
                userid = objUser.Userid;
                colUserToSite = ObjUserToSite.Get_All_By_userid(userid);
                foreach (UserToSiteMapping obj in colUserToSite)
                {
                    int siteid;
                    Site_mst objSite1 = new Site_mst();
                    siteid = obj.Siteid;
                    objSite1 = objSite1.Get_By_id(siteid);
                    if (objSite1.Siteid != 0)
                    {
                        colCustToSite = objCustToSite.Get_All_By_siteid(objSite1.Siteid);
                        foreach (CustomerToSiteMapping objcts in colCustToSite)
                        {
                            Customer_mst objC = new Customer_mst();
                            int FlagStatus = 0;
                            objC = objC.Get_By_id(objcts.Custid);
                            if (Flagcount == 0)
                            {
                                colCtS.Add(objC);
                            }
                            else
                            {
                                foreach (Customer_mst objCus in colCtS)
                                {
                                    if (objC.Custid == objCus.Custid)
                                    {
                                        FlagStatus = 1;
                                    }

                                }
                                if (FlagStatus == 0)
                                {
                                    colCtS.Add(objC);
                                }
                            }
                            Flagcount = Flagcount + 1;
                        }
                    }
                }
            }
        }
        drpCustomer.DataTextField = "Customer_Name";
        drpCustomer.DataValueField = "CustId";
        drpCustomer.DataSource = colCtS;
        drpCustomer.DataBind();
        if (colCtS.Count == 0)
        {
            ListItem item = new ListItem();
            item.Text = "-------------Select-------------";
            item.Value = "0";
            drpCustomer.Items.Add(item);
        }
    }
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_TerexBest,代码行数:80,代码来源:IncidentRequest.aspx.cs

示例14: Generateuseremail_mstCollection

    public CollectionBase Generateuseremail_mstCollection(ref IDataReader returnData)
    {
        BLLCollection<UserEmail> col = new BLLCollection<UserEmail>();
        while (returnData.Read())
        {

            UserEmail obj = new UserEmail();
            obj.Userid = (int)returnData["userid"];
            obj.Emailid = (string)returnData["emailid"];

            col.Add(obj);
        }
        returnData.Close();
        returnData.Dispose();
        return col;
    }
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_EIH,代码行数:16,代码来源:SqlDataProvider.cs

示例15: BindListBox

    protected void BindListBox()
    {
        //drpCategory.SelectedValue=Session["Category"].ToString();
        /// BindDropSubCategory();

        Configuration_mst ObjAsset = new Configuration_mst();
        BLLCollection<Configuration_mst> col = new BLLCollection<Configuration_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] != "")
            {
                Configuration_mst obj = new Configuration_mst();
                //obj = ObjAsset.Get_By_id(Convert.ToInt32(arrAsset[i].ToString()));
                obj = ObjAsset.Get_By_id(Convert.ToInt32(arrAsset[i].ToString()));
                col.Add(obj);
            }

        }
        ListAsset.DataTextField = "Serialno";
        ListAsset.DataValueField = "assetid";
        ListAsset.DataSource = col;
        ListAsset.DataBind();
        for (int i = ListAsset.Items.Count - 1; i >= 0; i--)
        {
            ListAsset.Items[i].Selected = true;

        }
        Session["AssetContract"] = "";
        //drpSubcategory.SelectedValue = Session["Subcategory"].ToString();
        //drpchangetype.SelectedValue = Session["ChangeType"].ToString();
        //drpStatus.SelectedValue = Session["Status"].ToString();
    }
开发者ID:progressiveinfotech,项目名称:PRO_FY13_40_Helpdesk-Support-and-Customization_EIH,代码行数:35,代码来源:CreateChangefromIncident.aspx.cs


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