Beispiel #1
0
    private string GetFilter(string searchfilter)
    {
        Hashtable hTable = JSONHelper.GetSearchFilter(searchfilter);
        string    filter = " 1=1 ";

        if (hTable != null && hTable.Count > 0)
        {
            string SafeStr = "";
            if (hTable.Contains("activity_title") && hTable["activity_title"].ToString().Trim() != "")
            {
                SafeStr = KillSqlIn.Form_ReplaceByString(hTable["activity_title"].ToString().Trim(), Int32.MaxValue);
                filter += " and activity_title like '%" + SafeStr + "%'";
            }
            if (hTable.Contains("if_approved") && hTable["if_approved"].ToString().Trim() != "")
            {
                SafeStr = Common.NullToZero(hTable["if_approved"]).ToString();
                filter += " and if_approved = " + SafeStr;
            }
            if (hTable.Contains("activity_status") && hTable["activity_status"].ToString().Trim() != "")
            {
                SafeStr = Common.NullToZero(hTable["activity_status"]).ToString();
                filter += " and activity_status = " + SafeStr;
            }
        }
        return(filter);
    }
Beispiel #2
0
 protected void FillFeild()
 {
     if (_id != "0")
     {
         model            = bll.GetModel(this._id);
         model.templateId = this._id;
     }
     else
     {
         model.templateId = IdCreator.CreateId("T_ShortMessage_Template", "templateId");
         model.isUse      = 1;
     }
     model.flag       = this.ddlParentCategory.SelectedValue;   //标识
     model.supplierId = this.ddlSupplierCategory.SelectedValue; //供应商
     if (!string.IsNullOrEmpty(model.supplierId))
     {
         ShortMsgSupModel modelSup = new ShortMsgSupBll().GetModel(model.supplierId);
         if (modelSup != null)
         {
             model.supplierFlag = modelSup.flag;
         }
     }
     model.templateCode  = KillSqlIn.Form_ReplaceByString(Request.Form["txtCode"], 200);
     model.templateParam = KillSqlIn.Form_ReplaceByString(Request.Form["txtParam"], 200);
 }
Beispiel #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.QueryString["id"] != null)
     {
         id = KillSqlIn.Form_ReplaceByString(Request.QueryString["id"], 10);
     }
     if (!IsPostBack)
     {
         if (this.id != "")
         {
             GoodsTypeModel mod = bll.GetModel(this.id);
             if (mod != null)
             {
                 //this.ddlType.SelectedValue = mod.CategoryToTypeId;
                 //this.ddlPCategory.SelectedValue = mod.PCategoryId;
                 this.cSelect.categoryID  = mod.PCategoryId;
                 this.txtMenuName.Text    = mod.CategoryName;
                 this.txtSort.Text        = mod.Orderby.ToString();
                 this.cbIsVisible.Checked = (mod.CategoryFlag == "Course") ? true : false;
                 if (mod.Url != null)
                 {
                     imgUrl = "<img src='" + mod.Url + "' width='100' height='100' />";
                 }
                 ViewState["Old_PId"] = mod.PCategoryId;
             }
         }
         else
         {
             //this.ddlPCategory.SelectedValue = this.pCatatoryId;
             //this.cSelect.categoryID = this.pCatatoryId;
         }
     }
 }
Beispiel #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //Ajax方法
        AjaxPro.Utility.RegisterTypeForAjax(typeof(AppModules_Goods_T_Forms_Resource));
        if (Request.QueryString["del"] != null)
        {
            string    strSQL    = "delete T_Goods_Pic where sysnumber='" + KillSqlIn.Form_ReplaceByString(Request.QueryString["del"], 100) + "';";
            AdoHelper adohelper = AdoHelper.CreateHelper(StarTech.Util.AppConfig.DBInstance);
            int       row       = adohelper.ExecuteSqlNonQuery(strSQL);

            Response.Clear();

            if (row > 0)
            {
                Response.Write("success");
            }
            else
            {
                Response.Write("fail");
            }
            Response.End();
        }
        this.goodsId = (Request["goodsId"] == null) ? "" : StarTech.KillSqlIn.Url_ReplaceByString(Request["goodsId"], 50);

        if (!IsPostBack)
        {
            InitForm();
            BindVideoAndPic();
        }
    }
