當前位置: 首頁>>代碼示例>>C#>>正文


C# Addr_OrganizeCityBLL.GetAllSuperNodeIDs方法代碼示例

本文整理匯總了C#中Addr_OrganizeCityBLL.GetAllSuperNodeIDs方法的典型用法代碼示例。如果您正苦於以下問題:C# Addr_OrganizeCityBLL.GetAllSuperNodeIDs方法的具體用法?C# Addr_OrganizeCityBLL.GetAllSuperNodeIDs怎麽用?C# Addr_OrganizeCityBLL.GetAllSuperNodeIDs使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Addr_OrganizeCityBLL的用法示例。


在下文中一共展示了Addr_OrganizeCityBLL.GetAllSuperNodeIDs方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: bt_Add_Click

    protected void bt_Add_Click(object sender, EventArgs e)
    {
        if ((int)ViewState["PriceID"] > 0)
        {
            if (tr_OrganizeCity.SelectValue != "0" && tr_OrganizeCity.SelectValue != tr_OrganizeCity.RootValue)
            {
                PDT_StandardPriceBLL bll = new PDT_StandardPriceBLL((int)ViewState["PriceID"]);

                Addr_OrganizeCityBLL selectedcity = new Addr_OrganizeCityBLL(int.Parse(tr_OrganizeCity.SelectValue));
                string[] allparent = selectedcity.GetAllSuperNodeIDs().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);

                foreach (PDT_StandardPrice_ApplyCity city in bll.ApplyCityItems)
                {
                    if (selectedcity.Model.ID == city.OrganizeCity)
                    {
                        MessageBox.Show(this, "對不起,該區域已在適用區域內,請勿重複添加!");
                        return;
                    }

                    if (allparent.Contains(city.OrganizeCity.ToString()))
                    {
                        MessageBox.Show(this, "對不起,要新增的區域的上級【" + TreeTableBLL.GetFullPathName("MCS_SYS.dbo.Addr_OrganizeCity", city.OrganizeCity) + "】已在適用區域內!");
                        return;
                    }
                }

                PDT_StandardPrice_ApplyCity c = new PDT_StandardPrice_ApplyCity();
                c.OrganizeCity = int.Parse(tr_OrganizeCity.SelectValue);
                bll.AddApplyCity(c);

                BindCheckBoxList();
            }
        }
    }
開發者ID:fuhongliang,項目名稱:GraduateProject,代碼行數:34,代碼來源:PDT_StandardPrice_ApplyCity.aspx.cs

示例2: bt_Add_Click

    protected void bt_Add_Click(object sender, EventArgs e)
    {
        if ((int)ViewState["Insurance"] > 0)
        {
            if (tr_OrganizeCity.SelectValue != "0" && tr_OrganizeCity.SelectValue != tr_OrganizeCity.RootValue)
            {
                PM_StdInsuranceCostBLL bll = new PM_StdInsuranceCostBLL((int)ViewState["Insurance"]);

                Addr_OrganizeCityBLL selectedcity = new Addr_OrganizeCityBLL(int.Parse(tr_OrganizeCity.SelectValue));
                string[] allparent = selectedcity.GetAllSuperNodeIDs().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                IList<PM_StdInsuranceCostInCity> pms = PM_StdInsuranceCostInCityBLL.GetModelList("Insurance=" + (int)ViewState["Insurance"]);
                foreach (PM_StdInsuranceCostInCity p in pms)
                {
                    if (selectedcity.Model.ID == p.City)
                    {
                        MessageBox.Show(this, "對不起,該區域已在適用區域內,請勿重複添加!");
                        return;
                    }

                    if (allparent.Contains(p.City.ToString()))
                    {
                        MessageBox.Show(this, "對不起,要新增的區域的上級【" + TreeTableBLL.GetFullPathName("MCS_SYS.dbo.Addr_OrganizeCity", p.City) + "】已在適用區域內!");
                        return;
                    }
                }

                PM_StdInsuranceCostInCityBLL c = new PM_StdInsuranceCostInCityBLL();
                c.Model.City = int.Parse(tr_OrganizeCity.SelectValue);
                c.Model.Insurance = bll.Model.ID;
                c.Model.InsertStaff = (int)Session["UserID"];
                c.Model.InsertTime = DateTime.Now;
                c.Add();

                BindCheckBoxList();
            }
        }
    }
開發者ID:fuhongliang,項目名稱:GraduateProject,代碼行數:37,代碼來源:PM_StdInsuranceCostInCity.aspx.cs

示例3: select_Client_SelectChange

 protected void select_Client_SelectChange(object sender, MCSControls.MCSWebControls.SelectChangeEventArgs e)
 {
     tr_OrganizeCity.SelectValue = new CM_ClientBLL(int.Parse(select_Client.SelectValue)).Model.OrganizeCity.ToString();
     Addr_OrganizeCityBLL orgcity = new Addr_OrganizeCityBLL(int.Parse(tr_OrganizeCity.SelectValue));
     ddl_StandardPrice.DataSource = PDT_StandardPriceBLL.GetModelList("ActiveFlag=1 AND ApproveFlag=1 AND ID IN (SELECT StandardPrice FROM PDT_StandardPrice_ApplyCity WHERE OrganizeCity IN (" + orgcity.GetAllSuperNodeIDs() + "," + tr_OrganizeCity.SelectValue + ")) ");
     ddl_StandardPrice.DataBind();
     ddl_StandardPrice.Items.Insert(0, new ListItem("請選擇....", "0"));
     ddl_StandardPrice.SelectedValue = "0";
 }
開發者ID:fuhongliang,項目名稱:GraduateProject,代碼行數:9,代碼來源:PDT_ProductPrice.aspx.cs


注:本文中的Addr_OrganizeCityBLL.GetAllSuperNodeIDs方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。