예제 #1
0
파일: Area.cs 프로젝트: thachgiasoft/ue96
        private void BindProvince()
        {
            SortedList sl = ASPManager.GetInstance().GetProvinceList(true);

            if (sl != null)
            {
                ddlProvince.Items.Clear();
                foreach (AreaInfo item in sl.Keys)
                {
                    ddlProvince.Items.Add(
                        new ListItem(item.ProvinceName, item.SysNo.ToString()));
                }
            }
            ddlProvince.Items.Insert(0, new ListItem(AppConst.AllSelectString, AppConst.IntNull.ToString()));
        }
예제 #2
0
파일: Area.cs 프로젝트: thachgiasoft/ue96
        private void BindDistrict()
        {
            ddlDistrict.Items.Clear();
            int        citySysNo = Convert.ToInt32(ddlCity.SelectedItem.Value);
            SortedList sl        = ASPManager.GetInstance().GetDistrictList(citySysNo, true);

            if (sl != null)
            {
                foreach (AreaInfo item in sl.Keys)
                {
                    ddlDistrict.Items.Add(
                        new ListItem(item.DistrictName, item.SysNo.ToString()));
                }
            }
            ddlDistrict.Items.Insert(0, new ListItem(AppConst.AllSelectString, AppConst.IntNull.ToString()));
        }
예제 #3
0
        /// <summary>
        /// 获取团购地区的城市
        /// </summary>
        /// <returns></returns>
        public static string GetGroupBuyLocationStr(int provinceSysNo, int citySysNo)
        {
            string locationStr = String.Empty;

            Hashtable ht = ASPManager.GetInstance().GetAreaHash();

            foreach (AreaInfo item in ht.Values)
            {
                if (item.ProvinceSysNo == provinceSysNo && item.CitySysNo == citySysNo)
                {
                    locationStr = item.CityName.Trim();
                }
            }

            return(locationStr);
        }
예제 #4
0
        private void InitSOMaster()
        {
            SortedList shipTypeList = ASPManager.GetInstance().GetShipTypeListByArea(oSession.sSO.ReceiveAreaSysNo);

            //默认选中第一种在线显示的运送方式
            if (shipTypeList != null && shipTypeList.Count != 0)
            {
                foreach (ShipTypeInfo stInfo in shipTypeList.Keys)
                {
                    if (stInfo.IsOnlineShow == (int)AppEnum.YNStatus.Yes)
                    {
                        oSession.sSO.ShipTypeSysNo = stInfo.SysNo;
                        break;
                    }
                }
            }
        }
예제 #5
0
        /// <summary>
        /// 获取ro发票
        /// </summary>
        /// <param name="roSysNo"></param>
        /// <returns></returns>
        public ROInvoiceInfo GetROInvoice(int roSysNo)
        {
            ROInvoiceInfo invoice = new ROInvoiceInfo();
            ROInfo        ro      = this.LoadRO(roSysNo);
            RMAInfo       rma     = RMAManager.GetInstance().Load(ro.RMASysNo);
            SOInfo        so      = SaleManager.GetInstance().LoadSO(rma.SOSysNo);
            IcsonInfo     son     = new IcsonInfo();

            invoice.AuditUserSysNo = ro.AuditUserSysNo;
            invoice.CompanyAddress = son.CompanyAddress;
            invoice.InvoiceNote    = so.InvoiceNote;
            invoice.SOID           = so.SOID;
            PayTypeInfo ptInfo = ASPManager.GetInstance().LoadPayType(so.PayTypeSysNo);

            invoice.PayTypeName    = ptInfo.PayTypeName;
            invoice.ReceiveAddress = ro.ReceiveAddress;
            CustomerInfo customer = CustomerManager.GetInstance().Load(so.CustomerSysNo);

            invoice.CustomerName  = customer.CustomerName;
            invoice.CustomerSysNo = customer.SysNo;
            invoice.ReceiveName   = ro.ReceiveName;
            invoice.ReceivePhone  = ro.ReceivePhone;
            invoice.ROID          = ro.ROID;
            invoice.ROSysNo       = ro.SysNo;
            ShipTypeInfo stInfo = ASPManager.GetInstance().LoadShipType(so.ShipTypeSysNo);

            invoice.ShipTypeName = stInfo.ShipTypeName;
            UserInfo employee = SysManager.GetInstance().LoadUser(so.OutUserSysNo);

            if (employee != null)
            {
                invoice.WarehouseUserCode = employee.UserID;
            }
            else
            {
                invoice.WarehouseUserCode = "";
            }
            this.InitPageList(ro, invoice);
            invoice.TotalPage   = invoice.ItemHash.Count;
            invoice.TotalWeight = ro.GetTotalWeight();
            return(invoice);
        }