Beispiel #5
0
 /// <summary>
 /// 确定提交
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     model = bll.GetModel(Convert.ToInt32(_Pid));
     model.replyContent = this.fckBody.Text;
     model.replyPeople  = KillSqlIn.Form_ReplaceByString(this.txtContent.Text.Trim(), 200);
     if (this.txtReleaseDate.Text.Trim() == "")
     {
         model.replyTime = DateTime.Now;
     }
     else
     {
         model.replyTime = DateTime.Parse(this.txtReleaseDate.Text.Trim());
     }
     model.state = 1;
     if (_Pid != "SysError")
     {
         model.id = Convert.ToInt32(_Pid);
     }
     if (_Pid != "SysError")
     {
         if (bll.Update(model))
         {
             this.ClientScript.RegisterStartupScript(this.GetType(), "close", "<script>alert('保存信息成功');layer_close_refresh();</script>");
         }
     }
 }
Beispiel #6
0
        /// <summary>
        /// 7.卖家完成配货
        /// </summary>
        /// <param name="orderId"></param>
        /// <param name="shopId"></param>
        /// <returns></returns>
        public static int DisOrder(string orderId, string shopId)
        {
            orderId = KillSqlIn.Form_ReplaceByString(orderId, 50);
            shopId  = KillSqlIn.Form_ReplaceByString(shopId, 50);

            string  strSQL   = " BEGIN TRANSACTION ";
            string  strGoods = "select sysnumber=newId(),goodsId,goodsName,orderId,detailId,grabTime,1,'" + DateTime.Now + "',shopId,num from T_Order_WaitingDeal where orderId='" + orderId + "' and shopId='" + shopId + "';";
            DataSet ds       = adoHelper.ExecuteSqlDataset(strGoods);

            string goodsList = "";

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                if (i != 0)
                {
                    goodsList += ",";
                }
                if (ds.Tables[0].Rows[i]["shopId"].ToString() != shopId)
                {
                    continue;
                }
                strSQL += "insert T_Order_GrabLog values('" + ds.Tables[0].Rows[i][0] + "','" + ds.Tables[0].Rows[i][1] + "','" + ds.Tables[0].Rows[i][2] + "','" + ds.Tables[0].Rows[i][3] + "','" + ds.Tables[0].Rows[i][4] + "','" + ds.Tables[0].Rows[i][5] + "'," + ds.Tables[0].Rows[i][6] + ",'" + ds.Tables[0].Rows[i][7] + "','" + ds.Tables[0].Rows[i][8] + "','已配货');";
                strSQL += "update T_Shop_Goods set shopgoods_amount=shopgoods_amount-" + ds.Tables[0].Rows[i]["num"] + " where goodsId='" + ds.Tables[0].Rows[i][1] + "' and ShopId='" + shopId + "';";
                strSQL += "update T_Order_WaitingDeal set isDis=1 where detailId='" + ds.Tables[0].Rows[i]["detailId"] + "';";
            }
            strSQL += "if((select count(sysnumber) from T_Order_InfoDetail where orderId='" + orderId + "')=(select count(sysnumber) from T_Order_WaitingDeal where orderId='" + orderId + "' and isDis=1)) update T_Order_Info set isDis=1,disTime='" + DateTime.Now + "' where orderId='" + orderId + "';";
            strSQL += " COMMIT TRANSACTION ";
            SqlErr(strSQL, "DisOrder");
            int row = adoHelper.ExecuteSqlNonQuery(strSQL);

            return(row);
        }
