ERP商品管理业务逻辑封装(三十一)

产品购进管理业务逻辑:

 public   class ProductBLL
    {

      /// <summary>
      /// 产品对象添加 并且返回产品编号
      /// </summary>
      /// <param name="viewpro">产品视图对象</param>
      public int BiotbProductAdd(ViewProInfo model)
      {
          int rowsAffected;
          SqlParameter[] parameters = {
					new SqlParameter("@ProID", SqlDbType.Int,4),
					new SqlParameter("@ProName", SqlDbType.NVarChar,100),
					new SqlParameter("@TypeID", SqlDbType.Int,4),
					new SqlParameter("@CustomerID", SqlDbType.Int,4),
					new SqlParameter("@ProLogo", SqlDbType.NVarChar,200),
					new SqlParameter("@Spec", SqlDbType.NVarChar,100),
					new SqlParameter("@ProFullName", SqlDbType.NVarChar,100),
					new SqlParameter("@ConfirmNo", SqlDbType.NVarChar,100),
					new SqlParameter("@Unit", SqlDbType.NVarChar,50),
					new SqlParameter("@ProSize", SqlDbType.NVarChar,50),
					new SqlParameter("@Grossweight", SqlDbType.NVarChar,50),
					new SqlParameter("@MadeEnterprise", SqlDbType.NVarChar,100),
					new SqlParameter("@Retailprice", SqlDbType.Money,8),
					new SqlParameter("@BidPrice", SqlDbType.Money,8),
					new SqlParameter("@TradePrice", SqlDbType.Money,8),
					new SqlParameter("@AdvicePrice", SqlDbType.Money,8),
					new SqlParameter("@CountyPrice", SqlDbType.Money,8),
					new SqlParameter("@CityPrice", SqlDbType.Money,8),
					new SqlParameter("@ProvincePrice", SqlDbType.Money,8),
					new SqlParameter("@NetPrice", SqlDbType.Money,8),
					new SqlParameter("@NetVipPrice", SqlDbType.Money,8),
					new SqlParameter("@NetMemberprice", SqlDbType.Money,8),
					new SqlParameter("@OurCompany", SqlDbType.NVarChar,100),
					new SqlParameter("@ChannelID", SqlDbType.Int,4),
					new SqlParameter("@Usefullife", SqlDbType.NVarChar,50),
					new SqlParameter("@SubmitTime", SqlDbType.DateTime),
					new SqlParameter("@StockMost", SqlDbType.NVarChar,100),
					new SqlParameter("@StockLess", SqlDbType.NVarChar,100),
					new SqlParameter("@Remark", SqlDbType.NVarChar,1000)};
          parameters[0].Direction = ParameterDirection.Output;
          parameters[1].Value = model.ProName;
          parameters[2].Value = model.TypeID;
          parameters[3].Value = model.CustomerID;
          parameters[4].Value = model.ProLogo;
          parameters[5].Value = model.Spec;
          parameters[6].Value = model.ProFullName;
          parameters[7].Value = model.ConfirmNo;
          parameters[8].Value = model.Unit;
          parameters[9].Value = model.ProSize;
          parameters[10].Value = model.Grossweight;
          parameters[11].Value = model.MadeEnterprise;
          parameters[12].Value = model.Retailprice;
          parameters[13].Value = model.BidPrice;
          parameters[14].Value = model.TradePrice;
          parameters[15].Value = model.AdvicePrice;
          parameters[16].Value = model.CountyPrice;
          parameters[17].Value = model.CityPrice;
          parameters[18].Value = model.ProvincePrice;
          parameters[19].Value = model.NetPrice;
          parameters[20].Value = model.NetVipPrice;
          parameters[21].Value = model.NetMemberprice;
          parameters[22].Value = model.OurCompany;
          parameters[23].Value = model.ChannelID;
          parameters[24].Value = model.Usefullife;
          parameters[25].Value = model.SubmitTime;
          parameters[26].Value = model.StockMost;
          parameters[27].Value = model.StockLess;
          parameters[28].Value = model.Remark;

          rowsAffected= DataBaseHelper.ExcuteSqlReturnInt("BiotbProduct_ADD", CommandType.StoredProcedure, parameters);
          if (rowsAffected != 0)
          {
              return int.Parse(parameters[0].ToString());
          }
          else
          {
              return 0;
          }

      }

      /// <summary>
      /// 修改产品对象
      /// </summary>
      /// <param name="model">产品对象</param>
      /// <returns>int</returns>
      public int BiotbProductUpdate(ViewProInfo model)
      {
          SqlParameter[] parameters = {
					new SqlParameter("@ProID", SqlDbType.Int,4),
					new SqlParameter("@ProName", SqlDbType.NVarChar,100),
					new SqlParameter("@TypeID", SqlDbType.Int,4),
					new SqlParameter("@CustomerID", SqlDbType.Int,4),
					new SqlParameter("@ProLogo", SqlDbType.NVarChar,200),
					new SqlParameter("@Spec", SqlDbType.NVarChar,100),
					new SqlParameter("@ProFullName", SqlDbType.NVarChar,100),
					new SqlParameter("@ConfirmNo", SqlDbType.NVarChar,100),
					new SqlParameter("@Unit", SqlDbType.NVarChar,50),
					new SqlParameter("@ProSize", SqlDbType.NVarChar,50),
					new SqlParameter("@Grossweight", SqlDbType.NVarChar,50),
					new SqlParameter("@MadeEnterprise", SqlDbType.NVarChar,100),
					new SqlParameter("@Retailprice", SqlDbType.Money,8),
					new SqlParameter("@BidPrice", SqlDbType.Money,8),
					new SqlParameter("@TradePrice", SqlDbType.Money,8),
					new SqlParameter("@AdvicePrice", SqlDbType.Money,8),
					new SqlParameter("@CountyPrice", SqlDbType.Money,8),
					new SqlParameter("@CityPrice", SqlDbType.Money,8),
					new SqlParameter("@ProvincePrice", SqlDbType.Money,8),
					new SqlParameter("@NetPrice", SqlDbType.Money,8),
					new SqlParameter("@NetVipPrice", SqlDbType.Money,8),
					new SqlParameter("@NetMemberprice", SqlDbType.Money,8),
					new SqlParameter("@OurCompany", SqlDbType.NVarChar,100),
					new SqlParameter("@ChannelID", SqlDbType.Int,4),
					new SqlParameter("@Usefullife", SqlDbType.NVarChar,50),
					new SqlParameter("@SubmitTime", SqlDbType.DateTime),
					new SqlParameter("@StockMost", SqlDbType.NVarChar,100),
					new SqlParameter("@StockLess", SqlDbType.NVarChar,100),
					new SqlParameter("@Remark", SqlDbType.NVarChar,1000)};
          parameters[0].Value = model.ProID;
          parameters[1].Value = model.ProName;
          parameters[2].Value = model.TypeID;
          parameters[3].Value = model.CustomerID;
          parameters[4].Value = model.ProLogo;
          parameters[5].Value = model.Spec;
          parameters[6].Value = model.ProFullName;
          parameters[7].Value = model.ConfirmNo;
          parameters[8].Value = model.Unit;
          parameters[9].Value = model.ProSize;
          parameters[10].Value = model.Grossweight;
          parameters[11].Value = model.MadeEnterprise;
          parameters[12].Value = model.Retailprice;
          parameters[13].Value = model.BidPrice;
          parameters[14].Value = model.TradePrice;
          parameters[15].Value = model.AdvicePrice;
          parameters[16].Value = model.CountyPrice;
          parameters[17].Value = model.CityPrice;
          parameters[18].Value = model.ProvincePrice;
          parameters[19].Value = model.NetPrice;
          parameters[20].Value = model.NetVipPrice;
          parameters[21].Value = model.NetMemberprice;
          parameters[22].Value = model.OurCompany;
          parameters[23].Value = model.ChannelID;
          parameters[24].Value = model.Usefullife;
          parameters[25].Value = model.SubmitTime;
          parameters[26].Value = model.StockMost;
          parameters[27].Value = model.StockLess;
          parameters[28].Value = model.Remark;

          return DataBaseHelper.ExcuteSqlReturnInt("BioProType_Update", CommandType.StoredProcedure, parameters);
      }

      /// <summary>
      /// 根据产品编号返回产品视图实体对象
      /// </summary>
      /// <param name="proid"></param>
      /// <returns></returns>
      public ViewProInfo getProViewByProId(string ProID)
      {
          SqlParameter[] parameters = {
					new SqlParameter("@ProID", SqlDbType.Int,4)
};
          parameters[0].Value = ProID;

          ViewProInfo model = new ViewProInfo();
          DataSet ds = DataBaseHelper.SelectSQLReturnDataSet("View_ProInfo_GetModel",CommandType.StoredProcedure,parameters);
          if (ds.Tables[0].Rows.Count > 0)
          {
              if (ds.Tables[0].Rows[0]["ProID"].ToString() != "")
              {
                  model.ProID = int.Parse(ds.Tables[0].Rows[0]["ProID"].ToString());
              }

              model.ProName = ds.Tables[0].Rows[0]["ProName"].ToString();
              if (ds.Tables[0].Rows[0]["TypeID"].ToString() != "")
              {
                  model.TypeID = int.Parse(ds.Tables[0].Rows[0]["TypeID"].ToString());
              }
              model.TypeName = ds.Tables[0].Rows[0]["TypeName"].ToString();
              if (ds.Tables[0].Rows[0]["CustomerID"].ToString() != "")
              {
                  model.CustomerID = int.Parse(ds.Tables[0].Rows[0]["CustomerID"].ToString());
              }
              model.CustomerName = ds.Tables[0].Rows[0]["CustomerName"].ToString();
              model.ProLogo = ds.Tables[0].Rows[0]["ProLogo"].ToString();
              model.Spec = ds.Tables[0].Rows[0]["Spec"].ToString();
              model.ProFullName = ds.Tables[0].Rows[0]["ProFullName"].ToString();
              model.ConfirmNo = ds.Tables[0].Rows[0]["ConfirmNo"].ToString();
              model.Unit = ds.Tables[0].Rows[0]["Unit"].ToString();
              model.ProSize = ds.Tables[0].Rows[0]["ProSize"].ToString();
              model.Grossweight = ds.Tables[0].Rows[0]["Grossweight"].ToString();
              model.MadeEnterprise = ds.Tables[0].Rows[0]["MadeEnterprise"].ToString();
              if (ds.Tables[0].Rows[0]["Retailprice"].ToString() != "")
              {
                  model.Retailprice = decimal.Parse(ds.Tables[0].Rows[0]["Retailprice"].ToString());
              }
              if (ds.Tables[0].Rows[0]["BidPrice"].ToString() != "")
              {
                  model.BidPrice = decimal.Parse(ds.Tables[0].Rows[0]["BidPrice"].ToString());
              }
              if (ds.Tables[0].Rows[0]["TradePrice"].ToString() != "")
              {
                  model.TradePrice = decimal.Parse(ds.Tables[0].Rows[0]["TradePrice"].ToString());
              }
              if (ds.Tables[0].Rows[0]["AdvicePrice"].ToString() != "")
              {
                  model.AdvicePrice = decimal.Parse(ds.Tables[0].Rows[0]["AdvicePrice"].ToString());
              }
              if (ds.Tables[0].Rows[0]["CountyPrice"].ToString() != "")
              {
                  model.CountyPrice = decimal.Parse(ds.Tables[0].Rows[0]["CountyPrice"].ToString());
              }
              if (ds.Tables[0].Rows[0]["CityPrice"].ToString() != "")
              {
                  model.CityPrice = decimal.Parse(ds.Tables[0].Rows[0]["CityPrice"].ToString());
              }
              if (ds.Tables[0].Rows[0]["ProvincePrice"].ToString() != "")
              {
                  model.ProvincePrice = decimal.Parse(ds.Tables[0].Rows[0]["ProvincePrice"].ToString());
              }
              if (ds.Tables[0].Rows[0]["NetPrice"].ToString() != "")
              {
                  model.NetPrice = decimal.Parse(ds.Tables[0].Rows[0]["NetPrice"].ToString());
              }
              if (ds.Tables[0].Rows[0]["NetVipPrice"].ToString() != "")
              {
                  model.NetVipPrice = decimal.Parse(ds.Tables[0].Rows[0]["NetVipPrice"].ToString());
              }
              if (ds.Tables[0].Rows[0]["NetMemberprice"].ToString() != "")
              {
                  model.NetMemberprice = decimal.Parse(ds.Tables[0].Rows[0]["NetMemberprice"].ToString());
              }
              model.OurCompany = ds.Tables[0].Rows[0]["OurCompany"].ToString();
              if (ds.Tables[0].Rows[0]["ChannelID"].ToString() != "")
              {
                  model.ChannelID = int.Parse(ds.Tables[0].Rows[0]["ChannelID"].ToString());
              }
              model.ChannelName = ds.Tables[0].Rows[0]["ChannelName"].ToString();
              model.Usefullife = ds.Tables[0].Rows[0]["Usefullife"].ToString();
              if (ds.Tables[0].Rows[0]["SubmitTime"].ToString() != "")
              {
                  model.SubmitTime = DateTime.Parse(ds.Tables[0].Rows[0]["SubmitTime"].ToString());
              }
              model.StockMost = ds.Tables[0].Rows[0]["StockMost"].ToString();
              model.StockLess = ds.Tables[0].Rows[0]["StockLess"].ToString();
              model.Remark = ds.Tables[0].Rows[0]["Remark"].ToString();
              return model;
          }
          else
          {
              return null;
          }
      }

    }

