本文整理汇总了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;
}
}
}
示例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
}
}