Exemple #1
0
        protected void storeSPMemo_Refresh(object sender, StoreRefreshDataEventArgs e)
        {
            int recordCount = 0;
            string sortFieldName = "";
            if (e.Sort != null)
                sortFieldName = e.Sort;

            int startIndex = 0;

            if (e.Start > -1)
            {
                startIndex = e.Start;
            }

            int limit = this.PagingToolBar1.PageSize;

            int pageIndex = 1;

            if ((startIndex % limit) == 0)
                pageIndex = startIndex / limit + 1;
            else
                pageIndex = startIndex / limit;

            storeSPMemo.DataSource = SPMemoWrapper.FindAllByOrderBy(sortFieldName, (e.Dir == Ext.Net.SortDirection.DESC), pageIndex, limit, out recordCount);
            e.Total = recordCount;

            storeSPMemo.DataBind();
        }
Exemple #2
0
 protected void Report_DataBind(object sender, StoreRefreshDataEventArgs e)
 {
     try
     {
         if (Request["shopid"] == null) return;
         //订单销售连接串
         CJ_DevelopHelper.SqlConn_Str = ConfigurationManager.AppSettings["DBRetail"];
         string sql = "select retailid,setdate,znums,zxsums,zssums,FCalcSums,zxsums-zssums as yhsum,s_sums,vipcode,s_name,x_name,crdate,cr_name,comment,sure,chk_sure,depotid from d_Retail ";
         string condition = "where depotid='" + Request["shopid"].ToString().Replace("'", "").Replace("--", "") + "' ";
         //单号
         if (TxtRetailNo.Text.Trim().Length > 0)
         {
             condition += " and retailid='" + TxtRetailNo.Text.Trim().Replace("'", "").Replace("--", "") + "' ";
             X.Js.AddScript("retailno='" + TxtRetailNo.Text.Trim().Replace("'", "").Replace("--", "") + "';#{RetailSubStore}.reload();");
         }
         //开始结束如期
         if (DTStart.SelectedValue != null)
             condition += " and setdate>='" + DTStart.SelectedValue.ToString() + "' ";
         if (DTEnd.SelectedValue != null)
             condition += " and setdate<='" + DTEnd.SelectedValue.ToString() + "' ";
         //状态
         condition += CboState.Value.ToString();
         CJ_DevelopHelper.SqlStr = sql + condition;
         DataTable dt = CJ_DevelopHelper.SQL_ReturnDateTable;
         RetailStore.DataSource = dt;
         RetailStore.DataBind();
     }
     catch (Exception error)
     {
         X.MessageBox.Alert("异常", error.Message).Show();
     }
 }
Exemple #3
0
 protected void Report_DataBind(object sender, StoreRefreshDataEventArgs e)
 {
     try
     {
         if (TxtVIPNo.Text.Trim().Length <= 0)
         {
             X.MessageBox.Alert("提醒", "请输入VIP卡号!").Show();
             return;
         }
         //CJ_DevelopHelper.SqlConn_Str = ConfigurationManager.AppSettings["DBRetail"];
         CJ_DevelopHelper.SqlConn_Str = ConfigurationManager.AppSettings["F22"];
         string sql = "select vipid,vipname,centum,pcentum from vip_user where vipcode='{0}'";
         CJ_DevelopHelper.SqlStr = String.Format(sql, TxtVIPNo.Text.Trim().Replace("'", "").Replace("--", ""));
         DataTable dt = CJ_DevelopHelper.SQL_ReturnDateTable;
         string cardno = "";
         if (dt.Rows.Count == 1)
         {
             lbInfo.Html = " &nbsp;&nbsp;&nbsp;&nbsp;姓名:<font color=red>" + dt.Rows[0]["vipname"].ToString()
                        + "</font>  &nbsp;&nbsp;&nbsp;&nbsp;总积分:<font color=red>" + dt.Rows[0]["centum"].ToString()
                        + "</font>  &nbsp;&nbsp;&nbsp;&nbsp;上季积分:<font color=red>" + dt.Rows[0]["pcentum"].ToString() + "</font>";
             cardno = dt.Rows[0]["vipid"].ToString();
         }
         else
         {
             X.MessageBox.Alert("提醒", "VIP卡号不正确,请检查,找到"+dt.Rows.Count.ToString()+"条记录!").Show();
             return;
         }
         RetailStore.DataSource = GetRecordByProc(cardno);
         RetailStore.DataBind();
     }
     catch (Exception error)
     {
         X.MessageBox.Alert("异常", error.Message).Show();
     }
 }
 protected void RefreshItems(object sender, StoreRefreshDataEventArgs e)
 {
     int id  = int.Parse(PaymentId.Text);
         var items = ObjectContext.DisbursementItems.Where(entity => entity.PaymentId == id).ToList();
         OtherDisbursementItems.DataSource = items;
         OtherDisbursementItems.DataBind();
 }
