예제 #1
0
        protected virtual void Page_Load(object sender, EventArgs e)
        {
            pagesize    = 20;
            PageBarHTML = "";
            if (HTTPRequest.GetString("page").Trim() != "" && Utils.IsInt(HTTPRequest.GetString("page").Trim()))
            {
                pageindex = int.Parse(HTTPRequest.GetString("page").Trim());
            }
            else
            {
                pageindex = 1;
            }
            MonthlyStatementID = HTTPRequest.GetInt("msid", 0);
            if (MonthlyStatementID > 0)
            {
                msi = MonthlyStatements.GetMonthlyStatementInfoModel(MonthlyStatementID);
                if (msi != null)
                {
                    dList = MonthlyStatements.GetMonthlyStatementWorkingLogInfoList(pagesize, pageindex, " MonthlyStatementID=" + MonthlyStatementID, out pagetotal, 1, "*");

                    PageBarHTML = Utils.TenPage(pageindex, pagetotal, 0, "");
                }
                else
                {
                    AddErrLine("参数错误!");
                }
            }
            else
            {
                AddErrLine("参数错误!");
            }
        }
        protected virtual void Page_Load(object sender, EventArgs e)
        {
            if (this.userid > 0)
            {
                if (CheckUserPopedoms("X") || CheckUserPopedoms("7-1-2"))
                {
                    dList = storehouseStorage.RegionName();                          //获得地区列表

                    getData    = Int32.Parse(HTTPRequest.GetString("sid"));          //获得url过来的产品ID
                    getName    = HTTPRequest.GetString("sname");                     //获得url过来的产品名称
                    getBarcode = HTTPRequest.GetString("scode");                     //获得url过来的产品条码
                    bDate      = Convert.ToDateTime(HTTPRequest.GetString("bDate")); //获得url过来的开始时间
                    eDate      = Convert.ToDateTime(HTTPRequest.GetString("eDate")); //获得url过来的结束时间
                }
                else
                {
                    AddErrLine("权限不足!");
                }
            }
            else
            {
                AddErrLine("请先登录!");
                SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
                SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
            }
        }
        protected virtual void Page_Load(object sender, EventArgs e)
        {
            if (this.userid > 0)
            {
                if (CheckUserPopedoms("X") || CheckUserPopedoms("7-2-1-5-4-1"))
                {
                    bool ShowMoney  = CheckUserPopedoms("7-2-1-5-4-2");
                    bool xshowMoney = CheckUserPopedoms("X");
                    if (ShowMoney || xshowMoney)
                    {
                        Show = "1";
                    }
                    //绑定仓库信息
                    wList = ProductsLossInfo.getWorehouseName();
                    //获取客户端日期
                    sDate = Utils.IsDateString(Utils.ChkSQL(HTTPRequest.GetString("sDate"))) ? DateTime.Parse(Utils.ChkSQL(HTTPRequest.GetString("sDate"))) : DateTime.Now.AddDays(-(DateTime.Now.Day) + 1);
                    eDate = Utils.IsDateString(Utils.ChkSQL(HTTPRequest.GetString("stDate"))) ? DateTime.Parse(Utils.ChkSQL(HTTPRequest.GetString("stDate"))) : DateTime.Now;
                    //获取客户端select值
                    associated = HTTPRequest.GetInt("_Associated", 0);
                    Act        = HTTPRequest.GetString("Act");
                    if (ispost)
                    {
                        if (ShowMoney || xshowMoney)
                        {
                            Show = "1";
                        }
                    }
                    else
                    {
                        if (Act.IndexOf("act") > -1)
                        {
                            rList = ProductsLossInfo.bindProductsLoss(sDate, eDate, associated, 0, 0);
                            DataTable dt = new DataTable();
                            DataSet   ds = new DataSet();
                            dt = rList.Copy();
                            ds.Tables.Add(dt);
                            ds.Tables[0].Columns[0].ColumnName = "仓库名称";
                            ds.Tables[0].Columns[1].ColumnName = "商品名称";
                            ds.Tables[0].Columns[2].ColumnName = "商品品牌";
                            ds.Tables[0].Columns[3].ColumnName = "商品条码";
                            ds.Tables[0].Columns[4].ColumnName = "装件数";
                            ds.Tables[0].Columns[5].ColumnName = "数量";
                            ds.Tables[0].Columns[6].ColumnName = "金额";

                            CreateExcel(ds.Tables[0], "仓库报损数据_" + DateTime.Now.ToString("yyyy-MM-dd") + ".xls");
                        }
                    }
                }
                else
                {
                    AddErrLine("权限不足!");
                }
            }
            else
            {
                AddErrLine("请先登录!");
                SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
                SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
            }
        }