商品类型的业务:

public  class BioProTypeBLL
    {
      /// <summary>
      /// 添加一个产品类型对象
      /// </summary>
      /// <param name="model"></param>
      /// <returns></returns>
      public int ProTypeAdd(BioProType model)
      {
          SqlParameter[] parameters = {
					new SqlParameter("@ParentTypeID", SqlDbType.Int,4),
					new SqlParameter("@TypeName", SqlDbType.NVarChar,100)};

          parameters[0].Value = model.ParentTypeID;
          parameters[1].Value = model.TypeName;

          return DataBaseHelper.ExcuteSqlReturnInt("BioProType_Add", CommandType.StoredProcedure, parameters);

      }
      /// <summary>
      /// 产品类型修改
      /// </summary>
      /// <param name="model"></param>
      /// <returns></returns>
      public int ProTypeUpdate(BioProType model)
      {
          SqlParameter[] parameters = {
					new SqlParameter("@TypeID", SqlDbType.Int,4),
					new SqlParameter("@ParentTypeID", SqlDbType.Int,4),
					new SqlParameter("@TypeName", SqlDbType.NVarChar,100)};
          parameters[0].Value = model.TypeID;
          parameters[1].Value = model.ParentTypeID;
          parameters[2].Value = model.TypeName;

          return DataBaseHelper.ExcuteSqlReturnInt("BioProType_Update", CommandType.StoredProcedure, parameters);

      }

      /// <summary>
      /// 根据产品类型编号返回产品类型对象
      /// </summary>
      /// <param name="id"></param>
      /// <returns></returns>
      public BioProType getProTypeByTypeID(string id)
      {
         SqlDataReader reader= SqlComm.GetDataReaderByCondition("dbo.BioProType", "*", " TypeID=" + id);
         BioProType type = new BioProType();
         if (reader.Read())
         {
             if (reader["TypeID"] != null)
             {
                 type.TypeID = int.Parse(reader["TypeID"].ToString());
             }

             if (reader["ParentTypeID"] != null)
             {
                 type.ParentTypeID = int.Parse(reader["ParentTypeID"].ToString());
             }
             if (reader["TypeName"] != null)
             {
                 type.TypeName = reader["TypeName"].ToString();
             }
         }
         return type;
      }
    }