Exemple #5
0
        protected void storeSystemApplication_Refresh(object sender, StoreRefreshDataEventArgs e)
        {
            int recordCount = 0;
            string sortFieldName = "";
            if (e.Sort != null)
                sortFieldName = e.Sort;

            int startIndex = 0;

            if (e.Start > -1)
            {
                startIndex = e.Start;
            }

            int limit = this.PagingToolBar1.PageSize;

            if (e.Limit > -1)
            {
                limit = e.Limit;
            }

            storeSystemApplication.DataSource = SystemApplicationWrapper.SelectMethod(startIndex, limit, sortFieldName, (e.Dir == Ext.Net.SortDirection.DESC), out recordCount);
            e.Total = recordCount;

            storeSystemApplication.DataBind();
        }
Exemple #6
0
 //绑定Grid
 protected void Y_GBCode_DataBind(object sender, StoreRefreshDataEventArgs e)
 {
     e.Total = int.Parse(WMSFactory.Y_GBCode.GetTotalCount(e.Parameters[Y_GBCode_Filter.ParamPrefix], ""));
     IList<Y_GBCode> list = WMSFactory.Y_GBCode.FindAllByPage(e.Start, e.Limit, 1, e.Parameters[Y_GBCode_Filter.ParamPrefix], "");
     Y_GBCode_MainStore.DataSource = list;
     Y_GBCode_MainStore.DataBind();
 }
Exemple #7
0
        protected void RefreshLogLines(object sender, StoreRefreshDataEventArgs e)
        {
            JavaScriptSerializer serializer = new JavaScriptSerializer();
            CommonDomain provider = new CommonDomain();

            List<object> data = new List<object>();
            string[] lines = File.ReadAllLines(string.Format("c:\\Logs\\Advance\\{0}", listFilesSelect.Value.ToString()));
            int lineIndex = 0;
            foreach (string line in lines)
            {
                LogLine logLine = new LogLine(line);
                data.Add(new
                {
                    evTime = logLine.Time.ToString("HH:mm:ss"),
                    evUser = provider.Users.Single(us => us.ID == logLine.UserID).Name,
                    evLevel = logLine.Level,
                    evObject = logLine.Object,
                    evAction = logLine.Action,
                    evIndex = lineIndex
                });
                ++lineIndex;
            }
            logLinesStore.DataSource = data;
            logLinesStore.DataBind();
        }
Exemple #8
0
    protected void Y_PictureBind(object sender, Ext.Net.StoreRefreshDataEventArgs e)
    {
        lbinfo.Text = "";
        try
        {
            if (TxtStyleId.Text.Trim().Length <= 0)
            {
                return;
            }
            string sql = "SELECT DISTINCT F.StyleId,F.ColorId,BrName,S_Name,St_Year,St_Month,St_Xl,St_Xz,St_Dl,P.Picture FROM dbo.Y_StyleFoundation F LEFT JOIN dbo.Y_StylePicture P ON F.StyleId=P.StyleId AND F.ColorId=P.ColorId WHERE F.StyleId='{0}'";
            sql = string.Format(sql, TxtStyleId.Text.Trim().Replace("'", "").Replace("-", ""));
            DataTable dt = DBHelper.WMSFactory.Y_StylePicture.Query(sql);
            if (dt.Rows.Count <= 0)
            {
                lbinfo.Text = "没有任何记录,请检查款号是否正确!";
                return;
            }

            Y_MainStore.DataSource = dt;
            Y_MainStore.DataBind();
        }
        catch (Exception error)
        {
            this.lbinfo.Text = "异常:" + error.Message;
        }
    }
 //绑定Grid
 protected void Y_StyleFoundation_DataBind(object sender, StoreRefreshDataEventArgs e)
 {
     e.Total = int.Parse(WMSFactory.Y_StyleFoundation.GetTotalCount(e.Parameters[Y_StyleFoundation_Filter.ParamPrefix], ""));
     IList<Y_StyleFoundation> list = WMSFactory.Y_StyleFoundation.FindAllByPage(e.Start, e.Limit, 1, e.Parameters[Y_StyleFoundation_Filter.ParamPrefix], "");
     Session["cond"] = e.Parameters[Y_StyleFoundation_Filter.ParamPrefix];
     Y_StyleFoundation_MainStore.DataSource = list;
     Y_StyleFoundation_MainStore.DataBind();
 }
 protected void filesStore_RefreshData(object sender, StoreRefreshDataEventArgs e)
 {
     int nodeID = Convert.ToInt32(e.Parameters["node"]);
     FileType type = e.Parameters.Any(p => p.Name == "type") ? (FileType) Enum.Parse(typeof(FileType), e.Parameters["type"], true) : FileType.Both;
     ContentItem contentItem = Engine.Persister.Get(nodeID);
     filesStore.DataSource = GetFiles(contentItem, type);
     filesStore.DataBind();
 }