예제 #6
0
        private void BindPayTypeGrid()
        {
            DataTable dt = new DataTable("PayTypeTable");

            dt.Columns.Add(new DataColumn("SysNo", typeof(System.Int32)));
            dt.Columns.Add(new DataColumn("PayTypeName", typeof(System.String)));
            dt.Columns.Add(new DataColumn("PayTypeDesc", typeof(System.String)));
            dt.Columns.Add(new DataColumn("Period", typeof(System.String)));
            dt.Columns.Add(new DataColumn("OrderNumber", typeof(System.String)));

            SortedList payTypeList = ASPManager.GetInstance().GetPayTypeListByShipType(soInfo.ShipTypeSysNo);

            if (payTypeList != null && payTypeList.Count != 0)
            {
                foreach (PayTypeInfo ptInfo in payTypeList.Keys)
                {
                    if (ptInfo.IsOnlineShow == (int)AppEnum.YNStatus.Yes)
                    {
                        DataRow dr = dt.NewRow();
                        dr["SysNo"]       = ptInfo.SysNo;
                        dr["PayTypeName"] = ptInfo.PayTypeName;
                        dr["PayTypeDesc"] = ptInfo.PayTypeDesc;
                        dr["Period"]      = ptInfo.Period;
                        dr["OrderNumber"] = ptInfo.OrderNumber;
                        dt.Rows.Add(dr);
                    }
                }
            }
            //淘宝代理,增加支付宝免手续费的方式
            if (oSession.sCustomer.CustomerType == (int)AppEnum.CustomerType.Taobao)
            {
                PayTypeInfo ptInfo = ASPManager.GetInstance().GetPayTypeHash()[9] as PayTypeInfo;
                DataRow     dr     = dt.NewRow();
                dr["SysNo"]       = ptInfo.SysNo;
                dr["PayTypeName"] = ptInfo.PayTypeName;
                dr["PayTypeDesc"] = ptInfo.PayTypeDesc;
                dr["Period"]      = ptInfo.Period;
                dr["OrderNumber"] = ptInfo.OrderNumber;
                dt.Rows.Add(dr);
            }
            this.dgPayType.DataSource = dt;
            this.dgPayType.DataBind();

            if (dgPayType.Items.Count != 0)
            {
                foreach (DataGridItem dgItem in dgPayType.Items)
                {
                    RadioButton rdo          = dgItem.FindControl("rdoSelectPayType") as RadioButton;
                    int         PayTypeSysNo = Int32.Parse(dgPayType.DataKeys[dgItem.ItemIndex].ToString());
                    if (PayTypeSysNo == 8) //财付通账号输入
                    {
                        rdo.Attributes.Add("onclick", "SelectPayType(this,1);");
                    }
                    else
                    {
                        rdo.Attributes.Add("onclick", "SelectPayType(this,0);");
                    }

                    if (soInfo.PayTypeSysNo == AppConst.IntNull)
                    {
                        if (dgItem.ItemIndex == 0)
                        {
                            rdo.Checked = true;
                            //break;
                            //dgPayType.SelectedIndex = dgItem.ItemIndex;
                        }
                    }
                    else if ((int)dgPayType.DataKeys[dgItem.ItemIndex] == soInfo.PayTypeSysNo)
                    {
                        rdo.Checked = true;
                        //dgPayType.SelectedIndex = dgItem.ItemIndex;
                        //break;
                    }
                }
            }
        }
