protected void BindervicePCategory()
{
List<ServiceItemCategoryEntity> list = ServiceItemDataAccess.GeterviceItemPCategory();
if (list.Count > 0)
{
this.ddlServiceCategory.DataTextField = "CategoryName";
this.ddlServiceCategory.DataValueField = "ProCategoryID";
this.ddlServiceCategory.DataSource = list;
this.ddlServiceCategory.DataBind();
this.ddlServiceCategory.Items.Insert(0, "请选择");
this.ddlServiceCategory.SelectedValue = "0";
}
}
protected void BinderviceCategory()
{
string ParentID = this.ddlServiceCategory.SelectedValue;
if (!string.IsNullOrEmpty(ParentID))
{
int intId = -1;
if (Int32.TryParse(ParentID, out intId))
{
if (intId != 0)
{
List<ServiceItemEntity> list = ServiceItemDataAccess.GetServiceCategoryName(intId);
if (list.Count > 0)
{
this.ddlServiceType.DataTextField = "CategoryName";
this.ddlServiceType.DataValueField = "ProCategoryID";
this.ddlServiceType.DataSource = list;
this.ddlServiceType.DataBind();
this.ddlServiceType.Items.Insert(0, "请选择");
}
else
{
this.ddlServiceType.DataSource = list;
this.ddlServiceType.DataBind();
this.ddlServiceType.Items.Insert(0, "该分类下暂时没有服务类型");
}
}
}
}
else
{
this.ddlServiceType.Items.Insert(0, "请选择");
}
}
{
List<ServiceItemCategoryEntity> list = ServiceItemDataAccess.GeterviceItemPCategory();
if (list.Count > 0)
{
this.ddlServiceCategory.DataTextField = "CategoryName";
this.ddlServiceCategory.DataValueField = "ProCategoryID";
this.ddlServiceCategory.DataSource = list;
this.ddlServiceCategory.DataBind();
this.ddlServiceCategory.Items.Insert(0, "请选择");
this.ddlServiceCategory.SelectedValue = "0";
}
}
protected void BinderviceCategory()
{
string ParentID = this.ddlServiceCategory.SelectedValue;
if (!string.IsNullOrEmpty(ParentID))
{
int intId = -1;
if (Int32.TryParse(ParentID, out intId))
{
if (intId != 0)
{
List<ServiceItemEntity> list = ServiceItemDataAccess.GetServiceCategoryName(intId);
if (list.Count > 0)
{
this.ddlServiceType.DataTextField = "CategoryName";
this.ddlServiceType.DataValueField = "ProCategoryID";
this.ddlServiceType.DataSource = list;
this.ddlServiceType.DataBind();
this.ddlServiceType.Items.Insert(0, "请选择");
}
else
{
this.ddlServiceType.DataSource = list;
this.ddlServiceType.DataBind();
this.ddlServiceType.Items.Insert(0, "该分类下暂时没有服务类型");
}
}
}
}
else
{
this.ddlServiceType.Items.Insert(0, "请选择");
}
}