Beispiel #1
0
        /// <summary>
        /// 判断是否存在该编号
        /// </summary>
        /// <param name="num"></param>
        /// <returns></returns>
        private bool ExitsNum(string num)
        {
            TargetPropertyManager targetBLL = new TargetPropertyManager();

            string where = string.Format("PropertyNO = '{0}'", num);
            DataTable dt = targetBLL.GetList(where);

            return(dt.Rows.Count > 0 ? true : false);
        }
Beispiel #2
0
        /// <summary>
        /// 绑定标的属性列表(repeater控件)
        /// </summary>
        private void RpPropertyBindData(int targetTypeId)
        {
            TargetPropertyManager tpManager = new TargetPropertyManager();

            string where = string.Format("TargetTypeId = {0} and IsRequired='true'", targetTypeId);

            rpTargetProperty.DataSource = tpManager.GetList(where);
            rpTargetProperty.DataBind();
        }
Beispiel #3
0
        protected void BtnDelType_Click(object sender, ImageClickEventArgs e)
        {
            TargetTypeManager     typeBLL = new TargetTypeManager();
            TargetPropertyManager tpBLL   = new TargetPropertyManager();

            string where = string.Format("TargetTypeId = {0}", ddlTargetType.SelectedValue);
            if (tpBLL.GetList(where).Rows.Count > 0)
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "", "<script>alert('该分类下含有标的,不能删除')</script>");
            }
            else
            {
                typeBLL.Delete(Convert.ToInt32(ddlTargetType.SelectedValue));
                //tpBLL.Delete(Convert.ToInt32(ddlTargetType.SelectedValue));
                DdlTargetTypeBindData();
            }
        }