Example #1
0
    protected void bindData()
    {
        GridView1.PageSize = Convert.ToInt16(ddl_PageSize.SelectedValue);
        string   str_sql = "select * from t_expert order by loginname ";
        DataView dv      = DBFun.GetDataView(str_sql);

        GridView1.DataSource = dv;
        GridView1.DataBind();
        Session["dv_detail"] = dv;
        CommFun.Add_ConfirmAttrib(GridView1, "lbtn_del");
    }
Example #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         CommFun.IsAdmin();
         string strqry = "select id,Caption From T_class";
         DBFun.FillDwList(dw_class, strqry);
         strqry = "Select * From T_Class";
         GridView1.DataSource = DBFun.GetDataView(strqry);
         GridView1.DataBind();
     }
 }
        /// <summary>
        /// 添加或修改数据,id为空时为添加,否则为修改
        /// </summary>
        /// <param name="vo">实体数据</param>
        /// <returns></returns>
        public IResult Save(MUpChannelConfig vo)
        {
            IResult result = new Result(false);
            bool    status = dbAccess.Save(vo) > 0;

            if (status)
            {
                result       = new Result(true);
                result["id"] = CommFun.GetString(dbAccess.Builder.ODMapConfig.PrimaryKeyField.GetValue(vo));
            }
            return(result);
        }
Example #4
0
        protected void Application_Error(object sender, EventArgs e)
        {
            var error = Server.GetLastError().GetBaseException();

            Server.ClearError();
            ILogger logger = LoggerManager.Instance.GetLogger("web");
            string  msg    = string.Format("系统发生异常,Url:{0}", Request.Url);

            logger.Error(msg, error);
            Application["aa"] = "ddd";
            Response.Redirect("/Shared/Error?msg=" + CommFun.UrlEncode(error.Message, "utf-8"), true);
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["dept_id"] == null)
     {
         Response.Redirect("../SessionTimeOut.aspx?type=top");
     }
     if (!CommFun.IsTimeOut("jy", Session["dept_id"].ToString()))
     {
         Response.Write("<script>alert('您还未提交,不能再访问该页面!');window.history.go(-1);</script>");
         return;
     }
     bindData();
 }
Example #6
0
    protected void imgbtn_SaveNext_Click(object sender, ImageClickEventArgs e)
    {
        string ls_gzjj = ftb_gzjj.Text.Replace("'", "’");

        if (CommFun.StringCounter(ftb_gzjj.HtmlStrippedText) > 800)
        {
            Response.Write("<script>alert('业务工作简介限800字!');</script>");
            return;
        }
        Save();
        //Response.Redirect("zgsb_3.aspx?flag=" + hdn_flag.Value);
        Response.Redirect("yjysb-1.aspx?tablename=Table3&flag=" + hdn_flag.Value);
    }
Example #7
0
        /// <summary>
        /// 根据关键字获取公交站点
        /// </summary>
        /// <param name="key">根据关键字查询公交站点</param>
        /// <param name="callback">结果处理函数</param>
        /// <param name="spliter">站点分隔符</param>
        /// <param name="maxNum">最大结果数</param>
        void GetBusStopName(string key, UploadStringCompletedEventHandler callback, string spliter = "$", int maxNum = 8)
        {
            key = CommFun.Escape(key.Trim());
            string    svrUrl = ServerAddress + "?svcType=SDS&_method=GetBusStop";
            string    data   = "_method=GetBusStop&key=" + key + "&spliter=" + spliter + "&encode=0&num=" + maxNum;
            WebClient cli    = new WebClient();

            cli.Encoding = Encoding.UTF8;
            cli.Headers[HttpRequestHeader.ContentType]     = "type=text/xml;charset=utf-8";
            cli.Headers[HttpRequestHeader.ContentEncoding] = "utf-8";
            cli.UploadStringCompleted += callback;
            cli.UploadStringAsync(new Uri(svrUrl), data);
        }