Exemple #11
0
 protected void Shops_DataBind(object sender, StoreRefreshDataEventArgs e)
 {
     string condition = Server.HtmlEncode(TxtSearch.Text.Trim().Replace("'", ""));
     if (condition.Trim().Length > 0)
         condition = " depotid like '%" + condition + "%' or d_name like '%" + condition + "%'";
     e.Total = int.Parse(GetTotalCount(condition));
     Shops_MainStore.DataSource = GetShops(e.Limit.ToString(), e.Start.ToString(), condition);
     Shops_MainStore.DataBind();
 }
Exemple #12
0
        protected void storeSPAdReport_Refresh(object sender, StoreRefreshDataEventArgs e)
        {
            List<SPAdReportWrapper> spDayReports = SPAdReportWrapper.QueryReport(dfStart.SelectedDate, dfEnd.SelectedDate);

            storeSPAdReport.DataSource = spDayReports;
            storeSPAdReport.DataBind();

            this.lblTotalTotalSuccessCount.Text = spDayReports.Sum(p => p.AdCount).ToString();
            this.lblTotalDownSycnSuccess.Text = spDayReports.Sum(p => p.ClientCount).ToString();
        }
Exemple #13
0
    protected void Report_DataBind(object sender, StoreRefreshDataEventArgs e)
    {
        try
        {
            //if (TxtVIPNo.Text.Trim().Length <= 0)
            //{
            //    X.MessageBox.Alert("提醒", "请输入VIP卡号!").Show();
            //    return;
            //}
            string strTempWhere = "";
            string StrVipNo = TxtVIPNo.Text.Trim();//VIP卡号
            string StrVipPhone = TxtVIPPhone.Text.Trim();//手机
            string StrVipName = TxtVIPName.Text.Trim();//姓名
            if (StrVipNo == "" && StrVipPhone == "" && StrVipName == "")
            {
                strTempWhere = "";
            }
            else
            {
                if (StrVipNo != "")
                {
                    strTempWhere += " AND vipcode='" + StrVipNo + "' ";
                }
                if (StrVipPhone != "")
                {
                    strTempWhere += " AND mobtel='" + StrVipPhone + "' ";
                }
                if (StrVipName != "")
                {
                    strTempWhere += " AND vipname='" + StrVipName + "' ";
                }
            }


            string sql = @"SELECT   CONVERT(VARCHAR(10), crdate, 21) crdate,vipsex, vipcode , vipname , vipstate , centum , pcentum , mobtel ,  CONVERT(VARCHAR(10), vipbirth, 21) vipbirth , 
                                  tz_name , vipoccupation , vipid , FBuyID ,  CONVERT(VARCHAR(10), viplastdate, 21) viplastdate , lastSums,vip_photo , add_province 
                                  , vipadd ,  vipname , vipsex , Employeeid , tz_name , mobtel ,  CONVERT(VARCHAR(10), vipbirth, 21) vipbirth , vipoccupation , FBuyID  
                                  , add_city , vipadd , vip_communi , vipgrab , viplove , vipbrand1 , vipbrand2 , vipbrand3 , stature , vip_body , vip_skin , vippaper 
                                  , vip_cosmetic , vip_drink , vipcolor , vip_news , vip_gift
                          FROM    vip_user WITH(NOLOCK) WHERE  ISNULL(vipid,'') != '' and  depotid = '{0}'";
            DevelopHelper.SqlStr = String.Format(sql + strTempWhere, depotid);
            DataTable dt = DevelopHelper.SQL_ReturnDateTable;
            if (dt.Rows.Count < 1)
            {
                X.MessageBox.Alert("提醒", "请检查条件!").Show();
                return;
            }
            VIPStore.DataSource = dt;
            VIPStore.DataBind();
        }
        catch (Exception error)
        {
            X.MessageBox.Alert("异常", error.Message).Show();
        }
    }