商品图片的BLL:

/// <summary>
       /// 添加一条图片对象
       /// </summary>
       /// <param name="images"></param>
       /// <returns></returns>
       public int BiotbProImgsAdd(BiotbProImgs images)
       {
           SqlParameter[] parameters = {
					new SqlParameter("@ProID", SqlDbType.Int,4),
					new SqlParameter("@ProImg", SqlDbType.NVarChar,200)};

           parameters[0].Value = images.ProID;
           parameters[1].Value = images.ProImg;

           return DataBaseHelper.ExcuteSqlReturnInt("BiotbProImgs_ADD", CommandType.StoredProcedure, parameters);

       }

添加产品类型的页面:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProTypeList.aspx.cs" Inherits="BioErpWeb.PersonList.ProTypeList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript">
        function ReturnValue(noteid) {
            if (noteid != NaN || noteid != 0) {
                window.returnValue = noteid;
                window.close();
            } else {
                window.returnValue = 0;
                window.close();
            }

       }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:TreeView ID="TreeView1" runat="server">
        </asp:TreeView>
    </div>
    </form>
</body>
</html>

选择的js:

function showProType() {
    var re = showModalDialog("../../PersonList/ProTypeList.aspx", "", "dialogWidth=350px;dialogHeight=400px");
    var obj = window.event.srcElement;
    var td = obj.parentNode;
    var txts = td.getElementsByTagName(‘input‘);
    if (re == null || re == "") {

        if (txts[0].value == "" || txts[0].value == null) {
            txts[0].value = "请选择";
        }
    }
    else {
        txts[0].value = re;
    }
}