Example #8
0
    protected void bindData()
    {
        DataView dv;
        string   str_sql;

        str_sql            = "select bm,name,url,iif(tj_flag=True,'已提交','未提交') as sftj from t_dict where flm = 13";
        dv                 = DBFun.GetDataView(str_sql);
        gv_Dept.DataSource = dv;
        gv_Dept.DataBind();
        CommFun.Add_ConfirmAttrib(gv_Dept, "lbtn_del");
        Session["dv_detail"] = dv;
        TD_AddUser.Visible   = false;
    }
Example #9
0
        public object ReviewQuery(NameValueCollection nvc)
        {
            OrderMainListModel model  = new OrderMainListModel();
            MOrderMain         entity = new MOrderMain();

            model.PageSize = CommFun.ToInt(nvc["ps"],
                                           SettingHelper.Instance.GetInt("PageSize", 10)).Value;
            model.PageIndex = CommFun.ToInt(nvc["pi"],
                                            SettingHelper.Instance.GetInt("PageIndex", 0)).Value + 1;
            entity.SetData(nvc, false);
            entity.TrimEmptyProperty();
            entity.AddData(":PS", model.PageSize);
            entity.AddData(":PI", model.PageIndex);
            DateTime st = CommFun.ToDateTime(nvc["s"], DateTime.Now.AddDays(-1)).Value;
            DateTime et = CommFun.ToDateTime(nvc["t"], DateTime.Now).Value;

            entity.AddData("ST", st.ToString("yyyy-MM-dd"));
            entity.AddData("ET", et.ToString("yyyy-MM-dd"));
            //关键字
            string keyWords      = CommFun.GetString(nvc["KeyWords"]);
            string accountCondit = "1=1";

            if (!string.IsNullOrEmpty(keyWords))
            {
                int?type = CommFun.ToInt(nvc["keytype"], null);
                if (type == 1)
                {
                    entity.OrderNo = keyWords;
                }
                else if (type == 2)
                {
                    entity.PartnerOrderNo = keyWords;
                }
                else if (type == 3)
                {
                    accountCondit = "(t.account like '%" + keyWords + "%' or t.mobile like '%" + keyWords + "%')";
                }
                else if (type == 4)
                {
                    entity.Face = CommFun.ToDecimal(keyWords, null);
                }
            }

            entity.AddData(":Condition", accountCondit);
            model.TotalCount = CommFun.ToInt(handler.GetScalarByXmlTemplate("getReviewCount", entity), 0).GetValueOrDefault();
            if (model.TotalCount > 0)
            {
                model.List = handler.GetDataListByTemplate("getReviewList", entity);
            }
            return(model);
        }
Example #10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Session["admin_name"] == null)
         {
             Response.Redirect("../SessionTimeOut.aspx?type=top");
         }
         if (!CommFun.IsAdmin(Session["admin_name"].ToString()))
         {
             Response.Redirect("../SessionTimeOut.aspx?type=isnotadmin");
         }
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["admin_id"] == null)
     {
         Response.Write("<script>alert('页面失效,请您重新登录!');location.href = './admin_login.aspx?type=lwrs';</script>");
         return;
     }
     if (!CommFun.IsTimeOut("lw", Session["admin_id"].ToString()))
     {
         Response.Write("<script>alert('您还未提交,不能再访问该页面!');window.history.go(-1);</script>");
         return;
     }
     bindData();
 }
Example #12
0
        /// <summary>
        /// 获取公交换乘方案
        /// </summary>
        /// <param name="startStop">起始站点</param>
        /// <param name="endStop">结束站点</param>
        /// <param name="callback">结果处理函数</param>
        /// <param name="returnXml">是否以XML形式返回结果</param>
        void GetBusChangeRlt(string startStop, string endStop, UploadStringCompletedEventHandler callback, bool returnXml = false)
        {
            startStop = CommFun.Escape(startStop.Trim());
            endStop   = CommFun.Escape(endStop.Trim());
            String    returnType = returnXml ? "0" : "1";
            string    svrUrl     = ServerAddress + "?svcType=SDS&_method=GetBusWay";
            string    data       = "_method=GetBusWay&staPos=" + startStop + "&endPos=" + endStop + "&encode=0&outputType=" + returnType;
            WebClient cli        = new WebClient();

            cli.Encoding = Encoding.UTF8;
            cli.Headers[HttpRequestHeader.ContentType]     = "type=text/xml;charset=utf-8";
            cli.Headers[HttpRequestHeader.ContentEncoding] = "utf-8";
            cli.UploadStringCompleted += callback;
            cli.UploadStringAsync(new Uri(svrUrl), data);
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["admin_id"] == null)
     {
         Response.Redirect("../SessionTimeOut.aspx?type=top");
     }
     if (!CommFun.IsAdmin(Session["admin_name"].ToString()))
     {
         Response.Redirect("../SessionTimeOut.aspx?type=isnotadmin");
     }
     lbl_type.Text = Request.QueryString["type"];
     if (!IsPostBack)
     {
         bindData();
     }
 }