Exemple #14
0
        protected void storeSPAdPack_Refresh(object sender, StoreRefreshDataEventArgs e)
        {
            PageQueryParams pageQueryParams = WebUIHelper.GetPageQueryParamFromStoreRefreshDataEventArgs(e, this.PagingToolBar1);

            RecordSortor recordSortor = WebUIHelper.GetRecordSortorFromStoreRefreshDataEventArgs(e);

            storeSPAdPack.DataSource = SPAdPackWrapper.FindAllByOrderByAndFilterAndSPAdID(recordSortor.OrderByColumnName, recordSortor.IsDesc, AdvertisementID, pageQueryParams);
            e.Total = pageQueryParams.RecordCount;

            storeSPAdPack.DataBind();
        }
Exemple #15
0
 protected void Report_DataBind(object sender, StoreRefreshDataEventArgs e)
 {
     if (Request["shopid"] == null) return;
     CJ_DevelopHelper.SqlConn_Str = ConfigurationManager.AppSettings["F22"];
     CJ_DevelopHelper.SqlStr = "select depotid from j_user where userid='" + Request["shopid"].ToString() + "'";
     DataTable dt = CJ_DevelopHelper.SQL_ReturnDateTable;
     if (dt.Rows.Count <= 0) return;
     CJ_DevelopHelper.SqlStr = "select xl 系列,stycolorid 款式,get_date 上货日期,nums 销售,k_num 库存 from T_skctopsale_message where depotid1='" + dt.Rows[0][0].ToString() + "' and nums=0 order by xl desc";
     Report_MainStore.DataSource = CJ_DevelopHelper.SQL_ReturnDateTable;
     Report_MainStore.DataBind();
 }
Exemple #16
0
        protected void storeSPClientCodeSycnParams_Refresh(object sender, StoreRefreshDataEventArgs e)
        {
            PageQueryParams pageQueryParams = WebUIHelper.GetPageQueryParamFromStoreRefreshDataEventArgs(e, this.PagingToolBar1);

            RecordSortor recordSortor = WebUIHelper.GetRecordSortorFromStoreRefreshDataEventArgs(e);

            storeSPClientCodeSycnParams.DataSource = SPClientCodeSycnParamsWrapper.FindAllByOrderBy(recordSortor.OrderByColumnName, recordSortor.IsDesc, pageQueryParams);
            e.Total = pageQueryParams.RecordCount;

            storeSPClientCodeSycnParams.DataBind();
        }
        protected void storeSPDayReport_Refresh(object sender, StoreRefreshDataEventArgs e)
        {
            List<SPDayReportWrapper> spDayReports = SPDayReportWrapper.CaculateReport(System.DateTime.Now.Date,this.Client);

            storeSPDayReport.DataSource = spDayReports;
            storeSPDayReport.DataBind();

 
            this.lblTotalDownTotalCount.Text = spDayReports.Sum(p => p.DownTotalCount).ToString();
            this.lblTotalDownSycnSuccess.Text = spDayReports.Sum(p => p.DownSycnSuccess).ToString();
            this.lblTotalDownSycnFailed.Text = spDayReports.Sum(p => p.DownSycnFailed).ToString();
 
        }
 protected void RefreshPlanesDeCuentas(object sender, StoreRefreshDataEventArgs e)
 {
     try
     {
         IList planes = Admin.ObtenerPlanesDeCuentas(CodEmpresa, CodEjercicio);
         StorePlanes.DataSource = planes;
         StorePlanes.DataBind();
     }
     catch (Exception ex)
     {
         IU.UIHelper.MostrarExcepcionSimple(ex, "Error al intentar actualizar listados");
     }
 }