后台代码:

  protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
              CreateTreeVeiw();
            }

        }

        DataSet ds;
        DataTable dt;

        private void CreateTreeVeiw()
        {

            ds = SqlComm.GetDataByCondition("dbo.BioProType", "TypeID,ParentTypeID,TypeName", "1=1");

            dt = new DataTable();
            dt = ds.Tables[0];
            if (dt.Rows.Count == 0)
            {
                Response.Write("<span style=‘color:red;‘>数据库中没有产品类型数据,请直接输入0即可…</span>");
                return;
            }

            DataView dv = new DataView(dt, "ParentTypeID=0 or ParentTypeID=null", "TypeID", DataViewRowState.CurrentRows);
            //遍历父节点
            foreach (DataRowView d in dv)
            {
                TreeNode n = new TreeNode(d["TypeName"].ToString(), d["TypeID"].ToString());
                n.ImageToolTip = dt.TableName;
                n.NavigateUrl = "javascript:ReturnValue(" + d["TypeID"].ToString() + ");";
                TreeView1.Nodes.Add(n);
                n.Expanded = false;
                //根据父节点筛选出对应的子节点
                dv = new DataView(dt, " ParentTypeID=‘" + d["TypeID"] + "‘", "TypeID", DataViewRowState.CurrentRows);
                if (dv.Count > 0)
                {
                    CreateSubTreeView(n, dv);

                }
            }

        }

        /// <summary>
        /// 添加子项
        /// </summary>
        /// <param name="n"></param>
        /// <param name="dv"></param>
        private void CreateSubTreeView(TreeNode n, DataView dv)
        {
            foreach (DataRowView d in dv)
            {
                TreeNode cn = new TreeNode(d["TypeName"].ToString(), d["TypeID"].ToString());
                cn.NavigateUrl = "javascript:ReturnValue(" + d["TypeID"].ToString() + ");";
                n.ChildNodes.Add(cn);
                DataView sdv = new DataView(dt, "ParentTypeID=‘" + d["TypeID"] + "‘", "TypeID", DataViewRowState.CurrentRows);
                if (sdv.Count > 0)
                {
                    CreateSubTreeView(cn, sdv);
                }

            }
        }

