コード例 #1
0
 public void CheckNickName(string NickName)
 {
     DA_Common da = new DA_Common();
     string sql = "select sCustomID from t_custom where sNickName='" + NickName + "'";
     DataSet ds = da.CommonQuery(sql);
     if (BizCommon.IsNullDataSet(ds))
     {
         Response.ContentType = "text/html";
         Response.Write("恭喜,此昵称可以注册!");
     }
     else
     {
         Response.ContentType = "text/html";
         Response.Write("此昵称已经存在,请换一个!");
     }
 }
コード例 #2
0
 public void CheckEmail(string Email)
 {
     DA_Common da = new DA_Common();
     string sql = "select sCustomID from t_custom where sEmail='" + Email + "'";
     DataSet ds = da.CommonQuery(sql);
     if (BizCommon.IsNullDataSet(ds))
     {
         Response.ContentType = "text/html";
         Response.Write("恭喜,此邮箱可以注册!");
     }
     else
     {
         Response.ContentType = "text/html";
         Response.Write("此邮箱已经存在,请换一个!");
     }
 }
コード例 #3
0
ファイル: BizCommon.cs プロジェクト: newhzh/ttdwebsolution
        public static string GetRegionFullName(string provinceID, string cityID, string countryID)
        {
            string err = "";
            string sql1 = "select sRegionName from t_region where sRegionID='" + provinceID + "'";
            string sql2 = "select sRegionName from t_region where sRegionID='" + cityID + "'";
            string sql3 = "select sRegionName from t_region where sRegionID='" + countryID + "'";
            DataSet ds = new DataSet();
            DA_Common da = new DA_Common();
            da.CommonQuery(ref ds, sql1, "T1", sql2, "T2", sql3, "T3", ref err);
            if (BizCommon.IsNullDataSet(ds)) return "";

            string result = "";
            if (ds.Tables["T1"].Rows.Count > 0)
                result = ds.Tables["T1"].Rows[0]["sRegionName"].ToString();
            if (ds.Tables["T2"].Rows.Count > 0)
                result += " " + ds.Tables["T2"].Rows[0]["sRegionName"].ToString();
            if (ds.Tables["T3"].Rows.Count > 0)
                result += " " + ds.Tables["T3"].Rows[0]["sRegionName"].ToString();

            return result;
        }
コード例 #4
0
        public ActionResult ProductCustomer(string productcode)
        {
            string sql = "select t1.sCustomName,t1.sCellPhone,t1.sOrganID,t1.sEmail,t2.sOrganName " +
                " from T_Custom t1 " +
                " inner join T_ForeignOrgan t2 on t1.sOrganID=t2.sOrganID " +
                " where t2.sOrganID in(select sOrganID from T_Product where sProductCode='" + productcode + "')";
            DA_Common da=new DA_Common();
            DataSet ds = da.CommonQuery(sql);

            List<CustomModel> arrCustoms = new List<CustomModel>();
            CustomModel m;
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                m = new CustomModel();
                m.CellPhone = dr["sCellPhone"].ToString();
                m.CustomName = dr["sCustomName"].ToString();
                m.Email = dr["sEmail"].ToString();
                m.OrganID = dr["sOrganID"].ToString();
                m.OrganName = dr["sOrganName"].ToString();

                arrCustoms.Add(m);
            }

            return View(arrCustoms);
        }
コード例 #5
0
        List<SelectListItem> GetRegionList(string level, string parentid)
        {
            string sql = "select sRegionID,sRegionName,sParentID from t_region where nLevel=" + level;
            if (parentid != "")
                sql += " and sParentID='" + parentid + "'";

            if (Convert.ToInt32(level) > 0 && parentid == "")
                sql += " and 1=2";

            DA_Common da = new DA_Common();
            DataSet ds = da.CommonQuery(sql);

            List<SelectListItem> items = new List<SelectListItem>();
            items.Add(new SelectListItem { Text = "--请选择--", Value = "" });

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                items.Add(new SelectListItem { Text = dr["sRegionName"].ToString(), Value = dr["sRegionID"].ToString() });
            }
            return items;
        }
コード例 #6
0
        List<SelectListItem> GetOrganList(string regionid)
        {
            string sql = "select sOrganID,sOrganName from t_foreignorgan where sregionid='" + regionid + "'";
            if (regionid == "")
                sql += " and 1=2";

            DA_Common da = new DA_Common();
            DataSet ds = da.CommonQuery(sql);

            List<SelectListItem> items = new List<SelectListItem>();
            items.Add(new SelectListItem { Text = "--请选择--", Value = "" });

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                items.Add(new SelectListItem { Text = dr["sOrganName"].ToString(), Value = dr["sOrganID"].ToString() });
            }
            return items;
        }