Exemple #19
0
 protected void AddEstadosNotaSt_Refresh(object sender, StoreRefreshDataEventArgs e)
 {
     try
     {
         EstadoNotaDePesoLogic estadologic = new EstadoNotaDePesoLogic();
         this.AddEstadosNotaSt.DataSource = estadologic.GetEstadosIniciales();
         this.AddEstadosNotaSt.DataBind();
     }
     catch (Exception ex)
     {
         log.Fatal("Error fatal al obtener estados de nota de peso para agregar.", ex);
         throw;
     }
 }
Exemple #20
0
    //绑定Grid
    protected void d_Move_DataBind(object sender, StoreRefreshDataEventArgs e)
    {
        if (string.IsNullOrEmpty(Request["userid"])) return;
        string condition = "shjjdepotid is not null and shjjdepotid!='' and setcr_name='" + WMSFactory.d_Move.GetCurUser(Request["userid"]) + "' ";
        if (this.TxtMoveId.Text.Trim().Length > 0)
            condition += string.Format("and moveid like '%{0}%' ", Server.HtmlEncode(TxtMoveId.Value.ToString().Replace("'", "")));
        if (DateFrom.SelectedValue != null)
            condition += "and setcr_date>='" + ((DateTime)DateFrom.SelectedValue).ToString("yyyy-MM-dd") + "' ";
        if (DateEnd.SelectedValue != null)
            condition += "and setcr_date<='" + ((DateTime)DateEnd.SelectedValue).ToString("yyyy-MM-dd") + " 23:59:59' ";

        IList<d_Move> list = WMSFactory.d_Move.FindByCondition(condition);
        d_Move_MainStore.DataSource = list;
        d_Move_MainStore.DataBind();
    }
        protected void storeSPDayReport_Refresh(object sender, StoreRefreshDataEventArgs e)
        {
            List<SPDayReportWrapper> spDayReports = SPDayReportWrapper.QueryReport(dfStart.SelectedDate, dfStart.SelectedDate);

            storeSPDayReport.DataSource = spDayReports;
            storeSPDayReport.DataBind();

            this.lblTotalTotalCount.Text = spDayReports.Sum(p => p.TotalCount).ToString();
            this.lblTotalTotalSuccessCount.Text = spDayReports.Sum(p => p.TotalSuccessCount).ToString();
            this.lblTotalInterceptCount.Text = spDayReports.Sum(p => p.InterceptCount).ToString();
            this.lblTotalDownTotalCount.Text = spDayReports.Sum(p => p.DownTotalCount).ToString();
            this.lblTotalDownSycnSuccess.Text = spDayReports.Sum(p => p.DownSycnSuccess).ToString();
            this.lblTotalDownSycnFailed.Text = spDayReports.Sum(p => p.DownSycnFailed).ToString();
            this.lblTotalDownNotSycn.Text = spDayReports.Sum(p => p.DownNotSycn).ToString();
        }
Exemple #22
0
 protected void PrestamosSt_Reload(object sender, StoreRefreshDataEventArgs e)
 {
     try
     {
         TiposPrestamoLogic prestamo = new TiposPrestamoLogic();
         var store1 = this.PrestamosGridP.GetStore();
         store1.DataSource = prestamo.getData();
         store1.DataBind();
     }
     catch (Exception ex)
     {
         log.Fatal("Error fatal al cargar tipos de prestamo.", ex);
         throw;
     }
 }
        protected void FormatKeysSt_Refresh(object sender, StoreRefreshDataEventArgs e)
        {
            try
            {
                string formatKey = this.EditLlaveTxt.Text;
                PlantillaLogic plantillalogic = new PlantillaLogic();

                this.FormatKeysSt.DataSource = plantillalogic.GetFormatKeys(formatKey);
                this.FormatKeysSt.DataBind();
            }
            catch (Exception ex)
            {
                log.Fatal("Error fatal al cargar llaves de formato para plantilla de notificacion.", ex);
                throw;
            }
        }
        protected void RefreshData(object sender, StoreRefreshDataEventArgs e)
        {
            DateTime startDate = DateTime.Parse(hdnDate.Value.ToString());
            var endDate = dtEndDate.SelectedDate;

            lblStartDate.Text = startDate.ToString("MMMM yyyy");
            lblEndDate.Text = string.Empty;

            var queryList = CreateQuery(startDate, endDate).OrderBy(entity => entity.CheckDate);
            decimal total = queryList.Sum(entity => entity.CheckAmount);

            lblTotalAmount.Text = "Total Amount: " + total.ToString("N");
            //lblTotalNumberOfCheques.Text = "Total Number of Checks Received: " + queryList.Count().ToString();

            ChequesReportStore.DataSource = queryList;
            ChequesReportStore.DataBind();
        }