类型的添加:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProTypeInsert.aspx.cs"
    Inherits="BioErpWeb.WholeSaleSystem.Product.ProTypeInsert" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../../Styles/ERPBaseStyle.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.validate.js" type="text/javascript"></script>
    <script src="../../Scripts/ValidateMessage_ZW.js" type="text/javascript"></script>
    <script src="../../Scripts/validateExtender.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.metadata.js" type="text/javascript"></script>
    <script src="../../JS/ProTypeChoose.js" type="text/javascript"></script>
    <style type="text/css">
        .style1
        {
            height: 22px;
        }
    </style>

    <script type="text/javascript">
        $().ready(function () {
            $("#form1").validate();
          });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table class="maintable">
            <tr>
                <td colspan="2" class="titlebar">
                    产品类型添加
                </td>
            </tr>
            <tr>
                <td class="style1">
                    类型名称
                </td>
                <td class="style1">
                    <asp:TextBox ID="txtTypeName" CssClass="{required:true}" runat="server" ></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    所属大类</td>
                <td class="style1">
                    <asp:TextBox ID="txtSupertTypeID"
                        CssClass="{required:true, number:true, min:0}" runat="server"
                        ></asp:TextBox><input type="button" value="选择" onclick="showProType()"/>

                    <asp:Label ID="Label1" runat="server" ForeColor="Red" Text="(注:如果为0代表顶级父类)"></asp:Label>
                </td>
            </tr>

            <tr>
                <td colspan="2" class="bottomtd">
                    <asp:Button ID="btnSubmit" runat="server" Text="产品类型保存" OnClick="btnSubmit_Click" />
                    <asp:Button ID="btnReturn" runat="server" CausesValidation="false" UseSubmitBehavior="false" Text="返回列表" OnClick="btnReturn_Click" />
                </td>
            </tr>
        </table>
        <br />
    </div>
    </form>
</body>
</html>

添加的代码:

BioProTypeBLL typebll=new BioProTypeBLL();

            BioProType type = new BioProType();
            type.ParentTypeID = int.Parse(this.txtSupertTypeID.Text.Trim()) ;
            type.TypeName = this.txtTypeName.Text;
            if (typebll.ProTypeAdd(type) != 0)
            {
                ClientScript.RegisterStartupScript(this.GetType(), "test", "alert(‘添加类型成功‘)", true);
                return;
            }
时间: 2024-10-12 11:14:20