Beispiel #7
0
        /// <summary>
        /// 3.返回信誉参数,根绝卖家的相关条件,比如开店时间,保证金,来确认信誉,越高的信誉返回越高的值,这个值将影响卖家抢单表的速度
        /// </summary>
        /// <returns></returns>
        public static float GetCredit(string shopId)
        {
            shopId = KillSqlIn.Form_ReplaceByString(shopId, 20);
            string strSQL = "select * from T_Shop_User where shopId='" + shopId + "';";

            SqlErr(strSQL, "GetCredit");
            DataSet ds     = adoHelper.ExecuteSqlDataset(strSQL);
            float   credit = 0.0f;

            if (ds == null || ds.Tables.Count < 1 && ds.Tables[0].Rows.Count < 1)
            {
                return(0.0f);
            }
            if (ds.Tables[0].Rows[0]["ShopMoney"] != DBNull.Value && Convert.ToDecimal(ds.Tables[0].Rows[0]["ShopMoney"]) > 0)
            {
                credit += 0.5f;
            }
            if (ds.Tables[0].Rows[0]["ApplyTime"] != DBNull.Value)
            {
                DateTime applytime = Convert.ToDateTime(ds.Tables[0].Rows[0]["ApplyTime"]);
                int      c         = (DateTime.Now - applytime).Days / 365;
                credit += 0.1f * c;
            }
            return(credit);
        }
Beispiel #8
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        model.flag_name = KillSqlIn.Form_ReplaceByString(Request.Form["txtTitle"], 200);

        //string BackUrl = "CategoryTree.aspx";

        if (_id != "0")
        {
            model.flag_id = _id;
            bll.Update(model);
            ClientScript.RegisterStartupScript(this.GetType(), "js", "<script>alert('修改成功!');layer_close_refresh();</script>");
            //JSUtility.AlertAndRedirect("修改成功!", BackUrl);

            /*日志归档*/
            //string sql1 = @"select Title as title from dbo.T_Category  where CategoryId = (" + _ACid + ")";
            //string function = "修改";
            //PubFunction.InsertLog1("文章类别管理", sql1, function);
        }
        else
        {
            model.if_use  = 1;
            model.flag_id = IdCreator.CreateId("T_Base_Flag", "flag_id");
            bll.Add(model);
            JSUtility.AlertAndRedirect("添加成功,请继续添加!", Request.RawUrl.ToString());

            /*日志归档*/
            //string sql1 = @"select Title as title from dbo.T_Category  where CategoryId = (select top 1 CategoryId from T_Category order by CategoryId desc)";
            //string function = "添加";
            //PubFunction.InsertLog1("文章类别管理", sql1, function);
        }
    }
Beispiel #9
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        SearchCodeInfo search = new SearchCodeInfo();
        string         ticket = search.GetAuthorizationTicket("xingzhen", "xz20100722");
        JgdmInfo       info   = search.GetJgdmDetail(ticket, txtjgdm.Text.Trim().Replace("-", "").Replace("-", ""));

        if (info.State == "000001")
        {
            MemberInfoModel model = new MemberInfoModel();

            if (checkUsername(KillSqlIn.Form_ReplaceByString(this.txtname.Text, 20)) == "0")
            {
                model.memberName        = KillSqlIn.Form_ReplaceByString(this.txtname.Text, 20);
                model.password          = KillSqlIn.Form_ReplaceByString(this.txtpw.Text, 20);//ValidateUtil.MD5Encrypt(this.txtTwoPwd.Value);不用MD5加密
                model.memberLevel       = "20";
                model.memberType        = type;
                model.memberCompanyType = "";
                model.areaName          = "";
                model.memberCompanyName = info.jgmc;
                model.memberCompanyCode = txtjgdm.Text;
                model.memberTrueName    = "";
                model.sex                  = "";
                model.tel                  = "";
                model.fax                  = "";
                model.mobile               = "";
                model.address              = "";
                model.post                 = "";
                model.email                = "";
                model.regTime              = System.DateTime.Now;
                model.shFlag               = 1;
                model.shTime               = DateTime.Now;
                model.shPerson             = "SYS";
                model.unPassReason         = "";
                model.memberStatus         = "ZC";//正常:ZC  禁用:JY
                model.buyMoneyAccount      = 0;
                model.buyMoneyAccountUsed  = 0;
                model.freeMoenyAccount     = 0;
                model.freeMoenyAccountUsed = 0;
                int i = new MemberInfoBLL().Add(model);
                if (i > 0)
                {
                    Session["MemberId"] = i.ToString();
                    Response.Write("<script>alert('注册成功!');layer_close();</script>");
                }
                else
                {
                    Response.Write("<script>alert('注册失败!');</script>");
                }
            }
            else
            {
                Response.Write("<script>alert('该用户名已存在!');layer_close();</script>");
            }
        }
        else
        {
            ClientScript.RegisterStartupScript(this.GetType(), "alert", "<script>alert('组织机构代码错误!');</script>");
            return;
        }
    }