예제 #4
0
 protected virtual void Page_Load(object sender, EventArgs e)
 {
     if (this.userid > 0)
     {
         if (CheckUserPopedoms("X") || CheckUserPopedoms("13"))
         {
             Act = HTTPRequest.GetString("Act");
             if (Act == "Del")
             {
                 try
                 {
                     tbErpOrderInfo.DeleteErpOrderInfo(HTTPRequest.GetString("eid"));
                     AddMsgLine("删除成功!");
                     AddScript("window.setTimeout('window.parent.HidBox();',1000);");
                 }
                 catch (Exception ex)
                 {
                     AddErrLine("创建失败!<br/>" + ex);
                     AddScript("window.setTimeout('window.parent.HidBox();',1000);");
                 }
             }
         }
         else
         {
             AddErrLine("权限不足!");
             AddScript("window.parent.HidBox();");
         }
     }
     else
     {
         AddErrLine("请先登录!");
         SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
         SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
     }
 }
예제 #5
0
        protected virtual void Page_Load(object sender, EventArgs e)
        {
            if (this.userid > 0)
            {
                if (CheckUserPopedoms("X") || CheckUserPopedoms("2-2-1"))
                {
                    pagesize    = 20;
                    PageBarHTML = "";

                    if (HTTPRequest.GetString("page").Trim() != "" && Utils.IsInt(HTTPRequest.GetString("page").Trim()))
                    {
                        pageindex = int.Parse(HTTPRequest.GetString("page").Trim());
                    }
                    else
                    {
                        pageindex = 1;
                    }

                    dList = tbStorageInfo.GetStorageInfoList(pagesize, pageindex, "", out pagetotal, 1, "*,(select sName from tbStaffInfo where StaffID = sManager) as  Manager");

                    PageBarHTML = Utils.TenPage(pageindex, pagetotal, 0);
                }
                else
                {
                    AddErrLine("权限不足!");
                    AddScript("window.parent.HidBox();");
                }
            }
            else
            {
                AddErrLine("请先登录!");
                SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
                SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            pagesize    = 20;
            PageBarHTML = "";

            if (this.userid > 0)
            {
                if (CheckUserPopedoms("X") || CheckUserPopedoms("3-4-6-2"))
                {
                    if (HTTPRequest.GetString("page").Trim() != "" && Utils.IsInt(HTTPRequest.GetString("page").Trim()))
                    {
                        pageindex = int.Parse(HTTPRequest.GetString("page").Trim());
                    }
                    else
                    {
                        pageindex = 1;
                    }
                    dList       = storehouseStorage.GetStorehouseInfoList(pagesize, pageindex, "", out pagetotal, 1, "*");
                    PageBarHTML = Utils.TenPage(pageindex, pagetotal, 0);
                }
                else
                {
                    AddErrLine("权限不足! ");
                }
            }
            else
            {
                AddErrLine("请先登录!");
                SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
                SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
            }
        }
예제 #7
0
 protected virtual void Page_Load(object sender, EventArgs e)
 {
     pagesize    = 20;
     PageBarHTML = "";
     if (this.userid > 0)
     {
         if (CheckUserPopedoms("X") || CheckUserPopedoms("5-6") || CheckUserPopedoms("3-4-5"))
         {
             StorageList = Caches.GetStorageInfoList("");
             if (HTTPRequest.GetString("page").Trim() != "" && Utils.IsInt(HTTPRequest.GetString("page").Trim()))
             {
                 pageindex = int.Parse(HTTPRequest.GetString("page").Trim());
             }
             else
             {
                 pageindex = 1;
             }
             dList       = tbStockProductInfo.GetWarehouseViewInfoList(pagesize, pageindex, "", out pagetotal, 1, "*");
             PageBarHTML = Utils.TenPage(pageindex, pagetotal, 0);
             AddScript("window.setTimeout('window.parent.HidBox();',1000);");
         }
         else
         {
             AddErrLine("权限不足!");
             AddScript("window.setTimeout('window.parent.HidBox();',1000);");
         }
     }
     else
     {
         AddErrLine("请先登录!");
         SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
         SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
     }
 }
예제 #8
0
 /// <summary>
 /// 验证用户信息
 /// </summary>
 public bool CheckUser()
 {
     userid   = Utils.StrToInt(Utils.GetCookie(config.CookieTag, "userid"), -1);
     password = UsersUtils.GetCookiePassword(config.Passwordkey);
     if (userid > 0)
     {
         userid   = tbUserInfo.CheckPassword(userid, password, false);
         UserCode = Utils.UrlEncode(DES.Encode(this.userid + "$|$" + password, config.Passwordkey));
     }
     else
     {
         if (HTTPRequest.GetString("UserCode").Trim() != "")
         {
             string UserCode = DES.Decode(HTTPRequest.GetString("UserCode").Trim(), config.Passwordkey);
             if (UserCode.Trim() != "")
             {
                 string[] UserCodeArr = Utils.SplitString(UserCode.Trim(), "$|$");
                 if (UserCodeArr.Length == 2)
                 {
                     userid   = Convert.ToInt32(UserCodeArr[0]);
                     password = UserCodeArr[1].Trim();
                     if (userid > 0)
                     {
                         userid = tbUserInfo.CheckPassword(userid, password, false);
                     }
                 }
             }
         }
     }
     return(userid > 0);
 }
 protected virtual void Page_Load(object sender, EventArgs e)
 {
     if (this.userid > 0)
     {
         CertificateID = Utils.StrToInt(HTTPRequest.GetString("cid"), 0);
         if (CertificateID > 0)
         {
             ci = Certificates.GetCertificateInfoModel(CertificateID);
             if (ci != null)
             {
                 dList = Certificates.GetCertificateWorkingLogList(" CertificateID=" + CertificateID + " order by cAppendTime desc").Tables[0];
             }
             else
             {
                 AddErrLine("凭证不存在!");
             }
         }
         else
         {
             AddErrLine("参数错误!");
         }
     }
     else
     {
         AddErrLine("请先登录!");
         SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
         SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
     }
 }
예제 #10
0
        protected virtual void Page_Load(object sender, EventArgs e)
        {
            pagesize    = 20;
            PageBarHTML = "";

            if (this.userid > 0)
            {
                if (CheckUserPopedoms("X") || CheckUserPopedoms("7"))
                {
                    if (HTTPRequest.GetString("page").Trim() != "" && Utils.IsInt(HTTPRequest.GetString("page").Trim()))
                    {
                        pageindex = int.Parse(HTTPRequest.GetString("page").Trim());
                    }
                    else
                    {
                        pageindex = 1;
                    }

                    dList = tbValenceInfo.GetValenceInfoList(pagesize, pageindex, "", out pagetotal, 1, "*,(select pName from tbProductsInfo where ProductsID=tbValenceInfo.[ProductsID]) as ProductsName");

                    PageBarHTML = Utils.TenPage(pageindex, pagetotal, 0);
                }
                else
                {
                    AddErrLine("权限不足!");
                }
            }
            else
            {
                AddErrLine("请先登录!");
                SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
                SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
            }
        }
예제 #11
0
        public decimal cdMoneyBSum = 0; //贷方合计金额

        protected virtual void Page_Load(object sender, EventArgs e)
        {
            if (this.userid > 0)
            {
                if (CheckUserPopedoms("X") || CheckUserPopedoms("6-7-7"))
                {
                    bDate = HTTPRequest.GetString("bDate").Trim();
                    eDate = HTTPRequest.GetString("eDate").Trim();
                    if (bDate.Trim() != "" && eDate.Trim() != "")
                    {
                        DateTime _bDate = Utils.IsDateString(bDate) ? DateTime.Parse(bDate) : DateTime.Parse(DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString() + "-1");
                        DateTime _eDate = Utils.IsDateString(eDate) ? DateTime.Parse(eDate) : DateTime.Parse(DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString() + "-" + DateTime.Now.Day.ToString());

                        dList = Certificates.GetCertificate_Summary(_bDate, _eDate, out cCount, out bCode, out eCode);
                    }
                    else
                    {
                        AddErrLine("参数错误!");
                    }
                }
                else
                {
                    AddErrLine("权限不足!");
                }
            }
            else
            {
                AddErrLine("请先登录!");
                SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
                SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
            }
        }
 protected virtual void Page_Load(object sender, EventArgs e)
 {
     if (this.userid > 0)
     {
         if (CheckUserPopedoms("X") || CheckUserPopedoms("7-2-4-2"))
         {
             if (ispost)
             {
                 dType = HTTPRequest.GetInt("dType", 0);
                 bDate = (HTTPRequest.GetString("bDate").Trim() != "") ? Convert.ToDateTime(HTTPRequest.GetString("bDate").Trim()) : DateTime.Now;
                 eDate = (HTTPRequest.GetString("eDate").Trim() != "") ? Convert.ToDateTime(HTTPRequest.GetString("eDate").Trim()) : DateTime.Now;
                 mList = tbStaffInfo.getStaffDetails(bDate, eDate, dType);
             }
         }
         else
         {
             AddErrLine("权限不足!");
         }
     }
     else
     {
         AddErrLine("请先登录!");
         SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
         SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.userid > 0)
            {
                if (CheckUserPopedoms("X") || CheckUserPopedoms("7-2-3-8"))
                {
                    sName    = HTTPRequest.GetString("sname");
                    sID      = HTTPRequest.GetInt("sid", 0);
                    pName    = HTTPRequest.GetString("pname");
                    pID      = HTTPRequest.GetInt("pid", 0);
                    pBarcode = HTTPRequest.GetString("pbarcode");
                    bDate    = Convert.ToDateTime(HTTPRequest.GetString("bDate"));
                    eDate    = Convert.ToDateTime(HTTPRequest.GetString("eDate"));
                    Act      = HTTPRequest.GetString("Act");

                    gList = CostDetails.getGiftCost_details(sID, pID, bDate, eDate);
                }
                else
                {
                    AddErrLine("权限不足!");
                }
            }
            else
            {
                AddErrLine("请先登录!");
                SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
                SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
            }
        }
예제 #14
0
        protected virtual void Page_Load(object sender, EventArgs e)
        {
            pagesize    = 20;
            PageBarHTML = "";

            if (this.userid > 0)
            {
                if (HTTPRequest.GetString("page").Trim() != "" && Utils.IsInt(HTTPRequest.GetString("page").Trim()))
                {
                    pageindex = int.Parse(HTTPRequest.GetString("page").Trim());
                }
                else
                {
                    pageindex = 1;
                }

                FeesList = tbFeesSubjectInfo.GetFeesSubjectInfoList(pagesize, pageindex, "", out pagetotal, 1, "*");

                PageBarHTML = Utils.TenPage(pageindex, pagetotal, 0);
            }
            else
            {
                AddErrLine("请先登录!");
                SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
                SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
            }
        }
예제 #15
0
        protected virtual void Page_Load(object sender, EventArgs e)
        {
            if (this.userid > 0)
            {
                if (CheckUserPopedoms("X") || CheckUserPopedoms("7-2-4-1"))
                {
                    rList = tbStaffInfo.getStaffDate();

                    getYear = HTTPRequest.GetString("getYear");
                    if (getYear == "")
                    {
                        getYear = DateTime.Now.ToString("yyyy") + "-01-01";
                    }
                    else
                    {
                        getYear = getYear + "-01-01";
                    }
                    if (ispost)
                    {
                        yList = tbStaffInfo.getStaffLastYear(Convert.ToDateTime(getYear));
                        mList = tbStaffInfo.getStaffOfMonth(Convert.ToDateTime(getYear).ToString("yyyy"));
                    }
                }
                else
                {
                    AddErrLine("权限不足!");
                }
            }
            else
            {
                AddErrLine("请先登录!");
                SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
                SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
            }
        }
        protected virtual void Page_Load(object sender, EventArgs e)
        {
            if (this.userid > 0)
            {
                ProductsID = Utils.StrToInt(HTTPRequest.GetString("pid"), 0);

                pi = tbProductsInfo.GetProductsInfoModel(ProductsID);

                ProductFieldValueList = tbProductsFieldValueInfo.GetProductsFieldValueList(" ProductsID = " + ProductsID).Tables[0];

                ProductFieldList = tbProductFieldInfo.GetProductFieldList(" ProductClassID in (0," + pi.ProductClassID + ") and pfState=0 order by pfOrder desc");

                ProductFieldList.Columns.Add("FieldValue", typeof(string));

                for (int i = 0; i < ProductFieldList.Rows.Count; i++)
                {
                    for (int j = 0; j < ProductFieldValueList.Rows.Count; j++)
                    {
                        if ((int)ProductFieldList.Rows[i]["ProductFieldID"] == (int)ProductFieldValueList.Rows[j]["ProductFieldID"])
                        {
                            ProductFieldList.Rows [i] ["FieldValue"] = ProductFieldValueList.Rows [j] ["pfvData"].ToString().Replace("[br]", "<br>").Replace("[b]", "<b>").Replace("[/b]", "</b>");
                        }
                    }
                }
                ProductFieldList.AcceptChanges();
            }
            else
            {
                AddErrLine("请先登录!");
                SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
                SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
            }
        }
        protected virtual void Page_Load(object sender, EventArgs e)
        {
            pagesize    = 20;
            PageBarHTML = "";

            if (this.userid > 0)
            {
                if (CheckUserPopedoms("X") || CheckUserPopedoms("6-1"))
                {
                    if (HTTPRequest.GetString("page").Trim() != "" && Utils.IsInt(HTTPRequest.GetString("page").Trim()))
                    {
                        pageindex = int.Parse(HTTPRequest.GetString("page").Trim());
                    }
                    else
                    {
                        pageindex = 1;
                    }

                    dList = tbMarketingFeesInfo.GetMarketingFeesInfoList(pagesize, pageindex, "", out pagetotal, 1, "*,(select tbStoresInfo.sName from tbStoresInfo where tbStoresInfo.StoresID=tbMarketingFeesInfo.[StoresID]) as StoresName,(select tbFeesSubjectInfo.fName from tbFeesSubjectInfo where tbFeesSubjectInfo.FeesSubjectID=tbMarketingFeesInfo.[FeesSubjectID]) as FeesSubjectName,(select tbStaffInfo.sName from tbStaffInfo where tbStaffInfo.StaffID=tbMarketingFeesInfo.StaffID) as StaffName");

                    PageBarHTML = Utils.TenPage(pageindex, pagetotal, 0);
                }
                else
                {
                    AddErrLine("权限不足!");
                }
            }
            else
            {
                AddErrLine("请先登录!");
                SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
                SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.userid > 0)
            {
                if (CheckUserPopedoms("X") || CheckUserPopedoms("7-2-1-8"))
                {
                    pName    = HTTPRequest.GetString("pname");
                    pBarcode = HTTPRequest.GetString("pbarcode");
                    pID      = HTTPRequest.GetInt("pid", 0);
                    sID      = HTTPRequest.GetInt("sid", 0);
                    bDate    = (HTTPRequest.GetString("bDate").Trim() != "") ? Convert.ToDateTime(HTTPRequest.GetString("bDate").Trim()) : DateTime.Now;
                    eDate    = (HTTPRequest.GetString("eDate").Trim() != "") ? Convert.ToDateTime(HTTPRequest.GetString("eDate").Trim()) : DateTime.Now;

                    sList = ProductsLossInfo.getProducts_Sales_Storehouse(pID, bDate, eDate, sID);
                }
                else
                {
                    AddErrLine("权限不足!");
                }
            }
            else
            {
                AddErrLine("请先登录!");
                SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
                SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (this.userid > 0)
     {
         if (CheckUserPopedoms("X") || CheckUserPopedoms("7-1-1-6-1"))
         {
             bool ShowMoney  = CheckUserPopedoms("7-1-1-6-2");
             bool xshowMoney = CheckUserPopedoms("X");
             if (ShowMoney || xshowMoney)
             {
                 Show = "1";
             }
             sID   = HTTPRequest.GetInt("sid", 0);  //门店编号
             aID   = HTTPRequest.GetInt("aid", -1); //联营类别
             sDate = DateTime.Parse(HTTPRequest.GetString("sDate"));
             sName = HTTPRequest.GetString("sName");
             pList = ProductsLossInfo.getProductDetailsByStorehouseID(sID, aID, sDate, 1);
         }
         else
         {
             AddErrLine("权限不足!");
         }
     }
     else
     {
         AddErrLine("请先登录!");
         SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
         SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
     }
 }
예제 #20
0
 //返回门店受影响的行集
 public int getStoresCount(string rid)
 {
     sDate         = Utils.IsDateString(Utils.ChkSQL(HTTPRequest.GetString("sDate"))) ? DateTime.Parse(Utils.ChkSQL(HTTPRequest.GetString("sDate"))) : DateTime.Now;
     stDate        = Utils.IsDateString(Utils.ChkSQL(HTTPRequest.GetString("stDate"))) ? DateTime.Parse(Utils.ChkSQL(HTTPRequest.GetString("stDate"))) : DateTime.Now;
     get_direction = HTTPRequest.GetInt("get_direction", 0);//借贷方向
     sList         = CostDetails.getStorsList(get_direction, rid, sDate, stDate);
     return(sList.Rows.Count);
 }
        protected virtual void Page_Load(object sender, EventArgs e)
        {
            if (this.userid > 0)
            {
                if (CheckUserPopedoms("X") || CheckUserPopedoms("11"))
                {
                    Act = HTTPRequest.GetString("Act").Trim() != "" ? HTTPRequest.GetString("Act").Trim() : "A1";
                    switch (Act)
                    {
                    case "A1":
                    case "E1":
                    case "F1":    //客户、门店
                        dList = tbStoresInfo.GetStoresInfoList("").Tables[0];
                        break;

                    case "A2":
                    case "E2":
                    case "F2":    //业务员
                        dList = tbStaffInfo.GetStaffInfoList(" sType=1").Tables[0];
                        break;

                    case "A3":
                    case "E3":
                    case "F3":    //促销员
                        dList = tbStaffInfo.GetStaffInfoList(" sType=2").Tables[0];
                        break;

                    case "A4":
                    case "E4":
                    case "F4":    //产品
                        dList = tbProductsInfo.GetProductsInfoList("").Tables[0];
                        break;

                    case "A5":
                    case "E5":
                    case "F5":    //品牌
                        dList = tbProductsInfo.GetProductsBrandList("").Tables[0];
                        break;

                    case "A6":
                    case "E6":
                    case "F6":    //系统
                        dList = tbYHsysInfo.GetYHsysInfoList("").Tables[0];
                        break;
                    }
                }
                else
                {
                    AddErrLine("权限不足!");
                }
            }
            else
            {
                AddErrLine("请先登录!");
                SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
                SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
            }
        }
        protected virtual void Page_Load(object sender, EventArgs e)
        {
            if (this.userid > 0)
            {
                if (CheckUserPopedoms("X") || CheckUserPopedoms("2-3-3"))
                {
                    Act        = HTTPRequest.GetString("Act");
                    ProductsID = HTTPRequest.GetInt("pid", 0);
                    if (Act == "List")
                    {
                        pi    = tbProductsInfo.GetProductsInfoModel(ProductsID);
                        dList = tbProductsInfo.GetProductsPriceClassPriceList(ProductsID);
                    }
                    if (Act == "Save")
                    {
                        try
                        {
                            pPrice = Utils.ChkSQL(HTTPRequest.GetString("pPrice"));
                            //pIsEdit = Utils.ChkSQL(HTTPRequest.GetString("pIsEdit"));

                            string[] pPriceArray = Utils.SplitString(pPrice, ";");
                            //string[] pIsEditArray = Utils.SplitString(pIsEdit, ";");
                            foreach (string pArray in pPriceArray)
                            {
                                string[] pp = Utils.SplitString(pArray, ",");
                                if (pp.Length > 0)
                                {
                                    if (pp[0].ToString().Trim() != "" && pp[1].ToString().Trim() != "" && pp[2].ToString().Trim() != "")
                                    {
                                        tbPriceClassDefaultPriceInfo.SavePriceClassDefaultPrice(Convert.ToInt32(pp[0].ToString().Trim()), ProductsID, Convert.ToDecimal(pp[1].ToString().Trim()), Convert.ToInt32(pp[2].ToString().Trim()));
                                    }
                                }
                                pp = null;
                            }
                            AddMsgLine("保存成功!");
                            AddScript("window.setTimeout('window.parent.HidBox();',1000);");
                        }
                        catch (Exception ex)
                        {
                            AddErrLine("保存失败!<br/>" + ex);
                            AddScript("window.setTimeout('window.parent.HidBox();',5000);");
                        }
                    }
                }
                else
                {
                    AddErrLine("权限不足!");
                    AddScript("window.setTimeout('window.parent.HidBox();',2000);");
                }
            }
            else
            {
                AddErrLine("请先登录!");
                SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
                SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (this.userid > 0)
     {
         objstr  = HTTPRequest.GetString("obj");
         pid     = HTTPRequest.GetInt("pid", 0);
         num_iid = Utils.ChkSQL(HTTPRequest.GetString("num_iid"));
         if (pid > 0 && num_iid.Trim() != "")
         {
             mProducts = tbProductsInfo.GetProductsInfoModel(pid);
             mGoods    = M_Utils.GetM_GoodsInfoModelByNum_iid(M_Config.m_ConfigInfoID, long.Parse(num_iid));
             if (mGoods != null)
             {
                 if (!ispost)
                 {
                     dList = M_Utils.GetM_GoodsStockList(M_Config.m_ConfigInfoID, mGoods.m_GoodsID);
                 }
                 else
                 {
                     int m_count   = HTTPRequest.GetInt("m_count", 0);
                     int StorageID = 0;
                     int num       = 0;
                     int sum_num   = 0;
                     try
                     {
                         if (m_count > 0)
                         {
                             for (int i = 0; i < m_count; i++)
                             {
                                 StorageID = HTTPRequest.GetInt("m_StorageID_" + (i + 1), 0);
                                 num       = HTTPRequest.GetInt("num_" + (i + 1), 0);
                                 sum_num  += num;
                                 M_Utils.UpdateM_GoodsStockNum(M_Config.m_ConfigInfoID, pid, num, StorageID);
                             }
                             //更新商品总数量字段
                             M_Utils.UpdateM_GoodsNum(M_Config.m_ConfigInfoID, long.Parse(num_iid), sum_num);
                         }
                         AddMsgLine("更新成功!");
                         AddScript("window.setTimeout('window.parent.ReCall({\"sobj\":\"" + objstr + "\",\"num\":\"" + sum_num + "\"});window.parent.HidBox();',1000);");
                     }catch (Exception ex) {
                         AddErrLine("系统错误:" + ex.Message);
                     }
                 }
             }
             else
             {
                 AddErrLine("参数错误!");
             }
         }
     }
     else
     {
         AddErrLine("请先登录!");
         SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
         SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
     }
 }
예제 #24
0
 protected virtual void Page_Load(object sender, EventArgs e)
 {
     Act             = HTTPRequest.GetString("Act");
     ShowType        = HTTPRequest.GetString("ShowType");
     DepartmentsJson = Caches.GetDepartmentsClassInfoToJson(-1, true, true);
     SupplierJson    = Caches.GetSupplierClassInfoToJson(-1, true, true);
     CustomersJson   = Caches.GetCustomersClassInfoToJson(-1, true, true);
     FeesSubjectJson = Caches.GetFeesSubjectClassInfoToJson(-1, false, true);
 }
예제 #25
0
 protected virtual void Page_Load(object sender, EventArgs e)
 {
     if (this.userid > 0)
     {
         if (CheckUserPopedoms("X") || CheckUserPopedoms("3-4-6-2"))
         {
             dList = storehouseStorage.SnameBindDropdownlist();
             Act   = HTTPRequest.GetString("Act");
             if (ispost)
             {
                 sName = HTTPRequest.GetString("sName");
                 bDate = Utils.IsDateString(Utils.ChkSQL(HTTPRequest.GetString("sDate"))) ? DateTime.Parse(Utils.ChkSQL(HTTPRequest.GetString("sDate"))) : DateTime.Now;
                 eDate = Utils.IsDateString(Utils.ChkSQL(HTTPRequest.GetString("stDate"))) ? DateTime.Parse(Utils.ChkSQL(HTTPRequest.GetString("stDate"))) : DateTime.Now;
                 sId   = Convert.ToInt32(HTTPRequest.GetString("StoresID"));
                 pList = storehouseStorage.SelectStorageData(sId, bDate, eDate);
             }
             else
             {
                 if (Act.IndexOf("act") > -1)
                 {
                     bDate = Utils.IsDateString(Utils.ChkSQL(HTTPRequest.GetString("sDate"))) ? DateTime.Parse(Utils.ChkSQL(HTTPRequest.GetString("sDate"))) : DateTime.Now;
                     eDate = Utils.IsDateString(Utils.ChkSQL(HTTPRequest.GetString("stDate"))) ? DateTime.Parse(Utils.ChkSQL(HTTPRequest.GetString("stDate"))) : DateTime.Now;
                     sId   = HTTPRequest.GetInt("StoresID", 0);
                     if (sId > 0)
                     {
                         pList = storehouseStorage.SelectStorageData(sId, bDate, eDate);
                         DataTable dt = pList.Copy();
                         DataSet   ds = new DataSet();
                         ds.Tables.Add(dt);
                         ds.Tables[0].Columns[0].ColumnName = "商品条码";
                         ds.Tables[0].Columns[1].ColumnName = "商品名称";
                         ds.Tables[0].Columns[2].ColumnName = "数量";
                         ds.Tables[0].Columns[3].ColumnName = "金额";
                         ds.Tables[0].Columns[4].ColumnName = "导入时间";
                         ds.Tables[0].Columns[5].ColumnName = "系统时间";
                         CreateExcel(ds.Tables[0], "联营库存导入详情_" + DateTime.Now.ToString("yyy-MM-dd") + ".xls");
                     }
                     else
                     {
                         AddErrLine("请正确选择门店编号!");
                     }
                 }
             }
         }
         else
         {
             AddErrLine("权限不足!");
             AddScript("window.parent.HidBox();");
         }
     }
     else
     {
         AddErrLine("请先登录!");
         SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
         SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
     }
 }
예제 #26
0
        protected virtual void Page_Load(object sender, EventArgs e)
        {
            pagesize    = 20;
            PageBarHTML = "";
            string tSQL = "";

            if (this.userid > 0)
            {
                if (CheckUserPopedoms("X") || CheckUserPopedoms("2-2-4"))
                {
                    if (HTTPRequest.GetString("page").Trim() != "" && Utils.IsInt(HTTPRequest.GetString("page").Trim()))
                    {
                        pageindex = int.Parse(HTTPRequest.GetString("page").Trim());
                    }
                    else
                    {
                        pageindex = 1;
                    }
                    if (ispost)
                    {
                        Act   = HTTPRequest.GetFormString("Act");
                        S_key = Utils.ChkSQL(HTTPRequest.GetFormString("S_key"));
                    }
                    else
                    {
                        Act   = HTTPRequest.GetQueryString("Act");
                        S_key = Utils.ChkSQL(HTTPRequest.GetQueryString("S_key"));
                    }
                    sState = HTTPRequest.GetInt("sState", -1);
                    if (Act.Trim() == "Search" && S_key.Trim() != "")
                    {
                        tSQL = " tbStoresInfo.sName like'%" + S_key + "%' or tbStoresInfo.sCode like '%" + S_key + "%' ";

                        if (sState > -1)
                        {
                            tSQL += " and sState=" + sState + "";
                        }
                    }

                    dList = tbStoresInfo.GetStoresInfoList(pagesize, pageindex, tSQL, out pagetotal, 1, "*,(select yName from tbYHsysInfo where YHsysID=tbStoresInfo.[YHsysID]) as YHsysName,(select pName from tbPaymentSystemInfo where PaymentSystemID=tbStoresInfo.[PaymentSystemID]) as PaymentSystemName");

                    PageBarHTML = Utils.TenPage(pageindex, pagetotal, 0, "&Act=" + Act + "&S_key=" + S_key + "&sState=" + sState);
                }
                else
                {
                    AddErrLine("权限不足!");
                }
            }
            else
            {
                AddErrLine("请先登录!");
                SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
                SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
            }
        }
예제 #27
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.userid > 0)
            {
                if (CheckUserPopedoms("X") || CheckUserPopedoms("7-2-3-8"))
                {
                    storesID = HTTPRequest.GetInt("sid", 0);
                    selectID = HTTPRequest.GetInt("aid", 0);
                    bDate    = Convert.ToDateTime(HTTPRequest.GetString("bDate"));
                    eDate    = Convert.ToDateTime(HTTPRequest.GetString("eDate"));
                    sName    = HTTPRequest.GetString("sName");
                    sType    = HTTPRequest.GetString("sType");

                    kList = HTTPRequest.GetString("kID");
                    string[] kList_Arrary = kList.Split(',');
                    for (int i = 0; i < kList_Arrary.Length - 1; i++)
                    {
                        //判断是否有子节点
                        bool tl = DataClass.ExistsFeesSubjectClassChild(Convert.ToInt32(kList_Arrary[i]));
                        if (tl)
                        {
                            dataclass = CostDetails.getTreeChildrenCount(kList_Arrary[i]);
                            string[] dclass = dataclass.Split(',');
                            for (int j = 0; j < dclass.Length - 1; j++)
                            {
                                sList = CostDetails.getCostOfStorehouseDetails(selectID, storesID, dclass[j].ToString(), bDate, eDate);
                                DataTable dt = sList.Copy();
                                dt.TableName = "p" + j + c_count;
                                sDateSet.Tables.Add(dt);
                                c_count++;
                            }
                        }
                        else
                        {
                            sList = CostDetails.getCostOfStorehouseDetails(selectID, storesID, kList_Arrary[i], bDate, eDate);
                            DataTable dt = sList.Copy();
                            dt.TableName = "f" + i + c_count;
                            sDateSet.Tables.Add(dt);
                            c_count++;
                        }
                    }
                }
                else
                {
                    AddErrLine("权限不足!");
                }
            }
            else
            {
                AddErrLine("请先登录!");
                SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
                SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
            }
        }
예제 #28
0
 protected virtual void Page_Load(object sender, EventArgs e)
 {
     if (this.userid > 0)
     {
         if (CheckUserPopedoms("X") || CheckUserPopedoms("6-5-6"))
         {
             string tSQL = " 1=1 ";
             Act = HTTPRequest.GetString("Act");
             if (Act == "do")
             {
                 cSteps  = HTTPRequest.GetInt("cSteps", -1);
                 cNumber = HTTPRequest.GetString("cNumber");
                 cState  = HTTPRequest.GetInt("cState", -1);
                 if (cState > -1)
                 {
                     tSQL += " and cState=" + cState;
                 }
                 cDateTimeB = Utils.ChkSQL(HTTPRequest.GetString("cDateTimeB"));
                 if (cDateTimeB.Trim() != "" && Utils.IsDateString(cDateTimeB.Trim()))
                 {
                     tSQL += " and cDateTime>='" + cDateTimeB.Trim() + "  00:00:00 '";
                 }
                 cDateTimeE = Utils.ChkSQL(HTTPRequest.GetString("cDateTimeE"));
                 if (cDateTimeE.Trim() != "" && Utils.IsDateString(cDateTimeE.Trim()))
                 {
                     tSQL += " and cDateTime<='" + cDateTimeE.Trim() + "  23:59:59 '";
                 }
                 if (cSteps != -1)
                 {
                     tSQL += " and cSteps=" + cSteps;
                 }
                 if (cNumber.Trim() != "")
                 {
                     if (Utils.StrToInt(cNumber, 0) > 0)
                     {
                         tSQL += " and cNumber=" + cNumber;
                     }
                 }
                 dList    = Certificates.GetCertificateInfoList(tSQL).Tables[0];
                 SumMoney = Certificates.GetCertificateSumMoney(tSQL);
             }
         }
         else
         {
             AddErrLine("权限不足!");
         }
     }
     else
     {
         AddErrLine("请先登录!");
         SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
         SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
     }
 }
예제 #29
0
        protected virtual void Page_Load(object sender, EventArgs e)
        {
            if (this.userid > 0)
            {
                if (CheckUserPopedoms("X"))
                {
                    Act = HTTPRequest.GetString("Act");
                    if (!ispost)
                    {
                        ManageConfig = GeneralConfigs.GetConfig();
                        if (ManageConfig == null)
                        {
                            AddErrLine("获取配置信息发生错误.<br>");
                        }
                        else
                        {
                            dList = M_Utils.GetM_ConfigInfoList(" 1=1 order by m_ConfigInfoID desc").Tables[0];
                        }
                    }
                    else
                    {
                        try
                        {
                            ManageConfig                = GeneralConfigs.GetConfig();
                            ManageConfig.Taobao_Open    = HTTPRequest.GetInt("Taobao_Open", 0);
                            ManageConfig.Taobao_SandBox = HTTPRequest.GetInt("Taobao_SandBox", 1);
                            GeneralConfigs.Serialiaze(ManageConfig, Utils.GetMapPath(BaseConfigs.GetSysPath + "config/general.config"));

                            BaseConfigs.ResetConfig();
                            Caches.ReSet();
                            AddMsgLine("提交成功!");
                            SetBackLink("mconfig.aspx?r=" + Utils.GetRanDomCode());
                            SetMetaRefresh(1, "mconfig.aspx?r=" + Utils.GetRanDomCode());
                        }
                        catch (Exception ex)
                        {
                            AddErrLine("提交时发生错误:<br>" + ex.Message.ToString());
                        }
                    }
                }
                else
                {
                    AddErrLine("权限不足!");
                    AddScript("window.parent.HidBox();");
                }
            }
            else
            {
                AddErrLine("请先登录!");
                SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
                SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
            }
        }
예제 #30
0
 protected virtual void Page_Load(object sender, EventArgs e)
 {
     if (this.userid > 0)
     {
         objstr = HTTPRequest.GetString("obj");
     }
     else
     {
         AddErrLine("请先登录!");
         SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
         SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
     }
 }