Example #14
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["admin_name"] == null)
     {
         Response.Redirect("../SessionTimeOut.aspx?type=top");
     }
     if (!CommFun.IsAdmin(Session["admin_name"].ToString()))
     {
         Response.Redirect("../SessionTimeOut.aspx?type=isnotadmin");
     }
     if (!IsPostBack)
     {
         AspNetPager1.PageSize = Convert.ToInt16(ConfigurationManager.AppSettings.Get("PageSize"));
         bindData();
     }
 }
Example #15
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["dept_id"] == null)
     {
         Response.Redirect("../SessionTimeOut.aspx?type=top");
     }
     if (CommFun.IsTimeOut("jy", Session["dept_id"].ToString()))
     {
         Response.Write("<script>alert('您已经提交,不能再访问该页面!');location.href = './main.aspx','_main';</script>");
         return;
     }
     if (!IsPostBack)
     {
         bindData();
     }
 }
        /// <summary>
        /// 查询列表数据
        /// </summary>
        /// <param name="nvc">参数集合</param>
        /// <returns></returns>
        public ReceiptFundRecordListModel Query(NameValueCollection nvc)
        {
            ReceiptFundRecordListModel model  = new ReceiptFundRecordListModel();
            MReceiptFundRecord         entity = new MReceiptFundRecord();
            StringBuilder WhereString         = new StringBuilder();

            //下游渠道查询
            if (!string.IsNullOrEmpty(nvc["PayType"]))
            {
                WhereString.AppendFormat(" and t1.account_type={0}", nvc["PayType"]);
            }
            if (!string.IsNullOrEmpty(nvc["ChannelNo"]))
            {
                WhereString.AppendFormat(" and t1.down_channel_no={0}", nvc["ChannelNo"]);
            }

            model.PageSize = CommFun.ToInt(nvc["ps"],
                                           SettingHelper.Instance.GetInt("PageSize", 10)).Value;
            model.PageIndex = CommFun.ToInt(nvc["pi"],
                                            SettingHelper.Instance.GetInt("PageIndex", 0)).Value + 1;
            entity.SetData(nvc, false);
            entity.TrimEmptyProperty();
            entity.AddData(":PS", model.PageSize);
            entity.AddData(":PI", model.PageIndex);
            entity.AddData(":WhereString", string.IsNullOrEmpty(WhereString.ToString()) ? " and 1=1" : WhereString.ToString());

            //时间
            DateTime st = CommFun.ToDateTime(nvc["s"], DateTime.Now.AddDays(-1)).Value;
            DateTime et = CommFun.ToDateTime(nvc["e"], DateTime.Now).Value;

            entity.AddData("ST", st.ToString("yyyy-MM-dd"));
            entity.AddData("ET", et.ToString("yyyy-MM-dd"));

            //关键字
            string keyWords = CommFun.GetString(nvc["KeyWords"]);

            if (!string.IsNullOrEmpty(keyWords))
            {
                entity.OrderNO = keyWords;
            }
            model.TotalCount = CommFun.ToInt(handler.GetScalarByXmlTemplate("getCount", entity), 0).GetValueOrDefault();
            if (model.TotalCount > 0)
            {
                model.List = handler.GetDataListByTemplate("getList", entity);
            }
            return(model);
        }