Beispiel #10
0
    protected void btnSave_Click(object sender, ImageClickEventArgs e)
    {
        string    signname  = KillSqlIn.Form_ReplaceByString(txtSignName.Text, 20);
        string    remark    = KillSqlIn.Form_ReplaceByString(txtRemark.Text, 20);
        AdoHelper adohelper = AdoHelper.CreateHelper(StarTech.Util.AppConfig.DBInstance);
        string    strSQL    = "";

        if (id == "")
        {
            DateTime atime = DateTime.Now;
            strSQL = "insert T_Goods_Sign values('" + signname + "','" + remark + "','" + atime + "');";
        }
        else
        {
            strSQL = "update T_Goods_Sign set signName='" + signname + "',remark='" + remark + "' where signid='" + id + "';";
        }
        int rows = adohelper.ExecuteSqlNonQuery(strSQL);

        if (rows > 0)
        {
            if (id == "")
            {
                ClientScript.RegisterStartupScript(this.GetType(), "alert", "<script>alert('添加成功');layer_close_refresh();</script>");
            }
            else
            {
                ClientScript.RegisterStartupScript(this.GetType(), "alert", "<script>alert('修改成功');layer_close_refresh();</script>");
            }
        }
    }
Beispiel #11
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        model           = bll.GetModel1(_Pid);
        model.value     = KillSqlIn.Form_ReplaceByString(this.txtValue.Text, 200);
        model.Price     = Convert.ToDecimal(this.txtPrice.Text);
        model.IsDefault = Convert.ToInt32(this.CheckDefault.SelectedValue);

        if (model != null)
        {
            if (bll.Update(model))
            {
                this.ClientScript.RegisterStartupScript(this.GetType(), "close", "<script>alert('修改成功');layer_close_refresh();</script>");
            }
        }
        else
        {
            model           = new Goods_ServiceDetailModel();
            model.sysnumber = Guid.NewGuid().ToString();
            model.serviceId = _Pid;
            model.value     = KillSqlIn.Form_ReplaceByString(this.txtValue.Text, 200);
            model.Price     = Convert.ToDecimal(this.txtPrice.Text);
            model.IsDefault = Convert.ToInt32(this.CheckDefault.SelectedValue);
            if (bll.Add(model) != null)
            {
                this.ClientScript.RegisterStartupScript(this.GetType(), "close", "<script>alert('设置成功');layer_close_refresh();</script>");
            }
        }
    }
Beispiel #12
0
 public GoodsModel GetModel()
 {
     model                = new GoodsModel();
     model.serviceId      = Guid.NewGuid().ToString();
     model.serviceName    = KillSqlIn.Form_ReplaceByString(this.txtName.Text, 50);
     model.serviceContext = KillSqlIn.Form_ReplaceByString(this.txtMethod.Text, 200);
     model.orderby        = string.IsNullOrEmpty(txtSort.Text) ? 0 : Convert.ToInt32(txtSort.Text, 10);
     return(model);
 }
