Ejemplo n.º 1
0
        /// <summary>
        /// 修改物料分类
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool UpdateMaterialClass(MaterialClass model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update MaterialClass set ");
            strSql.Append("MaterialClassCode=@MaterialClassCode,");
            strSql.Append("MaterialClassName=@MaterialClassName,");
            strSql.Append("Remark=@Remark");
            strSql.Append(" where MaterialClassID=@MaterialClassID ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@MaterialClassCode", SqlDbType.VarChar,  30),
                new SqlParameter("@MaterialClassName", SqlDbType.VarChar,  60),
                new SqlParameter("@Remark",            SqlDbType.VarChar, 255),
                new SqlParameter("@MaterialClassID",   SqlDbType.VarChar, 36)
            };
            parameters[0].Value = model.MaterialClassCode;
            parameters[1].Value = model.MaterialClassName;
            parameters[2].Value = model.Remark;
            parameters[3].Value = model.MaterialClassID;

            int rows = DBAccess.ExecuteNonQuery(DB.Type, DB.ConnectionString, CommandType.Text, strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 2
0
    /// <summary>
    /// 获取所有子物体  并 记录信息
    /// </summary>
    /// <param name="objs"></param>
    public void GetAll(GameObject objs)
    {
        for (int i = 0; i < objs.transform.childCount; i++)
        {
            GameObject temp = objs.transform.GetChild(i).gameObject;

            children.Add(temp);
            if (recordTransform)
            {
                positions.Add(temp.transform.localPosition);
                rotations.Add(temp.transform.localRotation);
                enable.Add(temp.activeSelf);
                scales.Add(temp.transform.localScale);
            }

            if (recordObjsInfo)
            {
                if (temp.GetComponent <MeshRenderer>())
                {
                    //通过图层过滤
                    if (objs.layer != 8)
                    {
                        int matsCount;
                        #if UNITY_EDITOR
                        matsCount = temp.GetComponent <MeshRenderer>().sharedMaterials.Length;
                        #else
                        matsCount = temp.GetComponent <MeshRenderer>().materials.Length;
                        #endif
                        objInfoClass tempObj = new objInfoClass();
                        tempObj.obj = temp;
                        for (int j = 0; j < matsCount; j++)
                        {
                            MaterialClass tempMaterials = new MaterialClass();
                            #if UNITY_EDITOR
                            tempMaterials.shader = temp.GetComponent <MeshRenderer>().sharedMaterials[j].shader;
                            if (temp.GetComponent <MeshRenderer>().sharedMaterials[j].HasProperty("_Color"))
                            {
                                tempMaterials.color = temp.GetComponent <MeshRenderer>().sharedMaterials[j].color;
                            }
                            #else
                            tempMaterials.shader = temp.GetComponent <MeshRenderer>().materials[j].shader;
                            if (temp.GetComponent <MeshRenderer>().materials[j].HasProperty("_Color"))
                            {
                                tempMaterials.color = temp.GetComponent <MeshRenderer>().materials[j].color;
                            }
                            #endif
                            tempObj.objMaterials.Add(tempMaterials);
                        }
                        objsInfo.Add(tempObj);
                    }
                }
            }

            if (temp.transform.childCount > 0)
            {
                GetAll(temp);
            }
        }
    }
Ejemplo n.º 3
0
    private void SwitchLights()
    {
        MaterialClass material = LightsON ? MaterialLightsOn : MaterialLightsOff;

        SetPropertySimple("Door", "Glass", BaseObject.transform, material);
        SetPropertyMaterial("Windows", "Glass", BaseObject.transform, material);
        ChangeFloorProperty("Windows", "Glass", material);
    }
Ejemplo n.º 4
0
 private void ChangeFloorProperty(string propName, string propDtail, MaterialClass material)
 {
     for (int i = 0; i < FloorHolder.transform.childCount; i++)
     {
         Transform child = FloorHolder.transform.GetChild(i);
         if (child)
         {
             SetPropertyMaterial(propName, propDtail, child, material);
         }
     }
 }
Ejemplo n.º 5
0
        /// <summary>
        /// 获取物料分类List
        /// </summary>
        /// <returns></returns>
        public IList <MaterialClass> GetMaterialClass()
        {
            try
            {
                StringBuilder strSql = new StringBuilder();
                strSql.Append(" select * from MaterialClass ");
                IList <MaterialClass> list = new List <MaterialClass>();

                DataSet ds = DBAccess.ExecuteDataset(DB.Type, DB.ConnectionString, CommandType.Text, strSql.ToString(), null);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow dr in ds.Tables[0].Rows)
                    {
                        MaterialClass materialClass = new MaterialClass();
                        if (dr["MaterialClassID"] != null && dr["MaterialClassID"].ToString() != "")
                        {
                            materialClass.MaterialClassID = dr["MaterialClassID"].ToString();
                        }
                        if (dr["MaterialClassCode"] != null && dr["MaterialClassCode"].ToString() != "")
                        {
                            materialClass.MaterialClassCode = dr["MaterialClassCode"].ToString();
                        }
                        if (dr["MaterialClassName"] != null && dr["MaterialClassName"].ToString() != "")
                        {
                            materialClass.MaterialClassName = dr["MaterialClassName"].ToString();
                        }
                        if (dr["Remark"] != null && dr["Remark"].ToString() != "")
                        {
                            materialClass.Remark = dr["Remark"].ToString();
                        }
                        list.Add(materialClass);
                    }
                }

                return(list);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                //
            }
        }