예제 #7
0
        private void BindShipTypeGrid()
        {
            DataTable dt = new DataTable("ShipTypeTable");

            dt.Columns.Add(new DataColumn("SysNo", typeof(System.Int32)));
            dt.Columns.Add(new DataColumn("ShipTypeName", typeof(System.String)));
            dt.Columns.Add(new DataColumn("ShipPrice", typeof(System.String)));
            dt.Columns.Add(new DataColumn("DiscountShipPrice", typeof(System.String)));
            dt.Columns.Add(new DataColumn("ShipTypeDesc", typeof(System.String)));
            dt.Columns.Add(new DataColumn("PremiumAmt", typeof(System.String)));
            dt.Columns.Add(new DataColumn("Period", typeof(System.String)));
            dt.Columns.Add(new DataColumn("OrderNumber", typeof(System.String)));

            SortedList shipTypeList = ASPManager.GetInstance().GetShipTypeListByArea(soInfo.ReceiveAreaSysNo);

            AreaInfo areaInfo = ASPManager.GetInstance().LoadArea(soInfo.ReceiveAreaSysNo);

            if (shipTypeList != null && shipTypeList.Count != 0)
            {
                foreach (ShipTypeInfo stInfo in shipTypeList.Keys)
                {
                    if (stInfo.IsOnlineShow == (int)AppEnum.YNStatus.Yes)
                    {
                        try
                        {
                            //if (ASPManager.GetInstance().IsAbroadChannel(soInfo.ItemHash))
                            //{
                            //    if (stInfo.ShipTypeID == "050")
                            //    {
                            //        if (Session["HasLimitedShipProduct"] != null)
                            //        {
                            //            if (Session["HasLimitedShipProduct"].ToString().IndexOf("1") >= 0)
                            //            {
                            //                if (stInfo.SysNo == 2 || stInfo.SysNo == 3)  //EMS,邮局普包,所有限运商品都不可以运输
                            //                {
                            //                    //lblmsg.Text = Session["HasLimitedShipProductInfo1"].ToString() + " 属邮局普包和EMS限运商品,如需使用邮局普包或EMS,请从购物车中删除限运商品! <a href='http://www.icson.com/Service/NewsDetail.aspx?Type=Bulletin&ID=73' target='_blank'>查看限运说明</a>";
                            //                    continue;
                            //                }
                            //            }
                            //            if (Session["HasLimitedShipProduct"].ToString().IndexOf("2") >= 0) //圆通航空限运
                            //            {
                            //                if (stInfo.SysNo == 7)
                            //                {
                            //                    if (",1,201,131,403,814,1144,1323,1718,1591,2858,3225,2329,2621,".IndexOf("," + areaInfo.ProvinceSysNo.ToString() + ",") < 0)
                            //                    {
                            //                        //lblmsg.Text = Session["HasLimitedShipProductInfo2"].ToString() + " 属圆通限运商品,如需使用圆通,请从购物车中删除限运商品! <a href='http://www.icson.com/Service/NewsDetail.aspx?Type=Bulletin&ID=73' target='_blank'>查看限运说明</a>";
                            //                        continue;
                            //                    }
                            //                }
                            //            }
                            //        }

                            //        DataRow dr = dt.NewRow();
                            //        dr["SysNo"] = stInfo.SysNo;
                            //        dr["ShipTypeName"] = stInfo.ShipTypeName;
                            //        dr["ShipTypeDesc"] = stInfo.ShipTypeDesc;
                            //        dr["Period"] = stInfo.Period;
                            //        decimal tempShipPrice = ASPManager.GetInstance().GetShipPrice(soInfo.GetTotalWeight(), soInfo.SOAmt, stInfo.SysNo, soInfo.ReceiveAreaSysNo);
                            //        dr["ShipPrice"] = tempShipPrice.ToString(AppConst.DecimalFormatWithCurrency);
                            //        dr["PremiumAmt"] = ASPManager.GetInstance().GetPremuimAmt(soInfo.SOAmt, stInfo.SysNo).ToString(AppConst.DecimalFormatWithCurrency);
                            //        dr["OrderNumber"] = stInfo.OrderNumber;
                            //        dt.Rows.Add(dr);

                            //    }
                            //}
                            //else
                            //{
                            if (stInfo.ShipTypeID != "050")
                            {
                                if (Session["HasLimitedShipProduct"] != null)
                                {
                                    if (Session["HasLimitedShipProduct"].ToString().IndexOf("1") >= 0)
                                    {
                                        if (stInfo.SysNo == 2 || stInfo.SysNo == 3)  //EMS,邮局普包,所有限运商品都不可以运输
                                        {
                                            //lblmsg.Text = Session["HasLimitedShipProductInfo1"].ToString() + " 属邮局普包和EMS限运商品,如需使用邮局普包或EMS,请从购物车中删除限运商品! <a href='http://www.icson.com/Service/NewsDetail.aspx?Type=Bulletin&ID=73' target='_blank'>查看限运说明</a>";
                                            continue;
                                        }
                                    }
                                    if (Session["HasLimitedShipProduct"].ToString().IndexOf("2") >= 0) //圆通航空限运
                                    {
                                        if (stInfo.SysNo == 7)
                                        {
                                            if (",1,201,131,403,814,1144,1323,1718,1591,2858,3225,2329,2621,".IndexOf("," + areaInfo.ProvinceSysNo.ToString() + ",") < 0)
                                            {
                                                //lblmsg.Text = Session["HasLimitedShipProductInfo2"].ToString() + " 属圆通限运商品,如需使用圆通,请从购物车中删除限运商品! <a href='http://www.icson.com/Service/NewsDetail.aspx?Type=Bulletin&ID=73' target='_blank'>查看限运说明</a>";
                                                continue;
                                            }
                                        }
                                    }
                                }

                                DataRow dr = dt.NewRow();
                                dr["SysNo"]        = stInfo.SysNo;
                                dr["ShipTypeName"] = stInfo.ShipTypeName;
                                dr["ShipTypeDesc"] = stInfo.ShipTypeDesc;
                                dr["Period"]       = stInfo.Period;
                                decimal tempShipPrice = ASPManager.GetInstance().GetShipPrice(soInfo.GetTotalWeight(), soInfo.SOAmt, stInfo.SysNo, soInfo.ReceiveAreaSysNo);
                                dr["ShipPrice"]   = tempShipPrice.ToString(AppConst.DecimalFormatWithCurrency);
                                dr["PremiumAmt"]  = ASPManager.GetInstance().GetPremuimAmt(soInfo.SOAmt, stInfo.SysNo).ToString(AppConst.DecimalFormatWithCurrency);
                                dr["OrderNumber"] = stInfo.OrderNumber;
                                dt.Rows.Add(dr);
                            }
                            //}
                        }
                        catch (BizException be)
                        {
                            this.lblRErrMsg.Text = be.Message;
                        }
                        catch (Exception ex)
                        {
                            ErrorLog.GetInstance().Write(ex.Message);
                        }
                    }
                }
            }
            this.dgShipType.DataSource = dt;
            this.dgShipType.DataBind();
            if (dgShipType.Items.Count != 0)
            {
                divDeliveryTime.Visible = false;
                foreach (DataGridItem dgItem in dgShipType.Items)
                {
                    RadioButton rdo = dgItem.FindControl("rdoSelectShipType") as RadioButton;

                    int ShipTypeSysNo = Int32.Parse(this.dgShipType.DataKeys[dgItem.ItemIndex].ToString());
                    if (ShipTypeSysNo == 1) //如果其他快递方式也能支持上下午送到,再去掉判断条件
                    {
                        int AreaSysNo = soInfo.ReceiveAreaSysNo;
                        if (ASPManager.IsAreaTimeliness(ShipTypeSysNo, AreaSysNo))
                        {
                            rdo.Attributes.Add("onclick", "SelectShipType(this,1);");
                            if (dgItem.ItemIndex == 0)
                            {
                                divDeliveryTime.Visible = true;
                            }
                        }
                        else
                        {
                            rdo.Attributes.Add("onclick", "SelectShipType(this,0);");
                        }
                    }
                    else
                    {
                        rdo.Attributes.Add("onclick", "SelectShipType(this,0);");
                    }

                    if (soInfo.ShipTypeSysNo == AppConst.IntNull)
                    {
                        if (dgItem.ItemIndex == 0)
                        {
                            rdo.Checked = true;
                            //break;
                        }
                    }
                    else if ((int)dgShipType.DataKeys[dgItem.ItemIndex] == soInfo.ShipTypeSysNo)
                    {
                        rdo.Checked = true;
                        //break;
                    }
                }
            }
        }