Beispiel #13
0
    /// <summary>
    /// 确定提交
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        model.Title       = KillSqlIn.Form_ReplaceByString(this.txtTitle.Text, 100);
        model.DisplayMode = Convert.ToInt32(this.RadioButtonList1.SelectedValue);
        model.CategoryId  = Convert.ToInt32(this.DrCategory.SelectedValue);
        model.Link        = KillSqlIn.Form_ReplaceByString(this.txtLink.Text.Trim(), 100);
        model.sort        = Convert.ToInt32(KillSqlIn.Form_ReplaceByString(this.txtSort.Text, 10));
        model.StartTime   = !string.IsNullOrEmpty(this.txtStartTime.Text) ? Convert.ToDateTime(this.txtStartTime.Text) : System.DateTime.Now;
        model.EndTime     = !string.IsNullOrEmpty(this.txtEndTime.Text) ? Convert.ToDateTime(this.txtEndTime.Text) : System.DateTime.Now.AddDays(7);
        #region 保存图片
        if (!this.picUpload.Value.Equals(""))
        {
            string FileTZM = this.picUpload.PostedFile.FileName.Substring(this.picUpload.PostedFile.FileName.LastIndexOf(".") + 1);//得到文件的扩展名

            if (!IsPic(FileTZM.ToLower()))
            {
                JSUtility.Alert("上传图片格式不正确!");
                return;
            }
            if (this.picUpload.PostedFile.ContentLength > 1048576)
            {
                JSUtility.Alert("上传图片过大!");
                return;
            }
            Random rnd            = new Random();
            string UpLoadFileTime = DateTime.Now.ToString("HHmmss") + rnd.Next(9999).ToString("0000"); //生成一个新的数图片名称
            string fileName       = UpLoadFileTime + "." + FileTZM;                                    //产生上传图片的名称
            if (!Directory.Exists(Request.MapPath("~/upload/Link/")))
            {
                Directory.CreateDirectory(Request.MapPath("~/upload/Link/"));
            }
            string Url = Request.MapPath("~/upload/Link/" + fileName);
            picUpload.PostedFile.SaveAs(Url);
            model.Image = "/upload/Link/" + fileName;
        }
        else
        {
            model.Image = ViewState["Image"] == null ? "" : ViewState["Image"].ToString();
        }
        #endregion
        if (_Pid != "SysError")
        {
            model.AdId = Convert.ToInt32(_Pid);
            if (bll.Update(model))
            {
                this.ClientScript.RegisterStartupScript(this.GetType(), "close", "<script>alert('修改成功');layer_close_refresh();</script>");
            }
        }
        else
        {
            if (bll.Add(model) != 0)
            {
                JSUtility.AlertAndRedirect("添加成功,请继续添加!", Request.RawUrl.ToString());
            }
        }
    }
Beispiel #14
0
 public AreaModel GetModel()
 {
     model            = new AreaModel();
     model.area_id    = KillSqlIn.Form_ReplaceByString(this.txtAreaId.Text, 100);
     model.area_name  = KillSqlIn.Form_ReplaceByString(this.txtName.Text, 200);
     model.area_pid   = ddlPid.SelectedValue.Equals("0") ? "0" : ddlPid.SelectedValue;
     model.area_level = ddlPid.SelectedValue.Equals("0") ? 1 : bll.GetModel(model.area_pid).area_level + 1;
     model.orderby    = string.IsNullOrEmpty(txtSort.Text) ? 0 : Convert.ToInt32(txtSort.Text, 10);
     return(model);
 }
Beispiel #15
0
 public MarketModel GetModel()
 {
     model             = new MarketModel();
     model.Market_id   = KillSqlIn.Form_ReplaceByString(this.txtMarketId.Text, 100);
     model.Market_name = KillSqlIn.Form_ReplaceByString(this.txtMarketName.Text, 200);
     model.Area_id     = ddlAreaId.SelectedValue.Equals("0") ? "0" : ddlAreaId.SelectedValue;
     model.Map_x       = KillSqlIn.Form_ReplaceByString(this.txtMapX.Text, 100);
     model.Map_y       = KillSqlIn.Form_ReplaceByString(this.txtMapY.Text, 100);
     model.orderby     = string.IsNullOrEmpty(txtSort.Text) ? 0 : Convert.ToInt32(txtSort.Text, 10);
     return(model);
 }
Beispiel #16
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.QueryString["categoryId"] != null)
     {
         categoryId += "&categoryId=" + KillSqlIn.Form_ReplaceByString(Request.QueryString["categoryId"], 20);
     }
     if (!IsPostBack)
     {
         BindTreeView();
     }
 }