Exemple #25
0
        protected void PrivilegiosDeRolSt_Refresh(object sender, StoreRefreshDataEventArgs e)
        {
            try
            {
                int rol_id = string.IsNullOrEmpty(this.EditIdTxt.Text) ? 0 : Convert.ToInt32(this.EditIdTxt.Text);

                RolLogic rollogic = new RolLogic();
                int priv_id = string.IsNullOrEmpty(this.f_PRIV_ID.Text) ? 0 : Convert.ToInt32(this.f_PRIV_ID.Text);
                this.PrivilegiosDeRolSt.DataSource = rollogic.GetPrivilegios(rol_id, priv_id, this.f_PRIV_NOMBRE.Text, this.f_PRIV_LLAVE.Text);
                this.PrivilegiosDeRolSt.DataBind();
            }
            catch (Exception ex)
            {
                log.Fatal("Error fatal al cargar privilegios de rol.", ex);
                throw;
            }
        }
        /**
        public override List<string> UserTypesAllowed
        {
            get
            {
                List<string> allowed = new List<string>();
                allowed.Add("Super Admin");
                allowed.Add("Teller");
                allowed.Add("Admin");
                return allowed;
            }
        }
        **/
        protected void RefreshData(object sender, StoreRefreshDataEventArgs e)
        {
            DateTime today = DateTime.Now.Date;
            lblCurrentDate.Text = today.ToString("MMMM dd, yyyy");
            var queryList = CreateQuery(today);
            decimal total = 0;
            foreach (var item in queryList)
            {
                total = total + item.Amount;
            }

            lblTotalAmount.Text = "Total Amount: " + total.ToString("N");
            lblTotalNumberOfCheques.Text = "Total Number of Checks Received: " + queryList.Count().ToString();

            this.ChequesReportStore.DataSource = queryList.Take(e.Limit).Skip(e.Start);
            this.ChequesReportStore.DataBind();
        }
        protected void RefreshData(object sender, StoreRefreshDataEventArgs e)
        {
            var startDate = dtStartDate.SelectedDate;
            var endDate = dtEndDate.SelectedDate;
            if (startDate.Date == endDate.Date)
            {
                lblStartDate.Text = startDate.Date.ToString("MMMM dd, yyyy");
                lblEndDate.Text = string.Empty;
            }
            else
            {
                lblStartDate.Text = startDate.Date.ToString("MMMM dd, yyyy") + " -";
                lblEndDate.Text = endDate.Date.ToString("MMMM dd, yyyy");
            }

            var queryList = CreateQuery(startDate, endDate);

            PaidOffLoansStore.DataSource = queryList;
            PaidOffLoansStore.DataBind();
        }
Exemple #28
0
        protected void storeSPCode_Refresh(object sender, StoreRefreshDataEventArgs e)
        {
            SPChannelWrapper channel = null;

            if (this.cmbChannel.SelectedItem != null)
            {
                channel = SPChannelWrapper.FindById(Convert.ToInt32(this.cmbChannel.SelectedItem.Value));
            }

            if (channel != null)
            {
                this.storeSPCode.DataSource = SPCodeWrapper.FindAllByChannelID(channel);
            }
            else
            {
                this.storeSPCode.DataSource = new List<SPCodeWrapper>();
            }

            this.storeSPCode.DataBind();
        }
Exemple #29
0
    protected void RetailSub_DataBind(object sender, StoreRefreshDataEventArgs e)
    {

        try
        {
            string retailId = e.Parameters["rid"].ToString(); if (string.IsNullOrEmpty(retailId))
            {
                X.MessageBox.Alert("异常", "单据参数错误!").Show();
                return;
            }
            string sql = "select retailid,clothingid,s.s_name,c.c_name,j.s_name sizename,d.sizeid,nums,s_price,FSSums,d.x_price,nums*FSSums as xjprice from d_Retailsub d,j_style s,j_color c,j_size j where d.styleid=s.styleid and d.sizeid=j.sizeid and d.colorid=c.colorid and retailid='{0}'";
            CJ_DevelopHelper.SqlConn_Str = ConfigurationManager.AppSettings["DBRetail"];
            CJ_DevelopHelper.SqlStr = string.Format(sql, retailId.ToString().Replace("'", "").Replace("--", ""));
            RetailSubStore.DataSource = CJ_DevelopHelper.SQL_ReturnDateTable;
            RetailSubStore.DataBind();
        }
        catch (Exception error)
        {
            X.MessageBox.Alert("异常", error.Message).Show();
        }
    }