예제 #8
0
        private void BindPage()
        {
            //Bind CustomerInfo
            this.lblName.Text      = oSession.sCustomer.CustomerName;
            this.lblAddr.Text      = oSession.sCustomer.DwellAddress;
            this.lblPhone.Text     = oSession.sCustomer.Phone;
            this.lblCellPhone.Text = oSession.sCustomer.CellPhone;
            this.lblZip.Text       = oSession.sCustomer.DwellZip;
            AreaInfo area = ASPManager.GetInstance().LoadArea(oSession.sCustomer.DwellAreaSysNo);

            this.lblProvince.Text = area.ProvinceName;
            this.lblCity.Text     = area.CityName;
            this.lblDistrict.Text = area.DistrictName;

            //修改部分显示

            txtRname.Text = soInfo.ReceiveName;

            txtRCellPhone.Text = soInfo.ReceiveCellPhone;
            txtRPhone.Text     = soInfo.ReceivePhone;
            if (oSession.sCustomer.DwellAreaSysNo != 1)//这个是new user的默认值。
            {
                RArea.AreaSysNo = soInfo.ReceiveAreaSysNo;
            }
            txtRaddress.Text = soInfo.ReceiveAddress;
            txtRzip.Text     = soInfo.ReceiveZip;

            //Bind SO
            //Bind SOMaster
            this.lblSOID.Text             = soInfo.SOID;
            this.lblReceiveName.Text      = soInfo.ReceiveName;
            this.lblReceiveAddr.Text      = soInfo.ReceiveAddress;
            this.lblReceivePhone.Text     = soInfo.ReceivePhone;
            this.lblReceiveCellPhone.Text = soInfo.ReceiveCellPhone;
            this.lblReceiveZip.Text       = soInfo.ReceiveZip;
            area = ASPManager.GetInstance().LoadArea(soInfo.ReceiveAreaSysNo);
            this.lblReceiveProvince.Text = area.ProvinceName;
            this.lblReceiveCity.Text     = area.CityName;
            this.lblReceiveDistrict.Text = area.DistrictName;
            ShipTypeInfo stInfo = ASPManager.GetInstance().LoadShipType(soInfo.ShipTypeSysNo);
            PayTypeInfo  ptInfo = ASPManager.GetInstance().LoadPayType(soInfo.PayTypeSysNo);

            this.lblShipType.Text       = stInfo.ShipTypeName;
            this.lblPayType.Text        = ptInfo.PayTypeName;
            this.lblPointAmt.Text       = soInfo.PointAmt.ToString();
            this.lblPointPay.Text       = soInfo.PointPay.ToString();
            this.lblFreeShipFeePay.Text = Util.ToMoney(soInfo.FreeShipFeePay).ToString();
            this.lblPremiumAmt.Text     = soInfo.PremiumAmt.ToString(AppConst.DecimalFormatWithCurrency);
            this.lblShipPrice.Text      = soInfo.ShipPrice.ToString(AppConst.DecimalFormatWithCurrency);
            this.lblPayPrice.Text       = soInfo.PayPrice.ToString(AppConst.DecimalFormatWithCurrency);
            if (soInfo.PayPrice > 0)
            {
                this.trPayPrice.Visible = true;
            }
            else
            {
                this.trPayPrice.Visible = false;
            }
            this.lblSOAmt.Text = soInfo.SOAmt.ToString(AppConst.DecimalFormatWithCurrency);
            //this.lblDiscountAmt.Text = soInfo.DiscountAmt.ToString(AppConst.DecimalFormatWithCurrency);
            this.lblDiscountAmt.Text = Convert.ToDecimal(soInfo.DiscountAmt + soInfo.CouponAmt).ToString(AppConst.DecimalFormatWithCurrency);
            //if(soInfo.DiscountAmt>0)
            //    this.trSaleRule.Visible = true;
            //else
            //    this.trSaleRule.Visible = false;
            if ((soInfo.DiscountAmt + soInfo.CouponAmt) > 0)
            {
                this.trSaleRule.Visible = true;
            }
            else
            {
                this.trSaleRule.Visible = false;
            }

            decimal total    = soInfo.GetTotalAmt();
            decimal subTotal = total - soInfo.PayPrice;
            decimal endMoney = SaleManager.GetInstance().GetEndMoney(soInfo);
            decimal change   = total - endMoney;

            this.lblSubSum.Text     = subTotal.ToString(AppConst.DecimalFormatWithCurrency);
            this.lblTotalMoney.Text = endMoney.ToString(AppConst.DecimalFormatWithCurrency);
            this.lblChange.Text     = change.ToString(AppConst.DecimalFormatWithCurrency);
            this.lblSOWeight.Text   = soInfo.GetTotalWeight().ToString();
            this.lblStatus.Text     = AppEnum.GetSOStatus(soInfo.Status);
            this.lblSODate.Text     = soInfo.OrderDate.ToString(AppConst.DateFormat);
            if (soInfo.Memo == "")
            {
                lblMemo.Text    = "没有留言!";
                txtMessage.Text = "没有留言!";
            }
            else
            {
                this.lblMemo.Text = soInfo.Memo;
                txtMessage.Text   = soInfo.Memo;
            }
            //Bind SOItem Table
            this.BindSOItem();
            //Bind SaleRule Table
            this.BindSaleRule();
            //Set visible
            if (soInfo.Status == (int)AppEnum.SOStatus.Origin)
            {
                this.btnCancel.Visible = true;
            }
            else
            {
                this.btnCancel.Visible = false;
            }

            if (soInfo.HasExpectQty == (int)AppEnum.YNStatus.Yes)
            {
                this.dgItem.Columns[5].Visible = true;
            }
            else
            {
                this.dgItem.Columns[5].Visible = false;
            }
        }
예제 #9
0
        protected string GetShipType()
        {
            ShipTypeInfo shipType = (ShipTypeInfo)ASPManager.GetInstance().GetShipTypeHash()[soInfo.ShipTypeSysNo];

            return(shipType.ShipTypeName);
        }
예제 #10
0
        protected string GetPayType()
        {
            PayTypeInfo payType = (PayTypeInfo)ASPManager.GetInstance().GetPayTypeHash()[soInfo.PayTypeSysNo];

            return(payType.PayTypeName);
        }