Example #17
0
    protected void bindData()
    {
        string   str_sql = "select * from t_pszj where appyear=year(date()) ";
        DataView dv      = DBFun.GetDataView(str_sql);

        GridView1.DataSource = dv;
        GridView1.DataBind();
        Session["dv_detail"] = dv;
        CommFun.Add_ConfirmAttrib(GridView1, "lbtn_del");
        RadioButtonList rbl_fnd;

        for (int i = 0; i < this.GridView1.Rows.Count; i++)
        {
            rbl_fnd = (RadioButtonList)this.GridView1.Rows[i].FindControl("rbl_tj");
            rbl_fnd.SelectedValue = dv.Table.Rows[i + GridView1.PageIndex * GridView1.PageSize]["tj_flag"].ToString();
        }
    }
Example #18
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["admin_id"] == null)
     {
         Response.Redirect("../SessionTimeOut.aspx?type=top");
     }
     if (!CommFun.IsAdmin(Session["admin_name"].ToString()))
     {
         Response.Redirect("../SessionTimeOut.aspx?type=isnotadmin");
     }
     if (!IsPostBack)
     {
         bindData();
         //this.GridView1.Columns[7].Visible = true;
         //this.GridView1.SelectedIndex = -1;
     }
 }
Example #19
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["admin_id"] == null)
     {
         Response.Write("<script>alert('页面失效,请您重新登录!');location.href = './admin_login.aspx?type=renshi';</script>");
         return;
     }
     if (CommFun.IsTimeOut("zgj", Session["admin_id"].ToString()))
     {
         Response.Write("<script>alert('您已经提交,不能再访问该页面!');location.href = './main.aspx','_main';</script>");
         return;
     }
     if (!IsPostBack)
     {
         bindData();
     }
 }
Example #20
0
        private void btnOk_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (BsfGlobal.FindPermission("Incentive Details-Add") == false)
            {
                MessageBox.Show("You don't have Rights to Incentive Details-Add");
                return;
            }
            grdIGView.FocusedRowHandle = grdIGView.FocusedRowHandle + 1;
            if (DEDate.EditValue == null)
            {
                return;
            }
            if (DETo.EditValue == null)
            {
                return;
            }

            IncGenBO.DE_Date       = Convert.ToDateTime(DEDate.EditValue.ToString());
            IncGenBO.DE_From       = Convert.ToDateTime(DEFrom.EditValue.ToString());
            IncGenBO.DE_To         = Convert.ToDateTime(DETo.EditValue.ToString());
            IncGenBO.s_RefNo       = txtRefNo.Text;
            IncGenBO.s_Narration   = txtNarration.Text;
            IncGenBO.d_TotalAmount = Convert.ToDecimal(CommFun.IsNullCheck(grdIGView.Columns["Amount"].SummaryText.ToString(), CommFun.datatypes.vartypenumeric));

            if (s_mName == "A")
            {
                IncentiveDL.InsertIncGen("A", IncGenBO);
                InsertIncentiveTrans();
                Close();
            }
            else
            {
                IncentiveDL.InsertIncGen("E", IncGenBO);
                InsertIncentiveTrans();

                bar1.Visible = false;
                bar3.Visible = false;
                panelControl1.Controls.Clear();
                frmIncentiveDetails frmID = new frmIncentiveDetails()
                {
                    TopLevel = false, FormBorderStyle = FormBorderStyle.None, Dock = DockStyle.Fill
                };
                panelControl1.Controls.Add(frmID);
                frmID.Show();
            }
        }