Beispiel #17
0
 private void AddXHMember()
 {
     if (checkUsername(this.txtMemberName.Text.Trim()) == "1")
     {
         Response.Write("<script>alert('该协会会员已存在!');</script>");
     }
     else
     {
         try
         {
             MemberInfoModel model = new MemberInfoModel();
             model.memberName  = KillSqlIn.Form_ReplaceByString(this.txtMemberName.Text, 20);
             model.password    = KillSqlIn.Form_ReplaceByString(this.txtPwd.Text, 20);//ValidateUtil.MD5Encrypt(this.txtTwoPwd.Value);不用MD5加密
             model.memberLevel = "0";
             model.memberType  = type;
             //  model.memberCompanyType = this.ddlMemberType.SelectedValue;
             model.memberCompanyType = GetHyType();
             model.areaName          = "";
             model.memberCompanyName = txtXHName.Text;
             model.memberCompanyCode = "";
             model.memberTrueName    = txtTrueName.Text;
             model.sex                  = "";
             model.tel                  = txtTel.Text;
             model.fax                  = "";
             model.mobile               = "";
             model.address              = this.txtAddress.Text;
             model.post                 = "";
             model.email                = "";
             model.regTime              = System.DateTime.Now;
             model.shFlag               = 1;
             model.shTime               = DateTime.Now;
             model.shPerson             = " ";
             model.unPassReason         = "";
             model.memberStatus         = "ZC";//正常:ZC  禁用:JY
             model.buyMoneyAccount      = 0;
             model.buyMoneyAccountUsed  = 0;
             model.freeMoenyAccount     = 0;
             model.freeMoenyAccountUsed = 0;
             int i = new MemberInfoBLL().Add(model);
             if (i > 0)
             {
                 Response.Write("<script>alert('添加成功!');layer_close();</script>");
             }
             else
             {
                 Response.Write("<script>alert('添加失败!');</script>");
             }
         }
         catch (Exception ee)
         {
             Response.Write("<script>alert('出错了, 原因:'" + ee.Message + "'');</script>");
         }
     }
 }
Beispiel #18
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.QueryString["id"] != null)
     {
         id = KillSqlIn.Form_ReplaceByString(Request.QueryString["id"], 10);
         if (!IsPostBack)
         {
             GetSign();
         }
     }
 }
Beispiel #19
0
 public BuildingModel GetModel()
 {
     model               = new BuildingModel();
     model.Building_id   = KillSqlIn.Form_ReplaceByString(this.txtBuildingId.Text, 100);
     model.Building_name = KillSqlIn.Form_ReplaceByString(this.txtBuildingName.Text, 200);
     model.Area_id       = ddlAreaId.SelectedValue.Equals("0") ? "0" : ddlAreaId.SelectedValue;
     model.Map_x         = KillSqlIn.Form_ReplaceByString(this.txtMapX.Text, 100);
     model.Map_y         = KillSqlIn.Form_ReplaceByString(this.txtMapY.Text, 100);
     model.orderby       = string.IsNullOrEmpty(txtSort.Text) ? 0 : Convert.ToInt32(txtSort.Text, 10);
     model.AddressDetail = KillSqlIn.Form_ReplaceByString(this.txtAddressDetail.Text, 250);
     return(model);
 }
Beispiel #20
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.QueryString["id"] != null)
     {
         memberId = KillSqlIn.Form_ReplaceByString(Request.QueryString["id"], 20);
         if (memberId == "")
         {
             return;
         }
         GetMember(memberId);
     }
 }
Beispiel #21
0
    /// <summary>
    /// 保存关键字信息
    /// </summary>
    void UpdateData(int index, int type, string keywordList)
    {
        string sqlKy  = KillSqlIn.Form_ReplaceByString(keywordList, 300);
        string strSQL = " update T_News set ShareToMarket=substring(ShareToMarket,2,500) where (patindex('%,%',ShareToMarket))=1 ;";

        strSQL += " update T_News set ShareToSubject=substring(ShareToSubject,2,500) where (patindex('%,%',ShareToSubject))=1 ;";
        strSQL += "update T_News set ShareToPlatform=substring(ShareToPlatform,2,500) where (patindex('%,%',ShareToPlatform))=1";
        strSQL += " if((select count(*) from T_ShareNews where ShareIndex=" + index + " and ShareType=" + type + ")=0) ";
        strSQL += " insert T_ShareNews values(" + index + "," + type + ",'" + sqlKy + "','');";
        strSQL += " else ";
        strSQL += " update T_ShareNews Set ShareIndex=" + index + ",ShareType=" + type + ",KeywordList='" + sqlKy + "' where  ShareIndex=" + index + " and ShareType=" + type + ";";
        AdoHelper helper = AdoHelper.CreateHelper("DB_Instance");
        int       row    = helper.ExecuteSqlNonQuery(strSQL);
    }