ERP商品管理业务逻辑封装(三十一)的相关文章

QT开发(三十一)——NotePad实例开发

QT开发(三十一)--NotePad实例开发 一.界面开发 NotePad使用主窗口作为顶层窗口组件,使用QMainWindow作为基类,QMainWindow内部封装了菜单栏.工具栏.中央组件.停靠组件.状态栏等.QMainWindow内置了布局管理器,基本的组件布局如下: 使用二阶构造模式构建NotePad界面. MainWindow::MainWindow() {     resize(800, 600); }   MainWindow::~MainWindow() {   }   Mai

第三十一天 慵懒的投射在JDBC上的暖阳 —Hibernate的使用(四)

6月19日,小雨."黄梅时节家家雨,青草池塘处处蛙.有约不来过夜半,闲敲棋子落灯花." 面向对象无限包容的个性,给对SQL和数据库一窍不通的澳大利亚人Gavin King创造了极大的想象空间.那些原本尴尬的不利因素---OO对象模型和关系型数据库之间的设计理念上的差异即-"O/R阻抗失衡(O/R Impedance Mismatch)"等.在澳大利亚人的转化手段中,都被自觉或不自觉地消除了.Hibernate的出现,让面向对象的对象模型和关系型数据库的数据结构之间的

【WPF学习】第三十一章 WPF命令模型

原文:[WPF学习]第三十一章 WPF命令模型 WPF命令模型由许多可变的部分组成.总之,它们都具有如下4个重要元素: 命令:命令表示应用程序任务,并且跟踪任务是否能够被执行.然而,命令实际上不包含执行应用程序任务的代码. 命令绑定:每个命令绑定针对用户界面的具体区域,将命令连接到相关的应用程序逻辑.这种分解的设计是非常重要的,因为单个命令可用于应用程序中的多个地方,并且在每个地方具有不同的意义.为处理这一问题,需要将同一命令与不同的命令绑定. 命令源:命令源触发命令.例如,MenuItem和B

[原创]ActionScript3游戏中的图像编程(连载三十一)

2.2.4 Photoshop转Flash的投影角度换算 继续往下看,Photoshop不透明度选项下面是投影角度,默认值是120°,而Flash里角度是45°,两者相差将近90°,投影角度却相近,为什么?让我们把Flash的投影滤镜也设置成120°.(图 2.20) 图 2.20 角度值等于120的Flash投影 投影跑左边去了,x方向与Photoshop里的投影位置截然相反.经观察,Flash投影的角度与ActionScript的坐标系完全一致,它等于当前方向与水平线的夹角,顺时针为正,逆时

ActionScript3游戏中的图像编程(连载三十一)

2.2.4 Photoshop转Flash的投影角度换算 继续往下看,Photoshop不透明度选项下面是投影角度,默认值是120°,而Flash里角度是45°,两者相差将近90°,投影角度却相近,为什么?让我们把Flash的投影滤镜也设置成120°.(图 2.20) 图 2.20 角度值等于120的Flash投影 投影跑左边去了,x方向与Photoshop里的投影位置截然相反.经观察,Flash投影的角度与ActionScript的坐标系完全一致,它等于当前方向与水平线的夹角,顺时针为正,逆时

同一个逻辑的三种写法

同一个逻辑的三种写法: 我的写法 ? 林姐的写法 方法一 方法二 这种方法节省内存

三十一、Git中的fetch和pull

Git中从远程的分支获取最新的版本到本地有这样2个命令: 1. git fetch:相当于是从远程获取最新版本到本地,不会自动merge     git fetch origin master git log -p master..origin/master git merge origin/master 以上命令的含义:   首先从远程的origin的master主分支下载最新的版本到origin/master分支上   然后比较本地的master分支和origin/master分支的差别  

【FastDev4Android框架开发】RecyclerView完全解析之下拉刷新与上拉加载SwipeRefreshLayout(三十一)

转载请标明出处: http://blog.csdn.net/developer_jiangqq/article/details/49992269 本文出自:[江清清的博客] (一).前言: [好消息]个人网站已经上线运行,后面博客以及技术干货等精彩文章会同步更新,请大家关注收藏:http://www.lcode.org 话说RecyclerView已经面市很久,也在很多应用中得到广泛的使用,在整个开发者圈子里面也拥有很不错的口碑,那说明RecyclerView拥有比ListView,GridVi

centos 邮件服务 第三十一节课

centos   邮件服务  第三十一节课 上半节课 下半节课 f