Ejemplo n.º 6
0
    private void SetMaterial(string childName, MaterialClass material)
    {
        Transform child = BaseObject.transform.FindChild(childName);

        if (child)
        {
            for (int i = 0; i < child.childCount; i++)
            {
                Renderer r = child.transform.GetChild(i).GetComponent <Renderer>();
                if (r)
                {
                    r.material = material.Material;
                }
            }
        }
        child = RoofObject.transform.FindChild(childName);
        if (child)
        {
            for (int i = 0; i < child.childCount; i++)
            {
                Renderer r = child.transform.GetChild(i).GetComponent <Renderer>();
                if (r)
                {
                    r.material = material.Material;
                }
            }
        }

        for (int i = 0; i < FloorHolder.transform.childCount; i++)
        {
            child = FloorHolder.transform.GetChild(i).FindChild(childName);
            if (child)
            {
                for (int j = 0; j < child.childCount; j++)
                {
                    Renderer r = child.transform.GetChild(j).GetComponent <Renderer>();
                    if (r)
                    {
                        r.material = material.Material;
                    }
                }
            }
        }
    }
Ejemplo n.º 7
0
    /// <summary>
    /// 获取当前物体及子物体  并 记录信息
    /// </summary>
    /// <param name="objs"></param>
    public void GetAndRecordTransform(GameObject objs)
    {
        children.Add(objs);

        //记录 Transform 信息
        if (recordTransform)
        {
            positions.Add(objs.transform.position);
            rotations.Add(objs.transform.rotation);
            enable.Add(objs.activeSelf);
            scales.Add(objs.transform.localScale);
        }

        if (recordObjsInfo)
        {
            if (objs.GetComponent <MeshRenderer>())
            {
                //通过图层过滤物体
                if (objs.layer != 8)
                {
                    int          matsCount = objs.GetComponent <MeshRenderer>().materials.Length;
                    objInfoClass tempObj   = new objInfoClass();
                    tempObj.obj = objs;
                    for (int i = 0; i < matsCount; i++)
                    {
                        MaterialClass tempMatInfo = new MaterialClass();
                        tempMatInfo.shader = objs.GetComponent <MeshRenderer>().materials[i].shader;
                        if (objs.GetComponent <MeshRenderer>().materials[i].HasProperty("_Color"))
                        {
                            tempMatInfo.color = objs.GetComponent <MeshRenderer>().materials[i].color;
                        }
                        tempObj.objMaterials.Add(tempMatInfo);
                    }
                    objsInfo.Add(tempObj);
                }
            }
        }
        // 递归 记录 obj 子物体信息
        foreach (Transform child in objs.transform)
        {
            GetAndRecordTransform(child.gameObject);
        }
    }