Example #21
0
        public static int FindRentTransId(int argRentId)
        {
            int           iRegTransId = 0;
            SqlConnection conn        = new SqlConnection();
            SqlCommand    cmd;
            SqlDataReader sdr;
            DataTable     dtTran;

            conn = BsfGlobal.OpenCRMDB();
            using (SqlTransaction tran = conn.BeginTransaction())
            {
                string sSql = "";
                try
                {
                    dtTran = new DataTable();
                    sSql   = "SELECT Max(RentTransId) MaxNo FROM RentAgreementTrans WHERE RentId=" + argRentId + "";
                    cmd    = new SqlCommand(sSql, conn, tran);
                    sdr    = cmd.ExecuteReader();
                    dtTran.Load(sdr);
                    cmd.Dispose();
                    if (dtTran.Rows.Count > 0)
                    {
                        for (int a = 0; a < dtTran.Rows.Count; a++)
                        {
                            iRegTransId = Convert.ToInt32(CommFun.IsNullCheck(dtTran.Rows[a]["MaxNo"], CommFun.datatypes.vartypenumeric));
                        }
                    }

                    dtTran.Dispose();


                    tran.Commit();
                }
                catch (Exception ex)
                {
                    BsfGlobal.CustomException(ex.Message, ex.StackTrace);
                }
                finally
                {
                    BsfGlobal.g_CRMDB.Close();
                    //conn.Close();
                    //conn.Dispose();
                }
            }
            return(iRegTransId);
        }
Example #22
0
        /// <summary>
        /// 查询列表数据
        /// </summary>
        /// <param name="nvc">参数集合</param>
        /// <returns></returns>
        public ZdCouponUsedListModel Query(NameValueCollection nvc)
        {
            ZdCouponUsedListModel model  = new ZdCouponUsedListModel();
            MZdCouponUsed         entity = new MZdCouponUsed();

            model.PageSize = CommFun.ToInt(nvc["ps"],
                                           SettingHelper.Instance.GetInt("PageSize", 10)).Value;
            model.PageIndex = CommFun.ToInt(nvc["pi"],
                                            SettingHelper.Instance.GetInt("PageIndex", 0)).Value + 1;
            entity.SetData(nvc, false);
            entity.AddData(":PS", model.PageSize);
            entity.AddData(":PI", model.PageIndex);
            //时间
            DateTime starttime = CommFun.ToDateTime(nvc["s"], DateTime.Now.AddDays(-1)).Value;
            DateTime endtime   = CommFun.ToDateTime(nvc["e"], DateTime.Now).Value.AddDays(1);

            entity.AddData(":ST", " t.use_time>=to_date('" + starttime + "','yyyy-mm-dd  hh24:mi:ss')");
            entity.AddData(":ET", "t.use_time<to_date('" + endtime + "','yyyy-mm-dd  hh24:mi:ss')");

            //关键字
            string keyWords = CommFun.GetString(nvc["KeyWords"]);

            if (!string.IsNullOrEmpty(keyWords))
            {
                int?type = CommFun.ToInt(nvc["keytype"], null);
                if (type == 1)
                {
                    entity.OrderNo = keyWords;
                }
                else if (type == 2)
                {
                    entity.DownOrderNo = keyWords;
                }
                else if (type == 3)
                {
                    entity.CouponPrice = CommFun.ToDecimal(keyWords, null);
                }
            }
            model.TotalCount = CommFun.ToInt(handler.GetScalarByXmlTemplate("getCount", entity), 0).GetValueOrDefault();
            if (model.TotalCount > 0)
            {
                model.List = handler.GetDataListByTemplate("getList", entity);
            }
            return(model);
        }
Example #23
0
        public CheckCode()
        {
            string checkname = CommFun.GetQueryString("name");
            string color     = CommFun.GetQueryString("color");
            string height    = CommFun.GetQueryString("height");
            string width     = CommFun.GetQueryString("width");
            string fontsize  = CommFun.GetQueryString("size");
            string offset    = CommFun.GetQueryString("offset");
            string bgcolor   = CommFun.GetQueryString("bgcolor");

            base.checkname = string.IsNullOrEmpty(checkname) ? "admin" : checkname;
            base.codeH     = string.IsNullOrEmpty(height) ? 43 : int.Parse(height);
            base.codeW     = string.IsNullOrEmpty(width) ? 100 : int.Parse(width);
            base.fontSize  = string.IsNullOrEmpty(fontsize) ? 17 : int.Parse(fontsize);
            base.yPianyi   = string.IsNullOrEmpty(offset) ? 0 : int.Parse(offset);
            base.CodeColor = string.IsNullOrEmpty(color) ? "" : color;
            base.BackColor = string.IsNullOrEmpty(bgcolor) ? "" : bgcolor;
        }