Beispiel #22
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Request.QueryString["id"] != null)
         {
             task_id.Value = KillSqlIn.Form_ReplaceByString(Request.QueryString["id"], 20);
             if (task_id.Value == "")
             {
                 return;
             }
             GetInfo(task_id.Value);
         }
     }
 }
Beispiel #23
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.QueryString["id"] == null)
     {
         return;
     }
     id = KillSqlIn.Form_ReplaceByString(Request.QueryString["id"], 50);
     if (id == "")
     {
         return;
     }
     if (!IsPostBack)
     {
         BindInfo();
     }
 }
Beispiel #24
0
        /// <summary>
        /// 完成签收
        /// </summary>
        /// <param name="OrderId"></param>
        /// <param name="refuseContext"></param>
        /// <returns></returns>
        public static int Complete(string OrderId, string completeContext)
        {
            OrderId         = KillSqlIn.Form_ReplaceByString(OrderId, 50);
            completeContext = KillSqlIn.Form_ReplaceByString(completeContext, 500);
            string strSQL = "update T_Order_info set isGet=1,gettime='" + DateTime.Now + "',GetRemarks='【派送员确认】" + completeContext + "' where orderId='" + OrderId + "';";
            int    rows   = adoHelper.ExecuteSqlNonQuery(strSQL);

            if (rows > 0)
            {
                return(1);
            }
            else
            {
                return(0);
            }
        }
Beispiel #25
0
 private void Update_AddXZMember()
 {
     try
     {
         MemberInfoModel model = new MemberInfoModel();
         model.memberId          = id;
         model.memberName        = KillSqlIn.Form_ReplaceByString(this.txtXZMember.Text, 20);
         model.password          = KillSqlIn.Form_ReplaceByString(this.txtXZPwd.Text, 20);//ValidateUtil.MD5Encrypt(this.txtTwoPwd.Value);不用MD5加密
         model.memberLevel       = "0";
         model.memberType        = type;
         model.memberCompanyType = this.txtXZType.Text;//部门名称
         model.areaName          = "";
         model.memberCompanyName = this.txtXZName.Text;
         model.memberCompanyCode = "";
         model.memberTrueName    = txtXZTrueName.Text;
         model.sex                  = "";
         model.tel                  = txtXZTel.Text;
         model.fax                  = "";
         model.mobile               = "";
         model.address              = "";
         model.post                 = "";
         model.email                = "";
         model.regTime              = System.DateTime.Now;
         model.shFlag               = 1;
         model.shTime               = DateTime.Now;
         model.shPerson             = " ";
         model.unPassReason         = "";
         model.memberStatus         = "ZC";//正常:ZC  禁用:JY
         model.buyMoneyAccount      = 0;
         model.buyMoneyAccountUsed  = 0;
         model.freeMoenyAccount     = 0;
         model.freeMoenyAccountUsed = 0;
         int i = new MemberInfoBLL().Update(model);
         if (i > 0)
         {
             Response.Write("<script>alert('修改成功!');layer_close();</script>");
         }
         else
         {
             Response.Write("<script>alert('修改失败!');</script>");
         }
     }
     catch (Exception ee)
     {
         Response.Write("<script>alert('出错了, 原因:'" + ee.Message + "'');</script>");
     }
 }
Beispiel #26
0
        /// <summary>
        /// 拒绝签收
        /// </summary>
        /// <param name="OrderId"></param>
        /// <param name="refuseContext"></param>
        /// <returns></returns>
        public static int RefuseGet(string OrderId, string refuseContext)
        {
            OrderId       = KillSqlIn.Form_ReplaceByString(OrderId, 50);
            refuseContext = KillSqlIn.Form_ReplaceByString(refuseContext, 500);
            string strSQL = "update T_Order_info set isdis=0,isRefuseGet=1,isPostmanConfirm=0,refuseTime='" + DateTime.Now + "',refuseContext='" + refuseContext + "' where orderId='" + OrderId + "';";
            int    rows   = adoHelper.ExecuteSqlNonQuery(strSQL);

            if (rows > 0)
            {
                adoHelper.ExecuteSqlNonQuery("update T_Order_WaitingDeal set isdis=0 where orderId='" + OrderId + "' ");
                return(1);
            }
            else
            {
                return(0);
            }
        }