Ejemplo n.º 8
0
        /// <summary>
        /// 获取物料分类模型
        /// </summary>
        /// <param name="MaterialClassID"></param>
        /// <returns></returns>
        public MaterialClass GetModel(string MaterialClassID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 MaterialClassID,MaterialClassCode,MaterialClassName,Remark from MaterialClass ");
            strSql.Append(" where MaterialClassID=@MaterialClassID ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@MaterialClassID", SqlDbType.VarChar, 36)
            };
            parameters[0].Value = MaterialClassID;

            MaterialClass model = new MaterialClass();
            DataSet       ds    = DBAccess.ExecuteDataset(DB.Type, DB.ConnectionString, CommandType.Text, strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["MaterialClassID"] != null && ds.Tables[0].Rows[0]["MaterialClassID"].ToString() != "")
                {
                    model.MaterialClassID = ds.Tables[0].Rows[0]["MaterialClassID"].ToString();
                }
                if (ds.Tables[0].Rows[0]["MaterialClassCode"] != null && ds.Tables[0].Rows[0]["MaterialClassCode"].ToString() != "")
                {
                    model.MaterialClassCode = ds.Tables[0].Rows[0]["MaterialClassCode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["MaterialClassName"] != null && ds.Tables[0].Rows[0]["MaterialClassName"].ToString() != "")
                {
                    model.MaterialClassName = ds.Tables[0].Rows[0]["MaterialClassName"].ToString();
                }
                if (ds.Tables[0].Rows[0]["Remark"] != null && ds.Tables[0].Rows[0]["Remark"].ToString() != "")
                {
                    model.Remark = ds.Tables[0].Rows[0]["Remark"].ToString();
                }
                return(model);
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 9
0
        /// <summary>
        /// 添加物料分类
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int AddMaterialClass(MaterialClass model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into MaterialClass(");
            strSql.Append("MaterialClassID,MaterialClassCode,MaterialClassName,Remark)");
            strSql.Append(" values (");
            strSql.Append("@MaterialClassID,@MaterialClassCode,@MaterialClassName,@Remark)");
            SqlParameter[] parameters =
            {
                new SqlParameter("@MaterialClassID",   SqlDbType.VarChar, 36),
                new SqlParameter("@MaterialClassCode", SqlDbType.VarChar, 30),
                new SqlParameter("@MaterialClassName", SqlDbType.VarChar, 60),
                new SqlParameter("@Remark",            SqlDbType.VarChar, 255)
            };
            parameters[0].Value = model.MaterialClassID;
            parameters[1].Value = model.MaterialClassCode;
            parameters[2].Value = model.MaterialClassName;
            parameters[3].Value = model.Remark;

            return(DBAccess.ExecuteNonQuery(DB.Type, DB.ConnectionString, CommandType.Text, strSql.ToString(), parameters));
        }
Ejemplo n.º 10
0
        public Form2()
        {
            InitializeComponent();

            MaterialClass.material(this);
        }
Ejemplo n.º 11
0
        public static Item Generate(ItemClass itemClass = ItemClass.Any, Rarity rarity = Rarity.Any, Quality quality = Quality.Any, MaterialClass materialClass = MaterialClass.Any, MaterialType materialType = MaterialType.Any)
        {
            Item item = new Item();

            if (rarity == Rarity.Any)
            {
                double rarityPercent = Azmyth.Numbers.Percent() * 100;

                rarity = Rarity.None;

                for (int i = (int)Rarity.None; i < (int)Rarity.Max; i++)
                {
                    if ((float)rarityPercent >= ItemTables.RarityDropChances[i])
                        rarity++;
                }

                 rarity--;
            }

            item.Rarity = rarity;

            if (quality == Quality.Any)
            {
                double qualityPercent = Azmyth.Numbers.Percent() * 100;

                quality = Quality.Poor;

                for (int i = (int)Quality.Poor; i < (int)Quality.Max; i++)
                {
                    if ((float)qualityPercent >= ItemTables.QualityDropChances[i])
                        quality++;
                }

                quality--;
            }

            item.Quality = quality;

            if (materialClass == MaterialClass.Any)
            {
                double materialTypePercent = Azmyth.Numbers.Percent() * 100;

                materialClass = MaterialClass.None;

                for (int i = (int)MaterialClass.None; i < (int)MaterialClass.Max; i++)
                {
                    if ((float)materialTypePercent >= ItemTables.MaterialTypeDropChances[i])
                        materialClass++;
                }

                materialClass--;
            }

            item.MaterialClass = materialClass;

            if (materialType == MaterialType.Any)
            {
                double materialPercent = Azmyth.Numbers.Percent() * 100;

                materialType = MaterialType.Cloth;
                var materials = ItemTables.Materials.Values.Where(i => i.MaterialType == item.MaterialClass);

                foreach (Material m in materials)
                {
                    if ((float)materialPercent >= m.DropMod)
                        materialType = m.MaterialID;
                }
            }

            item.MaterialType = materialType;

            if (itemClass == ItemClass.Any)
            {
                double itemTypePercent = Azmyth.Numbers.Percent() * 100;

                itemClass = ItemClass.None;

                for (int i = (int)ItemClass.None; i < (int)ItemClass.Max; i++)
                {
                    if ((float)itemTypePercent >= ItemTables.ItemTypeDropChances[i])
                        itemClass++;
                }

                itemClass--;
            }

            item.ItemClass = itemClass;

            var itemTypes = ItemTables.ItemTypes.Where(i => i.ItemClass == item.ItemClass);

            int num = Numbers.NumberRange(0, itemTypes.Count<ItemType>()-1);
            int count = 0;

            foreach(ItemType t in itemTypes)
            {
                if(count == num)
                {
                    item.ItemType = t;
                    break;
                }

                count++;
            }

            string[] names = item.ItemType.Names.Split('|');

            num = Numbers.NumberRange(0, names.Count<string>()-1);

            item.Name = quality + " quality " + rarity +" " + materialType + " " + names[num];

            item.Name = Azmyth.Strings.Article(item.Name) + " " + item.Name;

            return item;
        }
Ejemplo n.º 12
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            ProductClass  productClass  = new ProductClass();
            MaterialClass materialClass = new MaterialClass();


            bool state;

            condition = this.Text.Trim();

            if (formHelper.inputCheck(pnlMKind))
            {
                #region  获取下拉列表框的内容 分别放入产品和材料类实例中
                if (!string.IsNullOrEmpty(txtValue.Text.Trim()))
                {
                    productClass.Kind   = txtValue.Text.Trim();
                    productClass.Name   = txtValue.Text.Trim();
                    productClass.Model  = txtValue.Text.Trim();
                    materialClass.Kind  = txtValue.Text.Trim();
                    materialClass.Name  = txtValue.Text.Trim();
                    materialClass.Model = txtValue.Text.Trim();
                }
                else
                {
                    productClass.Kind   = "";
                    productClass.Name   = "";
                    productClass.Model  = "";
                    materialClass.Kind  = "";
                    materialClass.Name  = "";
                    materialClass.Model = "";
                }
                productClass.PkId     = kindId;
                productClass.InputMan = this.userName;
                if (!string.IsNullOrEmpty(txtRemark.Text.Trim()))
                {
                    productClass.Remark  = txtRemark.Text.Trim();
                    materialClass.Remark = txtRemark.Text.Trim();
                }
                else
                {
                    productClass.Remark  = "";
                    materialClass.Remark = "";
                }

                materialClass.MkId     = kindId;
                materialClass.InputMan = this.userName;

                #endregion

                switch (condition)
                {
                case "新建产品种类":
                    #region 增加产品种类
                {
                    // 检查要输入种类的字段是否已存在;
                    if (vLogic.PSearchName(txtValue.Text.Trim(), 1))
                    {
                        MessageBox.Show("该记录已存在,请从新操作!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        txtValue.Clear();
                        return;
                    }
                    //if (!Check.CheckQueryIsEmpty(txtValue.Text.Trim()))
                    //{
                    //    MessageBox.Show("产品种类中含有非法字符,请重新输入!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    //    txtValue.Clear();
                    //    return;
                    //}

                    state = vLogic.PKindInsert(productClass);
                    dgvInfo.DataSource = pLogic.InitialPKindComboBox();

                    break;
                }

                    #endregion
                case "新建产品名称":
                    #region  增加产品名称
                {
                    // 检查要输入名称的字段是否已存在;
                    if (vLogic.PSearchName(txtValue.Text.Trim(), 2))
                    {
                        MessageBox.Show("该记录已存在,请从新操作!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        txtValue.Clear();
                        return;
                    }
                    //if (!Check.CheckQueryIsEmpty(txtValue.Text.Trim()))
                    //{
                    //    MessageBox.Show("产品名称中含有非法字符,请重新输入!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    //    txtValue.Clear();
                    //    return;
                    //}

                    state = vLogic.PNameInsert(productClass);
                    dgvInfo.DataSource = pLogic.InitialPNameComboBox(kindId);

                    break;
                }

                    #endregion
                case "新建产品规格":
                    #region  增加产品规格
                {
                    // 检查要输入规格的字段是否已存在;
                    if (vLogic.PSearchName(txtValue.Text.Trim(), 3))
                    {
                        MessageBox.Show("该记录已存在,请从新操作!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        txtValue.Clear();
                        return;
                    }
                    //if (!Check.CheckQueryIsEmpty(txtValue.Text.Trim()))
                    //{
                    //    MessageBox.Show("产品规格中含有非法字符,请重新输入!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    //    txtValue.Clear();
                    //    return;
                    //}

                    state = vLogic.PModelInsert(productClass);
                    dgvInfo.DataSource = vLogic.PModelSearch();

                    break;
                }

                    #endregion
                case "新建材料种类":
                    #region  增加材料种类
                {
                    // 检查要输入种类的字段是否已存在;
                    if (vLogic.PSearchName(txtValue.Text.Trim(), 4))
                    {
                        MessageBox.Show("该记录已存在,请从新操作!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        txtValue.Clear();
                        return;
                    }
                    //if (!Check.CheckQueryIsEmpty(txtValue.Text.Trim()))
                    //{
                    //    MessageBox.Show("材料种类种类中含有非法字符,请重新输入!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    //    txtValue.Clear();
                    //    return;
                    //}

                    state = vLogic.MKindInsert(materialClass);
                    dgvInfo.DataSource = mLogic.InitialMKindComboBox();

                    break;
                }

                    #endregion
                case "新建材料名称":
                    #region  增加材料名称
                {
                    // 检查要输入名称的字段是否已存在;
                    if (vLogic.PSearchName(txtValue.Text.Trim(), 5))
                    {
                        MessageBox.Show("该记录已存在,请从新操作!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        txtValue.Clear();
                        return;
                    }
                    //if (!Check.CheckQueryIsEmpty(txtValue.Text.Trim()))
                    //{
                    //    MessageBox.Show("材料名称中含有非法字符,请重新输入!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    //    txtValue.Clear();
                    //    return;
                    //}

                    state = vLogic.MNameInsert(materialClass);
                    dgvInfo.DataSource = mLogic.InitialMNameComboBox(kindId);

                    break;
                }

                    #endregion
                case "新建材料规格":
                    #region  增加材料规格
                {
                    // 检查要输入规格的字段是否已存在;
                    if (vLogic.PSearchName(txtValue.Text.Trim(), 6))
                    {
                        MessageBox.Show("该记录已存在,请从新操作!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        txtValue.Clear();
                        return;
                    }
                    //if (!Check.CheckQueryIsEmpty(txtValue.Text.Trim()))
                    //{
                    //    MessageBox.Show("材料规格中含有非法字符,请重新输入!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    //    txtValue.Clear();
                    //    return;
                    //}

                    state = vLogic.MModleInsert(materialClass);
                    dgvInfo.DataSource = vLogic.MModelSearch();

                    break;
                }

                    #endregion
                default:
                    state = true;
                    break;
                }

                dgvInfo.Columns["id"].Visible = false;

                // 清空文本框内容;
                ClearAction();

                if (state)
                {
                    //MessageBox.Show("新增记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    //this.DialogResult = DialogResult.OK;
                }
                else
                {
                    MessageBox.Show("新增记录失败,请从新操作!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Ejemplo n.º 13
0
    private void SetPropertySimple(string propName, string propDtail, Transform property, MaterialClass material)
    {
        Transform child = property.FindChild(propName);

        if (!child)
        {
            return;
        }
        child = child.FindChild(propDtail);
        if (!child)
        {
            return;
        }
        for (int i = 0; i < child.childCount; i++)
        {
            Renderer r = child.GetChild(i).GetComponent <Renderer>();
            if (r)
            {
                r.material = material.Material;
            }
        }
    }
Ejemplo n.º 14
0
    private void SetPropertyMaterial(string propName, string propDtail, Transform property, MaterialClass material)
    {
        Transform child = property.FindChild(propName);

        if (!child)
        {
            return;
        }
        for (int i = 0; i < child.childCount; i++)
        {
            Transform window = child.GetChild(i).FindChild(propDtail);
            if (window)
            {
                for (int j = 0; j < window.childCount; j++)
                {
                    Renderer r = window.GetChild(j).GetComponent <Renderer>();
                    if (r)
                    {
                        r.material = material.Material;
                    }
                }
            }
        }
    }
Ejemplo n.º 15
0
 public frmLogin()
 {
     InitializeComponent();
     MaterialClass.material(this);
     matTextPass.PasswordChar = '*';
 }
Ejemplo n.º 16
0
        public bool UpdateDetails(MaterialHierarchyType argsType)
        {
            MaterialHierarchy matGroup;

            switch (argsType)
            {
            case MaterialHierarchyType.Class:
            {
                // Assign new action if action is empty or view
                if (ClassAction == string.Empty || ClassAction == Constants.ViewAction)
                {
                    ClassAction = Constants.InsertAction;
                }
                matGroup = new MaterialClass
                {
                    Id          = ClassId.ToUpper(),
                    Description = ClassName,
                    Action      = ClassAction,
                    CreatedDate = ClassCreatedDate
                };
                break;
            }

            case MaterialHierarchyType.Type:
            {
                // Assign new action if action is empty or view
                if (TypeAction == string.Empty || TypeAction == Constants.ViewAction)
                {
                    TypeAction = Constants.InsertAction;
                }
                matGroup = new MaterialType
                {
                    Id            = TypeId.ToUpper(),
                    MaterialClass = new MaterialClass {
                        Id = TypeClassId
                    },
                    Description = TypeName,
                    Action      = TypeAction,
                    CreatedDate = TypeCreatedDate
                };
                break;
            }

            default:
            {
                // Assign new action if action is empty or view
                if (GroupAction == string.Empty || GroupAction == Constants.ViewAction)
                {
                    GroupAction = Constants.InsertAction;
                }
                matGroup = new MaterialGroup
                {
                    Id            = GroupId.ToUpper(),
                    MaterialClass = new MaterialClass {
                        Id = GroupClassId
                    },
                    MaterialType = new MaterialType {
                        Id = GroupTypeId
                    },
                    Description = GroupName,
                    Action      = GroupAction,
                    CreatedDate = GroupCreatedDate,
                    //Margin = Margin
                };
                break;
            }
            }
            matGroup.DataBaseInfo          = UserContext.DataBaseInfo;
            matGroup.MaterialHierarchyType = argsType;
            return(_controlPanel.SetMaterialHierarchies(new MaterialHierarchies {
                matGroup
            }));
        }
Ejemplo n.º 17
0
 /// <summary>
 /// 修改物料分类
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool UpdateMaterialClass(MaterialClass model)
 {
     return(iMaterialClassDAL.UpdateMaterialClass(model));
 }
Ejemplo n.º 18
0
 /// <summary>
 /// 添加物料分类
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int AddMaterialClass(MaterialClass model)
 {
     return(iMaterialClassDAL.AddMaterialClass(model));
 }
Ejemplo n.º 19
0
 public override string ToString()
 {
     return("Material-" + MaterialClass.ToString());
 }