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


C# CM_ClientBLL.ClientInOrganizeCity_GetOrganizeCitys方法代码示例

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


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

示例1: bt_Add_PropertyInOrganizeCity_Click

 protected void bt_Add_PropertyInOrganizeCity_Click(object sender, EventArgs e)
 {
     if (ddl_PropertyInOrganizeCity.SelectedValue != "0" && (int)ViewState["ClientID"] != 0)
     {
         CM_ClientBLL bll = new CM_ClientBLL((int)ViewState["ClientID"]);
         if (bll.ClientInOrganizeCity_GetOrganizeCitys().FirstOrDefault(p => p.ID == int.Parse(ddl_PropertyInOrganizeCity.SelectedValue)) == null)
         {
             bll.ClientInOrganizeCity_Add(int.Parse(ddl_PropertyInOrganizeCity.SelectedValue));
             BindGrid();
         }
         else
         {
             MessageBox.Show(this, "请勿重复添加该区域!");
             return;
         }
     }
 }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:17,代码来源:PropertyDetail.aspx.cs

示例2: BindGrid

    private void BindGrid()
    {
        if (ViewState["ClientID"] != null)
        {
            CM_ClientBLL bll = new CM_ClientBLL((int)ViewState["ClientID"]);

            #region 绑定住宿人员
            gv_Staff.ConditionString = "MCS_CM.dbo.CM_StaffInProperty.Client = " + ViewState["ClientID"].ToString() + " AND Org_Staff.Dimission=1";
            gv_Staff.BindGrid();
            #endregion

            #region 绑定兼管片区
            if (bll.Model.OrganizeCity > 1)
            {
                ddl_PropertyInOrganizeCity.Items.Clear();

                int superid = new Addr_OrganizeCityBLL(bll.Model.OrganizeCity).Model.SuperID;
                IList<Addr_OrganizeCity> lists = Addr_OrganizeCityBLL.GetModelList("SuperID = " + superid.ToString() +
                    " AND ID <> " + bll.Model.OrganizeCity.ToString() +
                    " AND ID NOT IN (SELECT OrganizeCity FROM MCS_CM.dbo.CM_PropertyInOrganizeCity WHERE Client=" + bll.Model.ID.ToString() + ")");
                if (lists.Count > 0)
                {
                    foreach (Addr_OrganizeCity city in lists)
                    {
                        ddl_PropertyInOrganizeCity.Items.Add(new ListItem("(" + city.Code + ")" + city.Name, city.ID.ToString()));
                    }
                }

                ddl_PropertyInOrganizeCity.Items.Insert(0, new ListItem("请选择...", "0"));

                gv_PropertyInOrganizeCity.BindGrid<Addr_OrganizeCity>(bll.ClientInOrganizeCity_GetOrganizeCitys());
            }
            else
            {
                tr_PropertyInOrganizeCity.Visible = false;
            }
            #endregion

            #region 绑定电话列表
            gv_Telephone.ConditionString = "Client=" + bll.Model.ID.ToString();
            gv_Telephone.BindGrid();
            #endregion

            #region 绑定合同列表
            gv_List_Contract.BindGrid(CM_ContractBLL.GetModelList("Client=" + bll.Model.ID.ToString()));
            #endregion

        }
    }
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:49,代码来源:PropertyDetail.aspx.cs


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