Beispiel #27
0
    protected void btSend_Click(object sender, EventArgs e)
    {
        string mobile = KillSqlIn.Form_ReplaceByString(txtPhone.Text, 20);
        string url    = "http://elife2.hzst.com/ServiceInterface/Member/Mobile.ashx?flag=yzm&mobile=" + mobile;

        Response.Redirect(url);
        return;

        //WebRequest r = WebRequest.Create(url);
        //WebResponse response = r.GetResponse();
        //StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding("gb2312"));
        //string str = reader.ReadToEnd();
        //reader.Close();
        //reader.Dispose();
        //response.Close();
        //txtYZM.Text = str;
    }
Beispiel #28
0
        /// <summary>
        /// 6.取消已经抢到的订单
        /// </summary>
        /// <param name="orderId"></param>
        /// <param name="shopId"></param>
        /// <returns></returns>
        public static int CancelGrabOrder(string orderId, string shopId)
        {
            orderId = KillSqlIn.Form_ReplaceByString(orderId, 50);
            shopId  = KillSqlIn.Form_ReplaceByString(shopId, 50);
            string  strSQL   = "update T_Order_WaitingDeal set isGrab=0 , GrabTime=getdate(), shopId='" + shopId + "' where orderId='" + orderId + "';";
            string  strGoods = "select sysnumber=newId(),goodsId,goodsName,orderId,detailId,grabTime,0,1991-1-1,shopId from T_Order_WaitingDeal where orderId='" + orderId + "';";
            DataSet ds       = adoHelper.ExecuteSqlDataset(strGoods);

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                strSQL += "insert T_Order_GrabLog values('" + ds.Tables[0].Rows[i][0] + "','" + ds.Tables[0].Rows[i][1] + "','" + ds.Tables[0].Rows[i][2] + "','" + ds.Tables[0].Rows[i][3] + "','" + ds.Tables[0].Rows[i][4] + "','" + ds.Tables[0].Rows[i][5] + "'," + ds.Tables[0].Rows[i][6] + ",'" + ds.Tables[0].Rows[i][7] + "','" + ds.Tables[0].Rows[i][8] + "','取消已抢订单');";
            }
            strSQL += "update T_Order_InfoDetail set ProviderInfo='' where orderId='" + orderId + "';";
            SqlErr(strSQL, "CancelGrabOrder");
            int row = adoHelper.ExecuteSqlNonQuery(strSQL);

            return(row);
        }
Beispiel #29
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.QueryString["id"] != null)
     {
         serviceId = KillSqlIn.Form_ReplaceByString(Request.QueryString["id"], 50);
         string strSQL = "select * from T_Goods_Service where serviceId='" + serviceId + "';";
         strSQL += "select * from T_Goods_ServiceDetail where serviceId='" + serviceId + "';";
         ds      = adoHelper.ExecuteSqlDataset(strSQL);
         if (ds == null || ds.Tables.Count < 1 || ds.Tables[0].Rows.Count < 1)
         {
             return;
         }
         if (!IsPostBack)
         {
             BindData();
         }
     }
 }
Beispiel #30
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.QueryString["courseId"] != null)
     {
         this.hidCourseId.Value = Request.QueryString["courseId"];
         courseId = KillSqlIn.Form_ReplaceByString(Request.QueryString["courseId"], 20);
     }
     if (Request.QueryString["courseId"] != null)
     {
         this.hidTestSysnumber.Value = Request.QueryString["testSysnumber"];
         testSysnumber = KillSqlIn.Form_ReplaceByString(Request.QueryString["testSysnumber"], 50);
     }
     if (!IsPostBack)
     {
         this.dtAll = GetAll();
         BindTreeView();
     }
 }