Example #24
0
        public IResult OrderManaul(string id, string user, string manaul, string remark)
        {
            var paramErrcode = new OracleParameter("v_out_status", OracleDbType.Varchar2, 10, ErrorCode.Failure, System.Data.ParameterDirection.Output);
            var paramMsg     = new OracleParameter("v_out_msg", OracleDbType.Varchar2, 20, "", System.Data.ParameterDirection.Output);

            dbAccess.DbProvider.GetDataSetByProcedure("sp_pay_manual",
                                                      new OracleParameter("v_order_no", id),
                                                      new OracleParameter("v_result", manaul),
                                                      new OracleParameter("v_user", user),
                                                      new OracleParameter("v_remark", remark),
                                                      paramErrcode,
                                                      paramMsg
                                                      );
            int     errCode = CommFun.ToInt(paramErrcode.Value, ErrorCode.Failure).Value;
            IResult result  = new Result(errCode == 100, paramMsg.Value.ToString());

            return(result);
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["admin_name"] == null)
     {
         Response.Redirect("../SessionTimeOut.aspx?type=top");
     }
     if (!CommFun.IsAdmin(Session["admin_name"].ToString()))
     {
         Response.Redirect("../SessionTimeOut.aspx?type=isnotadmin");
     }
     if (!IsPostBack)
     {
         DataView dv = DBFun.GetDataView("select * from master;");
         GridView1.DataSource = dv;
         GridView1.DataBind();
         Session["dv_detail"] = dv;
     }
 }
Example #26
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                try
                {
                    CommFun.IsAdmin();

                    string strqry = "select * From T_HotSearch order by scount desc";
                    GridView1.DataSource = DBFun.GetDataView(strqry);
                    GridView1.DataBind();
                }
                catch (Exception ex)
                {
                    Response.Write("执行时出错!" + ex.Message);
                }
            }
        }
Example #27
0
    public static void IsAdmin()
    {
        //查看是否为超级管理员
        string Ip = HttpContext.Current.Request.UserHostAddress;

        //if (ConfigurationManager.AppSettings["ServerIP"].ToString() != Ip)
        //if (ConfigurationManager.AppSettings["ServerIP"].ToString().IndexOf(Ip) == -1)
        if (1 == 2)
        {
            HttpContext.Current.Response.Write("<script>alert('你没有权限进入本页操作!');history.go(-1);</script>");
            HttpContext.Current.Response.End();
        }
        if (!CommFun.HasReg())
        {
            HttpContext.Current.Response.Write("软件未得到授权!请与开发商联系注册本系统。");
            HttpContext.Current.Response.End();
        }
    }
Example #28
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["admin_id"] == null)
     {
         Response.Write("<script>alert('页面失效,请您重新登录!');location.href = './admin_login.aspx?type=renshi';</script>");
         return;
     }
     if (CommFun.IsTimeOut("zgj", Session["admin_id"].ToString()))
     {
         Response.Write("<script>alert('您已经提交,不能再访问该页面!');location.href = './main.aspx','_main';</script>");
         return;
     }
     if (!IsPostBack)
     {
         bindData();
         this.btn_commit.Attributes.Add("onclick", "return   confirm   (\"一旦提交就不可以在修改了,确定要提交吗?\");");
     }
 }
