コード例 #1
0
ファイル: ItemDal.cs プロジェクト: bsmile32/Prowelding
        public string InsertMasItem(MasItemDTO item)
        {
            string err = "";

            try
            {
                List <SqlParameter> paramI = new List <SqlParameter>();
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "ItemCode", Value = item.ItemCode
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "ItemName", Value = item.ItemName
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "ItemDesc", Value = item.ItemDesc
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "ItemPrice", Value = item.ItemPrice, DbType = DbType.Double
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "UnitID", Value = item.UnitID, DbType = DbType.Int32
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "ItemTypeID", Value = item.ItemTypeID, DbType = DbType.Int32
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "DistID", Value = item.UnitID, DbType = DbType.Int32
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "MinRemaining", Value = item.MinRemaining, DbType = DbType.Int32
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "User", Value = item.CreatedBy
                });
                conn.ExcuteNonQueryNClose("InsertMasItem", paramI, out err);
            }
            catch (Exception ex)
            {
                err = ex.Message;
            }
            return(err);
        }
コード例 #2
0
        public string InsUpdDelMasPackageHeader(MasPackageHeader item)
        {
            string err = "";

            try
            {
                List <SqlParameter> paramI = new List <SqlParameter>();
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "PackageHeaderID", Value = item.PackageHeaderID
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "PackageCode", Value = item.PackageCode
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "PackageName", Value = item.PackageName
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "SellPrice", Value = item.SellPrice, DbType = DbType.Double
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "Active", Value = item.Active, DbType = DbType.String
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "CreatedBy", Value = item.CreatedBy, DbType = DbType.String
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "DMLFlag", Value = item.DMLFlag
                });
                conn.ExcuteNonQueryNClose("InsUpdDelMasPackageHeader", paramI, out err);
            }
            catch (Exception ex)
            {
                err = ex.Message;
            }
            return(err);
        }
コード例 #3
0
ファイル: LogsDal.cs プロジェクト: Champpy/Prowelding
        public void InsertLogs(string Desc, string Type)
        {
            string err = "";

            try
            {
                List <SqlParameter> paramI = new List <SqlParameter>();
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "LogType", Value = Type
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "Description", Value = Desc
                });

                conn.ExcuteNonQueryNClose("InsLogs", paramI, out err);
            }
            catch (Exception ex)
            {
            }
        }
コード例 #4
0
ファイル: StockDal.cs プロジェクト: bsmile32/Prowelding
        public string InsertStock(List <InventoryDTO> lst, string User)
        {
            string err = "";

            try
            {
                List <SqlParameter> paramI = new List <SqlParameter>();
                foreach (InventoryDTO item in lst)
                {
                    paramI = new List <SqlParameter>();
                    paramI.Add(new SqlParameter()
                    {
                        ParameterName = "Remark", Value = item.Remark
                    });
                    paramI.Add(new SqlParameter()
                    {
                        ParameterName = "ItemID", Value = item.ItemID, DbType = DbType.Int32
                    });
                    paramI.Add(new SqlParameter()
                    {
                        ParameterName = "Amount", Value = item.Amount, DbType = DbType.Int32
                    });
                    paramI.Add(new SqlParameter()
                    {
                        ParameterName = "Serial", Value = item.Serial
                    });
                    paramI.Add(new SqlParameter()
                    {
                        ParameterName = "User", Value = User
                    });
                    conn.ExcuteNonQueryNClose("InsertTransInboundNStock", paramI, out err);
                }
            }
            catch (Exception ex)
            {
                err = ex.Message;
            }
            return(err);
        }
コード例 #5
0
ファイル: StockDal.cs プロジェクト: Champpy/Prowelding
        public string UpdateSaleCancel(Int32 HeaderID, string User)
        {
            string err = "";

            try
            {
                DataSet             ds    = new DataSet();
                List <SqlParameter> param = new List <SqlParameter>();
                param.Add(new SqlParameter()
                {
                    ParameterName = "SaleHeaderID", Value = HeaderID
                });
                param.Add(new SqlParameter()
                {
                    ParameterName = "UpdatedBy", Value = User
                });
                conn.ExcuteNonQueryNClose("UpdTransSaleCancel", param, out err);
            }
            catch (Exception ex)
            {
                err = ex.Message;
            }
            return(err);
        }
コード例 #6
0
ファイル: ProductDal.cs プロジェクト: Champpy/Prowelding
        public string InsUpdDelMasProduct(MasProduct item)
        {
            string err = "";

            try
            {
                List <SqlParameter> paramI = new List <SqlParameter>();
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "ProductID", Value = item.ProductID, DbType = DbType.Int32
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "ProductCode", Value = item.ProductCode
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "ProductName", Value = item.ProductName
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "PurchasePrice", Value = item.PurchasePrice, DbType = DbType.Double
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "SellPrice", Value = item.SellPrice, DbType = DbType.Double
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "Active", Value = item.Active, DbType = DbType.String
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "CreatedBy", Value = item.CreatedBy, DbType = DbType.String
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "UnitID", Value = item.UnitID, DbType = DbType.Int32
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "TypeID", Value = item.TypeID, DbType = DbType.Int32
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "Remaining", Value = item.Remaining, DbType = DbType.Int32
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "RemainingHeadQ", Value = item.RemainingHeadQ, DbType = DbType.Int32
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "ProductSN", Value = item.ProductSN, DbType = DbType.String
                });
                paramI.Add(new SqlParameter()
                {
                    ParameterName = "DMLFlag", Value = item.DMLFlag
                });

                conn.ExcuteNonQueryNClose("InsUpdDelMasProduct", paramI, out err);
            }
            catch (Exception ex)
            {
                err = ex.Message;
            }
            return(err);
        }