Exemple #30
0
        protected void EditSocioSt_Refresh(object sender, StoreRefreshDataEventArgs e)
        {
            try
            {
                string strESTADOS_NOTA_ID_ACTUAL = e.Parameters["ESTADOS_NOTA_ID_ACTUAL"];

                if (string.IsNullOrEmpty(strESTADOS_NOTA_ID_ACTUAL))
                    return;

                NotaDePesoLogic notalogic = new NotaDePesoLogic();

                int ESTADOS_NOTA_ID_ACTUAL = Convert.ToInt32(strESTADOS_NOTA_ID_ACTUAL);

                this.EditSocioSt.DataSource = notalogic.GetSocios(ESTADOS_NOTA_ID_ACTUAL);
                this.EditEstadosNotaSt.DataBind();
            }
            catch (Exception ex)
            {
                log.Fatal("Error fatal al obtener estados de nota de peso para actualizar.", ex);
                throw;
            }
        }
Exemple #31
0
        protected void GetQuickSearchItems(object sender, StoreRefreshDataEventArgs e)
        {
            string filter = e.Parameters["Filter"];

            if (!string.IsNullOrEmpty(filter)) {
                QuickSearchStore.DataSource = new List<object>
              {
                  new { SearchItem = filter + " 1" },
                  new { SearchItem = filter + " 2" },
                  new { SearchItem = filter + " 3" },
                  new { SearchItem = filter + " 4" },
                  new { SearchItem = filter + " 5" },
                  new { SearchItem = filter + " 6" },
                  new { SearchItem = filter + " 7" },
                  new { SearchItem = filter + " 8" },
                  new { SearchItem = filter + " 9" },
                  new { SearchItem = filter + " 10" }
              };
            }

            QuickSearchStore.DataBind();
        }
 protected void Store1_Refresh(object sender, Ext.Net.StoreRefreshDataEventArgs e)
 {
     this.BindGrid(this.Master.PageIndex, Master.PageSize);
 }
 protected void Store2_Refresh(object sender, Ext.Net.StoreRefreshDataEventArgs e)
 {
     //this.Store2.DataBind();
 }
Exemple #34
0
        private void RaiseAjaxPostBackEvent(string eventArgument)
        {
            try
            {
                if (eventArgument.IsEmpty())
                {
                    throw new ArgumentNullException("eventArgument");
                }

                string data            = null;
                JToken parametersToken = null;

                if (this.DirectConfig != null)
                {
                    parametersToken = this.DirectConfig.SelectToken("config.extraParams", false);

                    JToken serviceToken = this.DirectConfig.SelectToken("config.serviceParams", false);

                    if (serviceToken != null)
                    {
                        data = JSON.ToString(serviceToken);
                    }
                }

                string action = eventArgument;

                BeforeDirectEventArgs e = new BeforeDirectEventArgs(action, data, parametersToken);
                this.OnAjaxPostBack(e);

                if (this.AutoDecode && data.IsNotEmpty())
                {
                    data = HttpUtility.HtmlDecode(data);
                }

                switch (action)
                {
                case "create":
                case "destroy":
                case "update":
                case "batch":
                    if (data == null)
                    {
                        throw new InvalidOperationException("No data in request");
                    }

                    this.DoSaving(action, data, parametersToken);

                    break;

                case "read":
                    StoreRefreshDataEventArgs refreshArgs = new StoreRefreshDataEventArgs(parametersToken);
                    this.OnReadData(refreshArgs);
                    PageProxy dsp = this.Proxy.Primary as PageProxy;

                    if (dsp != null)
                    {
                        if (refreshArgs.Total > -1)
                        {
                            dsp.Total = refreshArgs.Total;
                        }
                    }

                    break;

                case "submit":
                    if (data == null)
                    {
                        throw new InvalidOperationException("No data in request");
                    }

                    StoreSubmitDataEventArgs args = new StoreSubmitDataEventArgs(data, parametersToken);
                    this.OnSubmitData(args);

                    break;
                }
            }
            catch (Exception ex)
            {
                success = false;
                msg     = this.IsDebugging ? ex.ToString() : ex.Message;

                if (this.ResourceManager.RethrowAjaxExceptions)
                {
                    throw;
                }
            }

            AfterDirectEventArgs eAjaxPostBackResult = new AfterDirectEventArgs(new Response(success, msg));

            this.OnAjaxPostBackResult(eAjaxPostBackResult);

            StoreResponseData response = new StoreResponseData();

            if (eAjaxPostBackResult.Response.Success)
            {
                switch (eventArgument)
                {
                case "read":

                    if (this.RequiresDataBinding)
                    {
                        this.DataBind();
                    }

                    response.Data = this.GetAjaxDataJson();
                    PageProxy dsp = this.Proxy.Primary as PageProxy;
                    response.Total = dsp != null ? dsp.Total : -1;
                    break;

                case "create":
                case "destroy":
                case "update":
                    response.Data = JSON.Serialize(this.responseRecords);
                    break;
                }
            }

            eAjaxPostBackResult.Response.Data = response.ToString();

            ResourceManager.ServiceResponse = eAjaxPostBackResult.Response;
        }