Example #29
0
    protected void btn_commit_Click(object sender, EventArgs e)
    {
        string str_sql = "select count(*) from zjry where flag = 1 and zj_sfzh='" + Session["admin_id"].ToString() +
                         "' and cpry_sfzh='" + lbl_cpry_sfzh.Text + "'";
        string ls_content = ftb_content.Text.Replace("'", "’");
        int    i_count    = CommFun.StringCounter(ftb_content.HtmlStrippedText);

        if (i_count > 180 || i_count < 50)
        {
            Response.Write("<script>alert('内容应在50~150字之间!');</script>");
            return;
        }
        //if (ls_content == null || ls_content == "")
        //{
        //    Response.Write("<script>alert('推荐或不推荐理由不能为空!');</script>");
        //    return;
        //}
        if (DBFun.ExecuteScalar(str_sql).ToString() == "1")
        {
            str_sql = string.Format("update zjry set fs_pjys1 = '{0}',fs_pjys2 = '{1}',fs_pjys3 = '{2}',fs_pjys4 = '{3}'," +
                                    " fs_pjys5 = '{4}',fs_pjys6 = '{5}',fs_pjys_sum = '{6}',fs_sftj = '{7}',jypj = '{8}',psrq = '{9}'" +
                                    " where flag = 1 and zj_sfzh='{10}' and cpry_sfzh='{11}'",
                                    rbtnlist_1.SelectedValue, rbtnlist_2.SelectedValue, rbtnlist_3.SelectedValue, rbtnlist_4.SelectedValue,
                                    rbtnlist_5.SelectedValue, rbtnlist_6.SelectedValue, lbl_sum.Text, rbtnlist_tuijian.SelectedValue,
                                    ls_content, DateTime.Now.ToString("yyyy-MM-dd"), Session["admin_id"].ToString(), lbl_cpry_sfzh.Text);
        }
        else
        {
            str_sql = string.Format("insert into zjry (fs_pjys1,fs_pjys2,fs_pjys3,fs_pjys4,fs_pjys5,fs_pjys6," +
                                    " fs_pjys_sum,fs_sftj,jypj,psrq,zj_sfzh,cpry_sfzh,flag) " +
                                    " values('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}','{10}','{11}',{12});",
                                    rbtnlist_1.SelectedValue, rbtnlist_2.SelectedValue, rbtnlist_3.SelectedValue, rbtnlist_4.SelectedValue,
                                    rbtnlist_5.SelectedValue, rbtnlist_6.SelectedValue, lbl_sum.Text, rbtnlist_tuijian.SelectedValue,
                                    ls_content, DateTime.Now.ToString("yyyy-MM-dd"), Session["admin_id"].ToString(), lbl_cpry_sfzh.Text, 1);
        }
        if (DBFun.ExecuteUpdate(str_sql))
        {
            Response.Write("<script>alert('评分成功!');</script>");
        }
        else
        {
            Response.Write("<script>alert('评分失败!');</script>");
        }
    }
Example #30
0
        public OrderDeliveryListModel ReviewQuery(NameValueCollection nvc)
        {
            OrderDeliveryListModel model  = new OrderDeliveryListModel();
            MOrderDelivery         entity = new MOrderDelivery();

            model.PageSize = CommFun.ToInt(nvc["ps"],
                                           SettingHelper.Instance.GetInt("PageSize", 10)).Value;
            model.PageIndex = CommFun.ToInt(nvc["pi"],
                                            SettingHelper.Instance.GetInt("PageIndex", 0)).Value + 1;
            entity.SetData(nvc, false);
            entity.TrimEmptyProperty();
            entity.AddData(":PS", model.PageSize);
            entity.AddData(":PI", model.PageIndex);
            DateTime st = CommFun.ToDateTime(nvc["s"], DateTime.Now.AddDays(-1)).Value;
            DateTime et = CommFun.ToDateTime(nvc["t"], DateTime.Now).Value;

            entity.AddData("ST", st.ToString("yyyy-MM-dd"));
            entity.AddData("ET", et.ToString("yyyy-MM-dd"));

            string keyWord = CommFun.GetString(nvc["KeyWords"]);

            if (!string.IsNullOrEmpty(keyWord))
            {
                int?type = CommFun.ToInt(nvc["keytype"], null);
                switch (type)
                {
                case 1:
                    entity.OrderNo = nvc["KeyWords"];
                    break;

                case 2: entity.DeliveryId = CommFun.ToLong(nvc["KeyWords"], -1);
                    break;

                case 3: entity.UpOrderNo = nvc["KeyWords"];
                    break;
                }
            }
            model.TotalCount = CommFun.ToInt(handler.GetScalarByXmlTemplate("getReviewCount", entity), 0).GetValueOrDefault();
            if (model.TotalCount > 0)
            {
                model.List = handler.GetDataListByTemplate("getReviewList", entity);
            }
            return(model);
        }