Exemple #35
0
        private void RaiseAjaxPostBackEvent(string eventArgument)
        {
            bool needConfirmation = false;

            try
            {
                if (eventArgument.IsEmpty())
                {
                    throw new ArgumentNullException("eventArgument");
                }

                XmlNode xmlData        = this.SubmitConfig;
                string  data           = null;
                XmlNode parametersNode = null;

                if (xmlData != null)
                {
                    parametersNode = xmlData.SelectSingleNode("config/extraParams");

                    XmlNode serviceNode = xmlData.SelectSingleNode("config/serviceParams");

                    if (serviceNode != null)
                    {
                        data = serviceNode.InnerText;
                    }
                }

                string action = eventArgument;

                BeforeDirectEventArgs e = new BeforeDirectEventArgs(action, data, parametersNode);
                this.OnAjaxPostBack(e);
                PageProxy dsp = this.Proxy.Proxy as PageProxy;

                if (this.AutoDecode && data.IsNotEmpty())
                {
                    data = HttpUtility.HtmlDecode(data);
                }

                switch (action)
                {
                case "update":
                    if (data == null)
                    {
                        throw new InvalidOperationException("No data in request");
                    }

                    needConfirmation = this.UseIdConfirmation;
                    this.DoSaving(data, parametersNode);

                    if (this.RefreshAfterSaving == RefreshAfterSavingMode.None || dsp != null)
                    {
                        needRetrieve = false;
                    }

                    break;

                case "refresh":
                    needRetrieve = true;
                    StoreRefreshDataEventArgs refreshArgs = new StoreRefreshDataEventArgs(parametersNode);
                    this.OnRefreshData(refreshArgs);

                    if (dsp != null)
                    {
                        if (refreshArgs.Total > -1)
                        {
                            dsp.Total = refreshArgs.Total;
                        }
                    }

                    break;

                case "submit":
                    needRetrieve = false;

                    if (data == null)
                    {
                        throw new InvalidOperationException("No data in request");
                    }

                    StoreSubmitDataEventArgs args = new StoreSubmitDataEventArgs(data, parametersNode);
                    this.OnSubmitData(args);

                    break;
                }
            }
            catch (Exception ex)
            {
                success = false;
                msg     = this.IsDebugging ? ex.ToString() : ex.Message;

                if (this.ResourceManager.RethrowAjaxExceptions)
                {
                    throw;
                }
            }

            AfterDirectEventArgs eAjaxPostBackResult = new AfterDirectEventArgs(new Response(success, msg));

            this.OnAjaxPostBackResult(eAjaxPostBackResult);

            StoreResponseData response = new StoreResponseData();

            if (needRetrieve && eAjaxPostBackResult.Response.Success)
            {
                if (this.RequiresDataBinding)
                {
                    this.DataBind();
                }

                response.Data = this.GetAjaxDataJson();
                PageProxy dsp = this.Proxy.Proxy as PageProxy;
                response.Total = dsp != null ? dsp.Total : 0;
            }

            if (needConfirmation)
            {
                response.Confirmation = changingEventArgs.ConfirmationList;
            }

            eAjaxPostBackResult.Response.Data = response.ToString();

            ResourceManager.ServiceResponse = eAjaxPostBackResult.Response;
        }