Ejemplo n.º 1
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                TowelProduction MasterEntity = (TowelProduction)p_Entity;
                if (MasterEntity.ID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO WO_TowelProduction(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("ID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ID) + ",");
                MasterField.Append("SubmitFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SubmitFlag) + ",");
                MasterField.Append("DelFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DelFlag) + ",");
                MasterField.Append("FormNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FormNo) + ",");
                MasterField.Append("FormDate" + ",");
                if (MasterEntity.FormDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.FormDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("MakeOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MakeOPID) + ",");
                MasterField.Append("MakeOPName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MakeOPName) + ",");
                MasterField.Append("CardNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.CardNo) + ",");
                MasterField.Append("Qty" + ",");
                if (MasterEntity.Qty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Qty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("MWidth" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MWidth) + ",");
                MasterField.Append("MWeight" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MWeight) + ",");
                MasterField.Append("SeLaoDu" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SeLaoDu) + ",");
                MasterField.Append("SeCha" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SeCha) + ",");
                MasterField.Append("XishuiXing" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.XishuiXing) + ",");
                MasterField.Append("Remark" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Remark) + ",");
                MasterField.Append("HeGe" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.HeGe) + ",");
                MasterField.Append("PackNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.PackNo) + ",");
                MasterField.Append("BoxNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.BoxNo) + ",");
                MasterField.Append("WOTypeID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.WOTypeID) + ",");
                MasterField.Append("FAid" + ",");
                if (MasterEntity.FAid != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.FAid) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("MakeDate" + ",");
                if (MasterEntity.MakeDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.MakeDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("SaleOPID" + ")");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SaleOPID) + ")");



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                WH MasterEntity = (WH)p_Entity;
                if (MasterEntity.ID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO WH_WH(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("ID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ID) + ",");
                MasterField.Append("WHID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.WHID) + ",");
                MasterField.Append("WHNM" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.WHNM) + ",");
                MasterField.Append("WHType" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.WHType) + ",");
                MasterField.Append("WHStartDate" + ",");
                if (MasterEntity.WHStartDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.WHStartDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("WHCalMethodID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.WHCalMethodID) + ",");
                MasterField.Append("IsUseable" + ",");
                if (MasterEntity.IsUseable != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.IsUseable) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Remark" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Remark) + ",");
                MasterField.Append("WHPosMethodID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.WHPosMethodID) + ",");
                MasterField.Append("ItemUnit" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemUnit) + ",");
                MasterField.Append("SubmitFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SubmitFlag) + ",");
                MasterField.Append("DelFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DelFlag) + ",");
                MasterField.Append("ISJK" + ")");
                if (MasterEntity.ISJK != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.ISJK) + ")");
                }
                else
                {
                    MasterValue.Append("null)");
                }



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                PrintingProcessDts MasterEntity = (PrintingProcessDts)p_Entity;
                if (MasterEntity.ID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO WO_PrintingProcessDts(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("ID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ID) + ",");
                MasterField.Append("MainID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MainID) + ",");
                MasterField.Append("Seq" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Seq) + ",");
                MasterField.Append("ItemCode" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemCode) + ",");
                MasterField.Append("GoodsCode" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.GoodsCode) + ",");
                MasterField.Append("ColorNum" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ColorNum) + ",");
                MasterField.Append("ColorName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ColorName) + ",");
                MasterField.Append("MWidth" + ",");
                if (MasterEntity.MWidth != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.MWidth) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("MWeight" + ",");
                if (MasterEntity.MWeight != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.MWeight) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("WeightUnit" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.WeightUnit) + ",");
                MasterField.Append("ItemName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemName) + ",");
                MasterField.Append("VColorNum" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VColorNum) + ",");
                MasterField.Append("VColorName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VColorName) + ",");
                MasterField.Append("VItemCode" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VItemCode) + ",");
                MasterField.Append("Qty" + ",");
                if (MasterEntity.Qty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Qty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Unit" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Unit) + ",");
                MasterField.Append("SingPrice" + ",");
                if (MasterEntity.SingPrice != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.SingPrice) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Amount" + ",");
                if (MasterEntity.Amount != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Amount) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("ReceivedDate" + ",");
                if (MasterEntity.ReceivedDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.ReceivedDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("ReceivedQty" + ",");
                if (MasterEntity.ReceivedQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.ReceivedQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("TotalRecQty" + ",");
                if (MasterEntity.TotalRecQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.TotalRecQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("RemainQty" + ",");
                if (MasterEntity.RemainQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.RemainQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("RemainRate" + ",");
                if (MasterEntity.RemainRate != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.RemainRate) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("DtsReqDate" + ",");
                if (MasterEntity.DtsReqDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.DtsReqDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Remark" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Remark) + ",");
                MasterField.Append("OrderPreStatusID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.OrderPreStatusID) + ",");
                MasterField.Append("OrderStatusID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.OrderStatusID) + ",");
                MasterField.Append("DtsSO" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DtsSO) + ",");
                MasterField.Append("DVendorID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DVendorID) + ",");
                MasterField.Append("JarNum" + ")");
                MasterValue.Append(SysString.ToDBString(MasterEntity.JarNum) + ")");



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                CustomInvoiceDts MasterEntity = (CustomInvoiceDts)p_Entity;
                if (MasterEntity.MainID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO Ship_CustomInvoiceDts(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("MainID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MainID) + ",");
                MasterField.Append("Seq" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Seq) + ",");
                MasterField.Append("ItemCode" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemCode) + ",");
                MasterField.Append("ItemName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemName) + ",");
                MasterField.Append("ItemStd" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemStd) + ",");
                MasterField.Append("PackPlanID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.PackPlanID) + ",");
                MasterField.Append("PackPlanCode" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.PackPlanCode) + ",");
                MasterField.Append("DSN" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DSN) + ",");
                MasterField.Append("SSN" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SSN) + ",");
                MasterField.Append("StyleNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.StyleNo) + ",");
                MasterField.Append("SStyleNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SStyleNo) + ",");
                MasterField.Append("Qty" + ",");
                if (MasterEntity.Qty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Qty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("ICheckedQty" + ",");
                if (MasterEntity.ICheckedQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.ICheckedQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("ICheckedAmount" + ",");
                if (MasterEntity.ICheckedAmount != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.ICheckedAmount) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("ILeftQty" + ",");
                if (MasterEntity.ILeftQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.ILeftQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("ILeftAmount" + ",");
                if (MasterEntity.ILeftAmount != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.ILeftAmount) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Style" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Style) + ",");
                MasterField.Append("Unit" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Unit) + ",");
                MasterField.Append("Country" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Country) + ",");
                MasterField.Append("NetQty" + ",");
                if (MasterEntity.NetQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.NetQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("ZM" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ZM) + ",");
                MasterField.Append("NetWeight" + ",");
                if (MasterEntity.NetWeight != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.NetWeight) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("GrossWeight" + ",");
                if (MasterEntity.GrossWeight != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.GrossWeight) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("USPrice" + ",");
                if (MasterEntity.USPrice != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.USPrice) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("BoxNum" + ",");
                if (MasterEntity.BoxNum != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.BoxNum) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Model" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Model) + ",");
                MasterField.Append("AmountUnit" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.AmountUnit) + ",");
                MasterField.Append("PCSUnit" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.PCSUnit) + ",");
                MasterField.Append("SinglePrice" + ",");
                if (MasterEntity.SinglePrice != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.SinglePrice) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Amount" + ",");
                if (MasterEntity.Amount != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Amount) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("SKAmount" + ",");
                if (MasterEntity.SKAmount != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.SKAmount) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("SKDate" + ",");
                if (MasterEntity.SKDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.SKDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("SKOP" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SKOP) + ",");
                MasterField.Append("QGSinglePrice" + ",");
                if (MasterEntity.QGSinglePrice != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.QGSinglePrice) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("QGAmount" + ",");
                if (MasterEntity.QGAmount != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.QGAmount) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("QGQty" + ",");
                if (MasterEntity.QGQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.QGQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("ColorNum" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ColorNum) + ",");
                MasterField.Append("PieceQty" + ",");
                if (MasterEntity.PieceQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.PieceQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Volume" + ",");
                if (MasterEntity.Volume != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Volume) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("MWidth" + ",");
                if (MasterEntity.MWidth != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.MWidth) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("MWeight" + ")");
                if (MasterEntity.MWeight != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.MWeight) + ")");
                }
                else
                {
                    MasterValue.Append("null)");
                }



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                DesignDts MasterEntity = (DesignDts)p_Entity;
                if (MasterEntity.MainID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO WO_DesignDts(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("MainID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MainID) + ",");
                MasterField.Append("Seq" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Seq) + ",");
                MasterField.Append("ItemCode" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemCode) + ",");
                MasterField.Append("ItemName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemName) + ",");
                MasterField.Append("ItemStd" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemStd) + ",");
                MasterField.Append("ItemModel" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemModel) + ",");
                MasterField.Append("proportion" + ",");
                if (MasterEntity.proportion != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.proportion) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("SH" + ",");
                if (MasterEntity.SH != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.SH) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Qty" + ",");
                if (MasterEntity.Qty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Qty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Remark" + ")");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Remark) + ")");



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                ShipBoat MasterEntity = (ShipBoat)p_Entity;
                if (MasterEntity.ID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO Ship_ShipBoat(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("ID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ID) + ",");
                MasterField.Append("IvoiceNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.IvoiceNo) + ",");
                MasterField.Append("CompanyTypeID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.CompanyTypeID) + ",");
                MasterField.Append("SaleNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SaleNo) + ",");
                MasterField.Append("VendorID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VendorID) + ",");
                MasterField.Append("Model" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Model) + ",");
                MasterField.Append("ModelEn" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ModelEn) + ",");
                MasterField.Append("ShipDate" + ",");
                if (MasterEntity.ShipDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.ShipDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("RevisedDate" + ",");
                if (MasterEntity.RevisedDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.RevisedDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("OutDate" + ",");
                if (MasterEntity.OutDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.OutDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("TradeType" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.TradeType) + ",");
                MasterField.Append("GainType" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.GainType) + ",");
                MasterField.Append("ReceiveType" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ReceiveType) + ",");
                MasterField.Append("TransType" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.TransType) + ",");
                MasterField.Append("ShipTo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ShipTo) + ",");
                MasterField.Append("FactoryID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FactoryID) + ",");
                MasterField.Append("OutFacDate" + ",");
                if (MasterEntity.OutFacDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.OutFacDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("ExportDate" + ",");
                if (MasterEntity.ExportDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.ExportDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Messrs" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Messrs) + ",");
                MasterField.Append("SpeRequest" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SpeRequest) + ",");
                MasterField.Append("SCNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SCNo) + ",");
                MasterField.Append("BoatName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.BoatName) + ",");
                MasterField.Append("Container" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Container) + ",");
                MasterField.Append("Special" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Special) + ",");
                MasterField.Append("CroosWeight" + ",");
                if (MasterEntity.CroosWeight != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.CroosWeight) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("NetWeight" + ",");
                if (MasterEntity.NetWeight != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.NetWeight) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("PackNum" + ",");
                if (MasterEntity.PackNum != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.PackNum) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Shippers" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Shippers) + ",");
                MasterField.Append("Consignee" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Consignee) + ",");
                MasterField.Append("NotifyParty" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.NotifyParty) + ",");
                MasterField.Append("PortLoading" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.PortLoading) + ",");
                MasterField.Append("PortDischarge" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.PortDischarge) + ",");
                MasterField.Append("LCNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.LCNo) + ",");
                MasterField.Append("DelFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DelFlag) + ",");
                MasterField.Append("AddTime" + ",");
                if (MasterEntity.AddTime != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.AddTime.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("AddOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.AddOPID) + ",");
                MasterField.Append("UpdTime" + ",");
                if (MasterEntity.UpdTime != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.UpdTime.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("UpdOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.UpdOPID) + ",");
                MasterField.Append("SubmitFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SubmitFlag) + ",");
                MasterField.Append("SubmitTime" + ",");
                if (MasterEntity.SubmitTime != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.SubmitTime.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("SubmitOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SubmitOPID) + ",");
                MasterField.Append("AuditFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.AuditFlag) + ",");
                MasterField.Append("FromOPName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FromOPName) + ",");
                MasterField.Append("ToOPName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ToOPName) + ",");
                MasterField.Append("GoodsINWHDate" + ",");
                if (MasterEntity.GoodsINWHDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.GoodsINWHDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("FormListAID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FormListAID) + ",");
                MasterField.Append("BoatDate" + ",");
                if (MasterEntity.BoatDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.BoatDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("dex" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.dex) + ",");
                MasterField.Append("Code" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Code) + ",");
                MasterField.Append("PrintStatus" + ",");
                if (MasterEntity.PrintStatus != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.PrintStatus) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("TotalBulk" + ")");
                if (MasterEntity.TotalBulk != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.TotalBulk) + ")");
                }
                else
                {
                    MasterValue.Append("null)");
                }



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                MSGInput MasterEntity = (MSGInput)p_Entity;
                if (MasterEntity.ID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO SMS_MSGInput(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("ID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ID) + ",");
                MasterField.Append("FormNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FormNo) + ",");
                MasterField.Append("FormDate" + ",");
                if (MasterEntity.FormDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.FormDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("InsertTime" + ",");
                if (MasterEntity.InsertTime != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.InsertTime.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("MSGSourceID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MSGSourceID) + ",");
                MasterField.Append("Context" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Context) + ",");
                MasterField.Append("ReplaceRule" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ReplaceRule) + ",");
                MasterField.Append("SendInfo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SendInfo) + ",");
                MasterField.Append("SendDesc" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SendDesc) + ",");
                MasterField.Append("SubmitFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SubmitFlag) + ",");
                MasterField.Append("Remark" + ")");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Remark) + ")");



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                WinListAttachFile MasterEntity = (WinListAttachFile)p_Entity;
                if (MasterEntity.ID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO Data_WinListAttachFile(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("ID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ID) + ",");
                MasterField.Append("WinListID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.WinListID) + ",");
                MasterField.Append("HeadType" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.HeadType) + ",");
                MasterField.Append("SubType" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SubType) + ",");
                MasterField.Append("HTDataID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.HTDataID) + ",");
                MasterField.Append("HTDataSeq" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.HTDataSeq) + ",");
                MasterField.Append("FileProt1" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FileProt1) + ",");
                MasterField.Append("FileProt2" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FileProt2) + ",");
                MasterField.Append("FileProt3" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FileProt3) + ",");
                MasterField.Append("FileTitle" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FileTitle) + ",");
                MasterField.Append("FileName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FileName) + ",");
                MasterField.Append("FileContext" + ",");
                MasterValue.Append(@"@FileContext" + ",");
                MasterField.Append("FileSize" + ",");
                if (MasterEntity.FileSize != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.FileSize) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("UploadTime" + ",");
                if (MasterEntity.UploadTime != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.UploadTime.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("UploadOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.UploadOPID) + ",");
                MasterField.Append("UploadOPName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.UploadOPName) + ",");
                MasterField.Append("UploadLoginLogID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.UploadLoginLogID) + ",");
                MasterField.Append("FileTypeName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FileTypeName) + ",");
                MasterField.Append("FileExe" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FileExe) + ",");
                MasterField.Append("Remark" + ")");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Remark) + ")");



                object[,] obja = new object[2, 1];
                obja[0, 0]     = "@FileContext";
                obja[1, 0]     = MasterEntity.FileContext;

                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString(), obja);
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString(), obja);
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage(10020), E);
            }
        }
Ejemplo n.º 9
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                FabricWHOutForm MasterEntity = (FabricWHOutForm)p_Entity;
                if (MasterEntity.ID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO WO_FabricWHOutForm(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("ID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ID) + ",");
                MasterField.Append("MainID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MainID) + ",");
                MasterField.Append("FormNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FormNo) + ",");
                MasterField.Append("WHID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.WHID) + ",");
                MasterField.Append("MakeOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MakeOPID) + ",");
                MasterField.Append("MakeOPName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MakeOPName) + ",");
                MasterField.Append("MakeDate" + ",");
                if (MasterEntity.MakeDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.MakeDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("SubmitFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SubmitFlag) + ",");
                MasterField.Append("DelFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DelFlag) + ",");
                MasterField.Append("AutoIOFormID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.AutoIOFormID) + ",");
                MasterField.Append("AutoIOFormNo" + ")");
                MasterValue.Append(SysString.ToDBString(MasterEntity.AutoIOFormNo) + ")");



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 10
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnLoad_Click(object sender, EventArgs e)
        {
            try
            {
                IDBTransAccess sqlTrans = TransSysUtils.GetDBTransAccess();

                try
                {
                    sqlTrans.OpenTrans();
                    bool   flag = false;
                    string sql  = "Select * from Dev_GBJCDts where 1= 1";
                    if (GBCode != string.Empty)
                    {
                        sql += " AND " + GBCode;
                    }
                    DataTable dtDev = sqlTrans.Fill(sql);
                    for (int i = 0; i < dtDev.Rows.Count; i++)
                    {
                        string   VendorIDStr   = SysConvert.ToString(dtDev.Rows[i]["LYVendorID"]);
                        string   VendorNameStr = SysConvert.ToString(dtDev.Rows[i]["LYVendorName"]);
                        string[] vendorid      = VendorIDStr.Split(',');
                        if (SysConvert.ToString(dtDev.Rows[i]["LYVendorID"]) == "")
                        {
                            VendorIDStr = SysConvert.ToString(drpVendorID.EditValue);
                            sql         = "Select VendorAttn from Data_Vendor where VendorID = " + SysString.ToDBString(SysConvert.ToString(drpVendorID.EditValue));
                            DataTable dt = sqlTrans.Fill(sql);
                            if (dt.Rows.Count == 1)
                            {
                                VendorNameStr = SysConvert.ToString(dt.Rows[0]["VendorAttn"]);
                            }
                        }
                        else
                        {
                            sql = "Select VendorAttn from Data_Vendor where VendorID = " + SysString.ToDBString(SysConvert.ToString(drpVendorID.EditValue));
                            DataTable dt = sqlTrans.Fill(sql);
                            if (vendorid.Length > 0)
                            {
                                for (int j = 0; j < vendorid.Length; j++)
                                {
                                    if (vendorid[j].ToString() == SysConvert.ToString(drpVendorID.EditValue))
                                    {
                                        flag = true;
                                        break;
                                    }
                                }
                            }
                            if (!flag)
                            {
                                if (dt.Rows.Count == 1)
                                {
                                    VendorNameStr += "," + SysConvert.ToString(dt.Rows[0]["VendorAttn"]);
                                }
                                VendorIDStr += "," + SysConvert.ToString(drpVendorID.EditValue);
                            }
                        }

                        sql  = "UPDATE Dev_GBJCDts SET LYVendorID= " + SysString.ToDBString(VendorIDStr);
                        sql += ",LYVendorName = " + SysString.ToDBString(VendorNameStr);
                        sql += ",LYFlag = 1";
                        sql += " WHERE MainID =" + SysConvert.ToString(dtDev.Rows[i]["MainID"]);
                        sql += " AND Seq = " + SysConvert.ToString(dtDev.Rows[i]["Seq"]);
                        sqlTrans.ExecuteNonQuery(sql);
                    }
                    sqlTrans.CommitTrans();
                }
                catch (Exception TE)
                {
                    sqlTrans.RollbackTrans();
                    throw TE;
                }


                this.Close();
            }
            catch (Exception E)
            {
            }
        }
Ejemplo n.º 11
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                MachineManage MasterEntity = (MachineManage)p_Entity;
                if (MasterEntity.ID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO Data_MachineManage(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("ID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ID) + ",");
                MasterField.Append("Code" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Code) + ",");
                MasterField.Append("MachineType" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MachineType) + ",");
                MasterField.Append("Machine" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Machine) + ",");
                MasterField.Append("Needie" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Needie) + ",");
                MasterField.Append("UserFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.UserFlag) + ",");
                MasterField.Append("DayOuty" + ",");
                if (MasterEntity.DayOuty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.DayOuty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Remark" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Remark) + ",");
                MasterField.Append("DelFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DelFlag) + ",");
                MasterField.Append("JarNum" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.JarNum) + ",");
                MasterField.Append("NeedleLen" + ",");
                if (MasterEntity.NeedleLen != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.NeedleLen) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("TolNeedle" + ",");
                if (MasterEntity.TolNeedle != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.TolNeedle) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("InItem" + ")");
                if (MasterEntity.InItem != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.InItem) + ")");
                }
                else
                {
                    MasterValue.Append("null)");
                }



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 12
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                SOPlan MasterEntity = (SOPlan)p_Entity;
                if (MasterEntity.ID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO WO_SOPlan(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("ID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ID) + ",");
                MasterField.Append("CompanyTypeID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.CompanyTypeID) + ",");
                MasterField.Append("Code" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Code) + ",");
                MasterField.Append("VendorID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VendorID) + ",");
                MasterField.Append("InDate" + ",");
                if (MasterEntity.InDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.InDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("NeedDate" + ",");
                if (MasterEntity.NeedDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.NeedDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("SO" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SO) + ",");
                MasterField.Append("ItemCode" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemCode) + ",");
                MasterField.Append("ItemName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemName) + ",");
                MasterField.Append("ItemStd" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemStd) + ",");
                MasterField.Append("ItemModel" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemModel) + ",");
                MasterField.Append("CompactQty" + ",");
                if (MasterEntity.CompactQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.CompactQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Qty" + ",");
                if (MasterEntity.Qty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Qty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("MakeOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MakeOPID) + ",");
                MasterField.Append("MakeDate" + ",");
                if (MasterEntity.MakeDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.MakeDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("DelFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DelFlag) + ",");
                MasterField.Append("SubmitFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SubmitFlag) + ",");
                MasterField.Append("Remark" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Remark) + ",");
                MasterField.Append("ItemUnit" + ")");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemUnit) + ")");



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 13
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                SParamset MasterEntity = (SParamset)p_Entity;
                if (MasterEntity.ID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO SMS_SParamset(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("ID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ID) + ",");
                MasterField.Append("Code" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Code) + ",");
                MasterField.Append("Name" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Name) + ",");
                MasterField.Append("SetValueStr" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SetValueStr) + ",");
                MasterField.Append("SetValueInt" + ",");
                if (MasterEntity.SetValueInt != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.SetValueInt) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("SetValueDt" + ",");
                if (MasterEntity.SetValueDt != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.SetValueDt.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Remark" + ")");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Remark) + ")");



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 14
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                IOFormDtsInputPack MasterEntity = (IOFormDtsInputPack)p_Entity;
                if (MasterEntity.ID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO WH_IOFormDtsInputPack(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("ID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ID) + ",");
                MasterField.Append("MainID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MainID) + ",");
                MasterField.Append("Seq" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Seq) + ",");
                MasterField.Append("SubSeq" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SubSeq) + ",");
                MasterField.Append("PackNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.PackNo) + ",");
                MasterField.Append("BoxNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.BoxNo) + ",");
                MasterField.Append("Qty" + ",");
                if (MasterEntity.Qty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Qty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("FactQty" + ",");
                if (MasterEntity.FactQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.FactQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("PDQty" + ",");
                if (MasterEntity.PDQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.PDQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Remark" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Remark) + ",");
                MasterField.Append("DID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DID) + ",");
                MasterField.Append("Unit" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Unit) + ",");
                MasterField.Append("InputQty" + ",");
                if (MasterEntity.InputQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.InputQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("InputUnit" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.InputUnit) + ",");
                MasterField.Append("InputConvertXS" + ")");
                if (MasterEntity.InputConvertXS != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.InputConvertXS) + ")");
                }
                else
                {
                    MasterValue.Append("null)");
                }



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 15
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                YarnCompactDts MasterEntity = (YarnCompactDts)p_Entity;
                if (MasterEntity.MainID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO Buy_YarnCompactDts(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("MainID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MainID) + ",");
                MasterField.Append("Seq" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Seq) + ",");
                MasterField.Append("ItemCode" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemCode) + ",");
                MasterField.Append("ItemName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemName) + ",");
                MasterField.Append("ItemStd" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemStd) + ",");
                MasterField.Append("ItemModel" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemModel) + ",");
                MasterField.Append("DesignNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DesignNo) + ",");
                MasterField.Append("Qty" + ",");
                if (MasterEntity.Qty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Qty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Amount" + ",");
                if (MasterEntity.Amount != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Amount) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Remark" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Remark) + ",");
                MasterField.Append("SOID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SOID) + ",");
                MasterField.Append("ColorName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ColorName) + ",");
                MasterField.Append("ColorNum" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ColorNum) + ",");
                MasterField.Append("EditionNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.EditionNo) + ",");
                MasterField.Append("InWHDate" + ",");
                if (MasterEntity.InWHDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.InWHDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Yarnstatus" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Yarnstatus) + ",");
                MasterField.Append("CompactQty" + ",");
                if (MasterEntity.CompactQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.CompactQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("UnitPrice" + ",");
                if (MasterEntity.UnitPrice != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.UnitPrice) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("InWHQty" + ",");
                if (MasterEntity.InWHQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.InWHQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("YarnTypeID" + ")");
                MasterValue.Append(SysString.ToDBString(MasterEntity.YarnTypeID) + ")");



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 16
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                ISNTemp MasterEntity = (ISNTemp)p_Entity;
                if (MasterEntity.ID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO WO_ISNTemp(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("ID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ID) + ",");
                MasterField.Append("ISN" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ISN) + ",");
                MasterField.Append("Status" + ",");
                if (MasterEntity.Status != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Status) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Sort" + ",");
                if (MasterEntity.Sort != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Sort) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("ImportTime" + ")");
                if (MasterEntity.ImportTime != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.ImportTime.ToString("yyyy-MM-dd HH:mm:ss")) + ")");
                }
                else
                {
                    MasterValue.Append("null)");
                }



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 17
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                InfoMainAtt MasterEntity = (InfoMainAtt)p_Entity;
                if (MasterEntity.MainID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO BBS_InfoMainAtt(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("MainID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MainID) + ",");
                MasterField.Append("Seq" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Seq) + ",");
                MasterField.Append("FileTypeID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FileTypeID) + ",");
                MasterField.Append("Context" + ",");
                MasterValue.Append(@"@Context" + ",");
                MasterField.Append("EntityID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.EntityID) + ",");
                MasterField.Append("EntitySeq" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.EntitySeq) + ",");
                MasterField.Append("FileName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FileName) + ",");
                MasterField.Append("FileExec" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FileExec) + ",");
                MasterField.Append("FileLength" + ",");
                if (MasterEntity.FileLength != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.FileLength) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Remark" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Remark) + ",");
                MasterField.Append("UploadTime" + ",");
                if (MasterEntity.UploadTime != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.UploadTime.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("UploadOPID" + ")");
                MasterValue.Append(SysString.ToDBString(MasterEntity.UploadOPID) + ")");



                object[,] obja = new object[2, 1];
                obja[0, 0]     = "@Context";
                obja[1, 0]     = MasterEntity.Context;

                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString(), obja);
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString(), obja);
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 18
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                GoodsPost MasterEntity = (GoodsPost)p_Entity;
                if (MasterEntity.ID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO Att_GoodsPost(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("ID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ID) + ",");
                MasterField.Append("FormNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FormNo) + ",");
                MasterField.Append("MakeOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MakeOPID) + ",");
                MasterField.Append("MakeOPName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MakeOPName) + ",");
                MasterField.Append("MakeDate" + ",");
                if (MasterEntity.MakeDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.MakeDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("CheckOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.CheckOPID) + ",");
                MasterField.Append("CheckDate" + ",");
                if (MasterEntity.CheckDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.CheckDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("SubmitFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SubmitFlag) + ",");
                MasterField.Append("DelFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DelFlag) + ",");
                MasterField.Append("FormDate" + ",");
                if (MasterEntity.FormDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.FormDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("PostComID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.PostComID) + ",");
                MasterField.Append("PostCode" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.PostCode) + ",");
                MasterField.Append("RecName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.RecName) + ",");
                MasterField.Append("RecPhone" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.RecPhone) + ",");
                MasterField.Append("PostFee" + ",");
                if (MasterEntity.PostFee != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.PostFee) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("VendorID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VendorID) + ",");
                MasterField.Append("RecAddress" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.RecAddress) + ",");
                MasterField.Append("Remark" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Remark) + ",");
                MasterField.Append("JSFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.JSFlag) + ",");
                MasterField.Append("JSDate" + ",");
                if (MasterEntity.JSDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.JSDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("JSFee" + ",");
                if (MasterEntity.JSFee != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.JSFee) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("JSRemark" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.JSRemark) + ",");
                MasterField.Append("FJR" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FJR) + ",");
                MasterField.Append("PostType" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.PostType) + ",");
                MasterField.Append("GOFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.GOFlag) + ",");
                MasterField.Append("SKType" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SKType) + ",");
                MasterField.Append("TotalPieceQty" + ",");
                if (MasterEntity.TotalPieceQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.TotalPieceQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("TotalQty" + ",");
                if (MasterEntity.TotalQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.TotalQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("JJVendor" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.JJVendor) + ",");
                MasterField.Append("PostComFirst" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.PostComFirst) + ",");
                MasterField.Append("ConFormNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ConFormNo) + ",");
                MasterField.Append("ConID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ConID) + ",");
                MasterField.Append("Context" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Context) + ",");
                MasterField.Append("PostFormType" + ")");
                MasterValue.Append(SysString.ToDBString(MasterEntity.PostFormType) + ")");



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 19
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                LYGL MasterEntity = (LYGL)p_Entity;
                if (MasterEntity.ID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO Dev_LYGL(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("ID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ID) + ",");
                MasterField.Append("FormNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FormNo) + ",");
                MasterField.Append("MakeOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MakeOPID) + ",");
                MasterField.Append("MakeOPName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MakeOPName) + ",");
                MasterField.Append("MakeDate" + ",");
                if (MasterEntity.MakeDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.MakeDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("CheckOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.CheckOPID) + ",");
                MasterField.Append("CheckDate" + ",");
                if (MasterEntity.CheckDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.CheckDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("SubmitFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SubmitFlag) + ",");
                MasterField.Append("DelFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DelFlag) + ",");
                MasterField.Append("FormDate" + ",");
                if (MasterEntity.FormDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.FormDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("VendorID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VendorID) + ",");
                MasterField.Append("SaleOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SaleOPID) + ",");
                MasterField.Append("Remark" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Remark) + ",");
                MasterField.Append("PostComID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.PostComID) + ",");
                MasterField.Append("PostCode" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.PostCode) + ",");
                MasterField.Append("RecName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.RecName) + ",");
                MasterField.Append("RecPhone" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.RecPhone) + ",");
                MasterField.Append("LYVendorName" + ")");
                MasterValue.Append(SysString.ToDBString(MasterEntity.LYVendorName) + ")");



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 20
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                OP MasterEntity = (OP)p_Entity;
                if (MasterEntity.ID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO Data_OP(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("ID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ID) + ",");
                MasterField.Append("OPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.OPID) + ",");
                MasterField.Append("OPName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.OPName) + ",");
                MasterField.Append("SDuty" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SDuty) + ",");
                MasterField.Append("SDep" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SDep) + ",");
                MasterField.Append("SWork" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SWork) + ",");
                MasterField.Append("Sex" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Sex) + ",");
                MasterField.Append("Birthday" + ",");
                if (MasterEntity.Birthday != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Birthday.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Diploma" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Diploma) + ",");
                MasterField.Append("InDate" + ",");
                if (MasterEntity.InDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.InDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("CardID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.CardID) + ",");
                MasterField.Append("Origin" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Origin) + ",");
                MasterField.Append("Nation" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Nation) + ",");
                MasterField.Append("Political" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Political) + ",");
                MasterField.Append("MarriageState" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MarriageState) + ",");
                MasterField.Append("Phone" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Phone) + ",");
                MasterField.Append("Address" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Address) + ",");
                MasterField.Append("Email" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Email) + ",");
                MasterField.Append("DefaultFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DefaultFlag) + ",");
                MasterField.Append("UseableFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.UseableFlag) + ",");
                MasterField.Append("WebFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.WebFlag) + ",");
                MasterField.Append("Remark" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Remark) + ",");
                MasterField.Append("DRoleID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DRoleID) + ",");
                MasterField.Append("DelFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DelFlag) + ",");
                MasterField.Append("Password" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Password) + ",");
                MasterField.Append("Mobile" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Mobile) + ",");
                MasterField.Append("OPCode" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.OPCode) + ",");
                MasterField.Append("DepID" + ")");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DepID) + ")");



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 21
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                Storge MasterEntity = (Storge)p_Entity;
                if (MasterEntity.ID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO WH_Storge(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("ID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ID) + ",");
                MasterField.Append("WHID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.WHID) + ",");
                MasterField.Append("SectionID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SectionID) + ",");
                MasterField.Append("SBitID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SBitID) + ",");
                MasterField.Append("VendorID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VendorID) + ",");
                MasterField.Append("CustomerID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.CustomerID) + ",");
                MasterField.Append("WHType" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.WHType) + ",");
                MasterField.Append("ItemCode" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemCode) + ",");
                MasterField.Append("ItemName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemName) + ",");
                MasterField.Append("ItemStd" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemStd) + ",");
                MasterField.Append("Batch" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Batch) + ",");
                MasterField.Append("VendorBatch" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VendorBatch) + ",");
                MasterField.Append("Twist" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Twist) + ",");
                MasterField.Append("YarnType" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.YarnType) + ",");
                MasterField.Append("Weight" + ",");
                if (MasterEntity.Weight != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Weight) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("TubeGW" + ",");
                if (MasterEntity.TubeGW != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.TubeGW) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("TubeQty" + ",");
                if (MasterEntity.TubeQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.TubeQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Qty" + ",");
                if (MasterEntity.Qty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Qty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("LockQty" + ",");
                if (MasterEntity.LockQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.LockQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("FreeQty" + ",");
                if (MasterEntity.FreeQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.FreeQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Needle" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Needle) + ",");
                MasterField.Append("SinglePrice" + ",");
                if (MasterEntity.SinglePrice != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.SinglePrice) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Amount" + ",");
                if (MasterEntity.Amount != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Amount) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("PieceQty" + ",");
                if (MasterEntity.PieceQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.PieceQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Unit" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Unit) + ",");
                MasterField.Append("ColorNum" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ColorNum) + ",");
                MasterField.Append("ColorName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ColorName) + ",");
                MasterField.Append("JarNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.JarNo) + ",");
                MasterField.Append("JarNum" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.JarNum) + ",");
                MasterField.Append("SO" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SO) + ",");
                MasterField.Append("LastUpdTime" + ",");
                if (MasterEntity.LastUpdTime != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.LastUpdTime.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("LastUpdOP" + ",");
                if (MasterEntity.LastUpdOP != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.LastUpdOP.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Remark" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Remark) + ",");
                MasterField.Append("Indate" + ",");
                if (MasterEntity.Indate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Indate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("DutyOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DutyOPID) + ",");
                MasterField.Append("CostPrice" + ",");
                if (MasterEntity.CostPrice != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.CostPrice) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("WHQualityFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.WHQualityFlag) + ",");
                MasterField.Append("WHQualityFFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.WHQualityFFlag) + ",");
                MasterField.Append("WHXiePianFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.WHXiePianFlag) + ",");
                MasterField.Append("VColorNum" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VColorNum) + ",");
                MasterField.Append("VColorName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VColorName) + ",");
                MasterField.Append("VItemCode" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VItemCode) + ",");
                MasterField.Append("GoodsCode" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.GoodsCode) + ",");
                MasterField.Append("GoodsLevel" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.GoodsLevel) + ",");
                MasterField.Append("MWidth" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MWidth) + ",");
                MasterField.Append("MWeight" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MWeight) + ",");
                MasterField.Append("WeightUnit" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.WeightUnit) + ",");
                MasterField.Append("OrderFormNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.OrderFormNo) + ",");
                MasterField.Append("MLType" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MLType) + ",");
                MasterField.Append("PDDate" + ",");
                if (MasterEntity.PDDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.PDDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("PDFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.PDFlag) + ",");
                MasterField.Append("DVendorID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DVendorID) + ",");
                MasterField.Append("StyleNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.StyleNo) + ",");
                MasterField.Append("Yard" + ")");
                if (MasterEntity.Yard != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Yard) + ")");
                }
                else
                {
                    MasterValue.Append("null)");
                }



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 22
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                InvoiceOperationDts MasterEntity = (InvoiceOperationDts)p_Entity;
                if (MasterEntity.ID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO Finance_InvoiceOperationDts(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("ID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ID) + ",");
                MasterField.Append("MainID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MainID) + ",");
                MasterField.Append("Seq" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Seq) + ",");
                MasterField.Append("DLOADID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DLOADID) + ",");
                MasterField.Append("DLOADSEQ" + ",");
                if (MasterEntity.DLOADSEQ != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.DLOADSEQ) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("DLOADNO" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DLOADNO) + ",");
                MasterField.Append("DLOADDtsID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DLOADDtsID) + ",");
                MasterField.Append("DInvoiceQty" + ",");
                if (MasterEntity.DInvoiceQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.DInvoiceQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("DInvoiceSinglePrice" + ",");
                if (MasterEntity.DInvoiceSinglePrice != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.DInvoiceSinglePrice) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("DInvoiceAmount" + ",");
                if (MasterEntity.DInvoiceAmount != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.DInvoiceAmount) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Remark" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Remark) + ",");
                MasterField.Append("PayAmount" + ",");
                if (MasterEntity.PayAmount != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.PayAmount) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("DInvoiceTaxAmount" + ",");
                if (MasterEntity.DInvoiceTaxAmount != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.DInvoiceTaxAmount) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("ItemCode" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemCode) + ",");
                MasterField.Append("ColorNum" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ColorNum) + ",");
                MasterField.Append("ColorName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ColorName) + ",");
                MasterField.Append("GoodsCode" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.GoodsCode) + ",");
                MasterField.Append("DLoadCheckDtsID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DLoadCheckDtsID) + ",");
                MasterField.Append("DInvoiceDYPrice" + ",");
                if (MasterEntity.DInvoiceDYPrice != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.DInvoiceDYPrice) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Unit" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Unit) + ",");
                MasterField.Append("MergeFlage" + ")");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MergeFlage) + ")");



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 23
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                InfoMain MasterEntity = (InfoMain)p_Entity;
                if (MasterEntity.DSYSID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO BBS_InfoMain(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("DSYSID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DSYSID) + ",");
                MasterField.Append("Code" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Code) + ",");
                MasterField.Append("FormDate" + ",");
                if (MasterEntity.FormDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.FormDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("DTitle" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DTitle) + ",");
                MasterField.Append("DContext" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DContext) + ",");
                MasterField.Append("DRemark" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DRemark) + ",");
                MasterField.Append("SubmitFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SubmitFlag) + ",");
                MasterField.Append("SubmitOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SubmitOPID) + ",");
                MasterField.Append("SubmitTime" + ",");
                if (MasterEntity.SubmitTime != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.SubmitTime.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("CheckFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.CheckFlag) + ",");
                MasterField.Append("CheckOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.CheckOPID) + ",");
                MasterField.Append("CheckTime" + ",");
                if (MasterEntity.CheckTime != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.CheckTime.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("AddTime" + ",");
                if (MasterEntity.AddTime != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.AddTime.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("AddOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.AddOPID) + ",");
                MasterField.Append("LastTime" + ",");
                if (MasterEntity.LastTime != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.LastTime.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("LastOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.LastOPID) + ",");
                MasterField.Append("ShareFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ShareFlag) + ",");
                MasterField.Append("ViewNum" + ",");
                if (MasterEntity.ViewNum != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.ViewNum) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("InfoType" + ")");
                MasterValue.Append(SysString.ToDBString(MasterEntity.InfoType) + ")");



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 24
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                DBFormDts MasterEntity = (DBFormDts)p_Entity;
                if (MasterEntity.ID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO WH_DBFormDts(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("ID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ID) + ",");
                MasterField.Append("MainID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MainID) + ",");
                MasterField.Append("Seq" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Seq) + ",");
                MasterField.Append("CompanyTypeID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.CompanyTypeID) + ",");
                MasterField.Append("WHTypeID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.WHTypeID) + ",");
                MasterField.Append("WHID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.WHID) + ",");
                MasterField.Append("SectionID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SectionID) + ",");
                MasterField.Append("SBitID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SBitID) + ",");
                MasterField.Append("DtsVendorID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DtsVendorID) + ",");
                MasterField.Append("FromWHID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FromWHID) + ",");
                MasterField.Append("FromSectionID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FromSectionID) + ",");
                MasterField.Append("FromSBitID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FromSBitID) + ",");
                MasterField.Append("ItemCode" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemCode) + ",");
                MasterField.Append("ItemName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemName) + ",");
                MasterField.Append("ItemStd" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemStd) + ",");
                MasterField.Append("ItemModel" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemModel) + ",");
                MasterField.Append("Batch" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Batch) + ",");
                MasterField.Append("VendorBatch" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VendorBatch) + ",");
                MasterField.Append("ColorNum" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ColorNum) + ",");
                MasterField.Append("ColorName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ColorName) + ",");
                MasterField.Append("JarNum" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.JarNum) + ",");
                MasterField.Append("YarnStatus" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.YarnStatus) + ",");
                MasterField.Append("YarnTypeID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.YarnTypeID) + ",");
                MasterField.Append("SizeName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SizeName) + ",");
                MasterField.Append("Remark" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Remark) + ",");
                MasterField.Append("Qty" + ",");
                if (MasterEntity.Qty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Qty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Unit" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Unit) + ",");
                MasterField.Append("Weight" + ",");
                if (MasterEntity.Weight != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Weight) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("SinglePrice" + ",");
                if (MasterEntity.SinglePrice != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.SinglePrice) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Amount" + ",");
                if (MasterEntity.Amount != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Amount) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("WAmount" + ",");
                if (MasterEntity.WAmount != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.WAmount) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("DtsSO" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DtsSO) + ",");
                MasterField.Append("DtsSaleOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DtsSaleOPID) + ",");
                MasterField.Append("Needle" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Needle) + ",");
                MasterField.Append("YarnType" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.YarnType) + ",");
                MasterField.Append("SourceQty" + ",");
                if (MasterEntity.SourceQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.SourceQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("MoveQty" + ",");
                if (MasterEntity.MoveQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.MoveQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("SourceWeight" + ",");
                if (MasterEntity.SourceWeight != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.SourceWeight) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("MoveWeight" + ",");
                if (MasterEntity.MoveWeight != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.MoveWeight) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("TubeGW" + ",");
                if (MasterEntity.TubeGW != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.TubeGW) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("SourceTubeQty" + ",");
                if (MasterEntity.SourceTubeQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.SourceTubeQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("MoveTubeQty" + ",");
                if (MasterEntity.MoveTubeQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.MoveTubeQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("TubeQty" + ",");
                if (MasterEntity.TubeQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.TubeQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("SourcePieceQty" + ",");
                if (MasterEntity.SourcePieceQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.SourcePieceQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("MovePieceQty" + ",");
                if (MasterEntity.MovePieceQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.MovePieceQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("PieceQty" + ",");
                if (MasterEntity.PieceQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.PieceQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("PieceQtyDesc" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.PieceQtyDesc) + ",");
                MasterField.Append("JarNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.JarNo) + ",");
                MasterField.Append("Twist" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Twist) + ",");
                MasterField.Append("DLCode" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DLCode) + ",");
                MasterField.Append("GoodsCode" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.GoodsCode) + ",");
                MasterField.Append("GoodsLevel" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.GoodsLevel) + ",");
                MasterField.Append("VColorNum" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VColorNum) + ",");
                MasterField.Append("VColorName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VColorName) + ",");
                MasterField.Append("VItemCode" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VItemCode) + ",");
                MasterField.Append("PFPrice" + ",");
                if (MasterEntity.PFPrice != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.PFPrice) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("ToWHID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ToWHID) + ",");
                MasterField.Append("ToSectionID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ToSectionID) + ",");
                MasterField.Append("ToSBitID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ToSBitID) + ",");
                MasterField.Append("MWidth" + ",");
                if (MasterEntity.MWidth != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.MWidth) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("MWeight" + ",");
                if (MasterEntity.MWeight != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.MWeight) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("WeightUnit" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.WeightUnit) + ",");
                MasterField.Append("DtsInVendorID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DtsInVendorID) + ",");
                MasterField.Append("InSO" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.InSO) + ",");
                MasterField.Append("InOrderFormNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.InOrderFormNo) + ",");
                MasterField.Append("InvoiceQty" + ",");
                if (MasterEntity.InvoiceQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.InvoiceQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("InvoiceAmount" + ",");
                if (MasterEntity.InvoiceAmount != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.InvoiceAmount) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("PayAmount" + ",");
                if (MasterEntity.PayAmount != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.PayAmount) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("DtsInvoiceDelFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DtsInvoiceDelFlag) + ",");
                MasterField.Append("DtsInvoiceDelOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DtsInvoiceDelOPID) + ",");
                MasterField.Append("DtsInvoiceDelTime" + ",");
                if (MasterEntity.DtsInvoiceDelTime != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.DtsInvoiceDelTime.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("DtsInvoiceNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DtsInvoiceNo) + ",");
                MasterField.Append("DZQty" + ",");
                if (MasterEntity.DZQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.DZQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("DZSinglePrice" + ",");
                if (MasterEntity.DZSinglePrice != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.DZSinglePrice) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("DZAmount" + ",");
                if (MasterEntity.DZAmount != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.DZAmount) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("DZFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DZFlag) + ",");
                MasterField.Append("DZOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DZOPID) + ",");
                MasterField.Append("DZTime" + ",");
                if (MasterEntity.DZTime != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.DZTime.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("DZNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DZNo) + ",");
                MasterField.Append("FreeNum1" + ",");
                if (MasterEntity.FreeNum1 != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.FreeNum1) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("DtsOrderFormNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DtsOrderFormNo) + ",");
                MasterField.Append("InSaleOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.InSaleOPID) + ",");
                MasterField.Append("Tax" + ",");
                if (MasterEntity.Tax != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Tax) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("TaxAmount" + ",");
                if (MasterEntity.TaxAmount != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.TaxAmount) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("PackDts" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.PackDts) + ",");
                MasterField.Append("MLType" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MLType) + ",");
                MasterField.Append("DYPrice" + ",");
                if (MasterEntity.DYPrice != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.DYPrice) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("YQQty" + ",");
                if (MasterEntity.YQQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.YQQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("AQty" + ",");
                if (MasterEntity.AQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.AQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("NOKPQty" + ",");
                if (MasterEntity.NOKPQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.NOKPQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("NoKPAmount" + ",");
                if (MasterEntity.NoKPAmount != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.NoKPAmount) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("PackFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.PackFlag) + ",");
                MasterField.Append("LoadDtsID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.LoadDtsID) + ",");
                MasterField.Append("InputQty" + ",");
                if (MasterEntity.InputQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.InputQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("InputUnit" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.InputUnit) + ",");
                MasterField.Append("InputSinglePrice" + ",");
                if (MasterEntity.InputSinglePrice != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.InputSinglePrice) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("InputAmount" + ",");
                if (MasterEntity.InputAmount != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.InputAmount) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("InputConvertXS" + ")");
                if (MasterEntity.InputConvertXS != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.InputConvertXS) + ")");
                }
                else
                {
                    MasterValue.Append("null)");
                }



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 25
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                TowelProductionPlanDtsStep MasterEntity = (TowelProductionPlanDtsStep)p_Entity;
                if (MasterEntity.ID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO WO_TowelProductionPlanDtsStep(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("ID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ID) + ",");
                MasterField.Append("MainID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MainID) + ",");
                MasterField.Append("DtsID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DtsID) + ",");
                MasterField.Append("SubSeq" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SubSeq) + ",");
                MasterField.Append("StepID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.StepID) + ",");
                MasterField.Append("CardNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.CardNo) + ",");
                MasterField.Append("RecQty" + ",");
                if (MasterEntity.RecQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.RecQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("RecDate" + ",");
                if (MasterEntity.RecDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.RecDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("ZPQty" + ",");
                if (MasterEntity.ZPQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.ZPQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("CPQty" + ",");
                if (MasterEntity.CPQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.CPQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("CompleteDate" + ",");
                if (MasterEntity.CompleteDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.CompleteDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("MakeOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MakeOPID) + ",");
                MasterField.Append("ProOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ProOPID) + ",");
                MasterField.Append("Remark" + ")");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Remark) + ")");



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 26
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                OrderProgressDts MasterEntity = (OrderProgressDts)p_Entity;
                if (MasterEntity.ID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO Sale_OrderProgressDts(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("ID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ID) + ",");
                MasterField.Append("MainID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MainID) + ",");
                MasterField.Append("Seq" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Seq) + ",");
                MasterField.Append("FollowNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FollowNo) + ",");
                MasterField.Append("ModelCode" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ModelCode) + ",");
                MasterField.Append("ModelName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ModelName) + ",");
                MasterField.Append("GoodsCode" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.GoodsCode) + ",");
                MasterField.Append("ItemCode" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemCode) + ",");
                MasterField.Append("ColorNum" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ColorNum) + ",");
                MasterField.Append("ColorName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ColorName) + ",");
                MasterField.Append("Qty" + ",");
                if (MasterEntity.Qty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Qty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("ReqDate" + ",");
                if (MasterEntity.ReqDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.ReqDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("SR" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SR) + ",");
                MasterField.Append("FS" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FS) + ",");
                MasterField.Append("ZZ" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ZZ) + ",");
                MasterField.Append("RZ" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.RZ) + ",");
                MasterField.Append("CP" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.CP) + ",");
                MasterField.Append("DRemark" + ")");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DRemark) + ")");



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 27
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                AuditPriceDts MasterEntity = (AuditPriceDts)p_Entity;
                if (MasterEntity.MainID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO Sale_AuditPriceDts(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("MainID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MainID) + ",");
                MasterField.Append("Seq" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Seq) + ",");
                MasterField.Append("ItemCode" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemCode) + ",");
                MasterField.Append("ItemName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemName) + ",");
                MasterField.Append("ItemStd" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemStd) + ",");
                MasterField.Append("ItemModel" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ItemModel) + ",");
                MasterField.Append("Price" + ",");
                if (MasterEntity.Price != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Price) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Amount" + ",");
                if (MasterEntity.Amount != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Amount) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("VendorID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VendorID) + ",");
                MasterField.Append("Percentage" + ",");
                if (MasterEntity.Percentage != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Percentage) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Loss" + ",");
                if (MasterEntity.Loss != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.Loss) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("Remark" + ")");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Remark) + ")");



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 28
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                FHForm MasterEntity = (FHForm)p_Entity;
                if (MasterEntity.ID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO Sale_FHForm(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("ID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ID) + ",");
                MasterField.Append("FormNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FormNo) + ",");
                MasterField.Append("MakeOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MakeOPID) + ",");
                MasterField.Append("MakeOPName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MakeOPName) + ",");
                MasterField.Append("MakeDate" + ",");
                if (MasterEntity.MakeDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.MakeDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("CheckOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.CheckOPID) + ",");
                MasterField.Append("CheckDate" + ",");
                if (MasterEntity.CheckDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.CheckDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("SubmitFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SubmitFlag) + ",");
                MasterField.Append("DelFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DelFlag) + ",");
                MasterField.Append("SHR" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SHR) + ",");
                MasterField.Append("LXR" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.LXR) + ",");
                MasterField.Append("VendorID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VendorID) + ",");
                MasterField.Append("SendCode" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SendCode) + ",");
                MasterField.Append("Remark" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Remark) + ",");
                MasterField.Append("TotalQty" + ",");
                if (MasterEntity.TotalQty != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.TotalQty) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("TotalAmount" + ",");
                if (MasterEntity.TotalAmount != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.TotalAmount) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("FHForTypeID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FHForTypeID) + ",");
                MasterField.Append("OrderFormNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.OrderFormNo) + ",");
                MasterField.Append("DYFormNo" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DYFormNo) + ",");
                MasterField.Append("SaleOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SaleOPID) + ",");
                MasterField.Append("SendFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SendFlag) + ",");
                MasterField.Append("Tel" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Tel) + ",");
                MasterField.Append("Address" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Address) + ",");
                MasterField.Append("FHTypeID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FHTypeID) + ",");
                MasterField.Append("FHStatusID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.FHStatusID) + ",");
                MasterField.Append("SHVendorID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SHVendorID) + ",");
                MasterField.Append("SHOPID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SHOPID) + ",");
                MasterField.Append("SHTel" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SHTel) + ",");
                MasterField.Append("MaiTou" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MaiTou) + ",");
                MasterField.Append("Duanyizhuang" + ")");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Duanyizhuang) + ")");



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 29
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                Vendor MasterEntity = (Vendor)p_Entity;
                if (MasterEntity.ID == 0)
                {
                    return(0);
                }

                //新增主表数据
                StringBuilder MasterField = new StringBuilder();
                StringBuilder MasterValue = new StringBuilder();
                MasterField.Append("INSERT INTO Data_Vendor(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("ID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ID) + ",");
                MasterField.Append("VendorID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VendorID) + ",");
                MasterField.Append("VendorAttn" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VendorAttn) + ",");
                MasterField.Append("VendorName" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VendorName) + ",");
                MasterField.Append("VendorNameEn" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VendorNameEn) + ",");
                MasterField.Append("VendorTypeID" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VendorTypeID) + ",");
                MasterField.Append("Tel" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Tel) + ",");
                MasterField.Append("Fax" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Fax) + ",");
                MasterField.Append("Address" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Address) + ",");
                MasterField.Append("UseableFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.UseableFlag) + ",");
                MasterField.Append("WebFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.WebFlag) + ",");
                MasterField.Append("Password" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Password) + ",");
                MasterField.Append("Country" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Country) + ",");
                MasterField.Append("Contact" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Contact) + ",");
                MasterField.Append("InDate" + ",");
                if (MasterEntity.InDate != SystemConfiguration.DateTimeDefaultValue)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.InDate.ToString("yyyy-MM-dd HH:mm:ss")) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("InSaleOP" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.InSaleOP) + ",");
                MasterField.Append("WebUrl" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.WebUrl) + ",");
                MasterField.Append("Free1" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Free1) + ",");
                MasterField.Append("Free2" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Free2) + ",");
                MasterField.Append("Free3" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Free3) + ",");
                MasterField.Append("Area" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Area) + ",");
                MasterField.Append("VendorTypeID2" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VendorTypeID2) + ",");
                MasterField.Append("VendorTypeID3" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VendorTypeID3) + ",");
                MasterField.Append("SubmitFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SubmitFlag) + ",");
                MasterField.Append("DelFlag" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.DelFlag) + ",");
                MasterField.Append("QueryAccount" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.QueryAccount) + ",");
                MasterField.Append("VendorLevel" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VendorLevel) + ",");
                MasterField.Append("CHBrand" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.CHBrand) + ",");
                MasterField.Append("ENBrand" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ENBrand) + ",");
                MasterField.Append("age1" + ",");
                if (MasterEntity.age1 != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.age1) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("age2" + ",");
                if (MasterEntity.age2 != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.age2) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("SJFG" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.SJFG) + ",");
                MasterField.Append("MPrice1" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MPrice1) + ",");
                MasterField.Append("MPrice2" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MPrice2) + ",");
                MasterField.Append("MPrice3" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MPrice3) + ",");
                MasterField.Append("MPrice4" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MPrice4) + ",");
                MasterField.Append("PF" + ",");
                if (MasterEntity.PF != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.PF) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("DL" + ",");
                if (MasterEntity.DL != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.DL) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("ZY" + ",");
                if (MasterEntity.ZY != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.ZY) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("MainSale" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MainSale) + ",");
                MasterField.Append("LimitAmount" + ",");
                if (MasterEntity.LimitAmount != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.LimitAmount) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("SHXAmount" + ",");
                if (MasterEntity.SHXAmount != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.SHXAmount) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("LimitDayNum" + ",");
                if (MasterEntity.LimitDayNum != 0)
                {
                    MasterValue.Append(SysString.ToDBString(MasterEntity.LimitDayNum) + ",");
                }
                else
                {
                    MasterValue.Append("null,");
                }

                MasterField.Append("QQ" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.QQ) + ",");
                MasterField.Append("Alibaba" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Alibaba) + ",");
                MasterField.Append("MainBusiness" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.MainBusiness) + ",");
                MasterField.Append("VendorNameSpell" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VendorNameSpell) + ",");
                MasterField.Append("ZhangHao" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ZhangHao) + ",");
                MasterField.Append("ContactEn" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.ContactEn) + ",");
                MasterField.Append("Mobile" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Mobile) + ",");
                MasterField.Append("VendorStyle" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.VendorStyle) + ",");
                MasterField.Append("EMail" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.EMail) + ",");
                MasterField.Append("Province" + ",");
                MasterValue.Append(SysString.ToDBString(MasterEntity.Province) + ",");
                MasterField.Append("PayMethodFlag" + ")");
                MasterValue.Append(SysString.ToDBString(MasterEntity.PayMethodFlag) + ")");



                //执行
                int AffectedRows = 0;
                if (!this.sqlTransFlag)
                {
                    AffectedRows = this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                else
                {
                    AffectedRows = sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
                }
                return(AffectedRows);
            }
            catch (BaseException E)
            {
                throw new BaseException(E.Message, E);
            }
            catch (Exception E)
            {
                throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert), E);
            }
        }
Ejemplo n.º 30
0
		/// <summary>
        /// 新增
        /// </summary>
        /// <param name="p_Entity">实体类</param>
        /// <returns>操作影响的记录行数</returns>
        public override int AddNew(BaseEntity p_Entity)
        {
            try
            {
                BProductCheckDts MasterEntity=(BProductCheckDts)p_Entity;
                if (MasterEntity.ID==0)
                {
                    return 0;
                }

                //新增主表数据
                StringBuilder MasterField=new StringBuilder();
                StringBuilder MasterValue=new StringBuilder();
                MasterField.Append("INSERT INTO WO_BProductCheckDts(");
                MasterValue.Append(" VALUES(");
                MasterField.Append("ID"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.ID)+","); 
  				MasterField.Append("MainID"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.MainID)+","); 
  				MasterField.Append("Seq"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.Seq)+","); 
  				MasterField.Append("DISN"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.DISN)+","); 
  				MasterField.Append("StatusID"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.StatusID)+","); 
  				MasterField.Append("Fault"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.Fault)+","); 
  				MasterField.Append("ItemCode"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.ItemCode)+","); 
  				MasterField.Append("ItemName"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.ItemName)+","); 
  				MasterField.Append("Qty"+","); 
  				if(MasterEntity.Qty!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.Qty)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("YQty"+","); 
  				if(MasterEntity.YQty!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.YQty)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("Weight"+","); 
  				if(MasterEntity.Weight!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.Weight)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("YWeight"+","); 
  				if(MasterEntity.YWeight!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.YWeight)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("CJQty"+","); 
  				if(MasterEntity.CJQty!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.CJQty)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("FMQty"+","); 
  				if(MasterEntity.FMQty!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.FMQty)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("SO"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.SO)+","); 
  				MasterField.Append("CompactNo"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.CompactNo)+","); 
  				MasterField.Append("DLever"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.DLever)+","); 
  				MasterField.Append("Deduction"+","); 
  				if(MasterEntity.Deduction!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.Deduction)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("MQty1"+","); 
  				if(MasterEntity.MQty1!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.MQty1)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("MQty2"+","); 
  				if(MasterEntity.MQty2!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.MQty2)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("MQty3"+","); 
  				if(MasterEntity.MQty3!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.MQty3)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("MQty4"+","); 
  				if(MasterEntity.MQty4!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.MQty4)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("MQty5"+","); 
  				if(MasterEntity.MQty5!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.MQty5)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("RepairFlag"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.RepairFlag)+","); 
  				MasterField.Append("RepairCount"+","); 
  				if(MasterEntity.RepairCount!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.RepairCount)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("InitialISN"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.InitialISN)+","); 
  				MasterField.Append("Remark"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.Remark)+","); 
  				MasterField.Append("RepairReason"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.RepairReason)+","); 
  				MasterField.Append("ItemStd"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.ItemStd)+","); 
  				MasterField.Append("JarNum"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.JarNum)+","); 
  				MasterField.Append("ShopID"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.ShopID)+","); 
  				MasterField.Append("VendorID"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.VendorID)+","); 
  				MasterField.Append("JarCount"+","); 
  				if(MasterEntity.JarCount!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.JarCount)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("MaXIndex"+","); 
  				if(MasterEntity.MaXIndex!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.MaXIndex)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("ColorName"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.ColorName)+","); 
  				MasterField.Append("ColorNum"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.ColorNum)+","); 
  				MasterField.Append("VColorName"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.VColorName)+","); 
  				MasterField.Append("VColorNum"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.VColorNum)+","); 
  				MasterField.Append("CheckDate"+","); 
  				if(MasterEntity.CheckDate!=SystemConfiguration.DateTimeDefaultValue) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.CheckDate.ToString("yyyy-MM-dd HH:mm:ss"))+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("CheckOPID"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.CheckOPID)+","); 
  				MasterField.Append("MF"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.MF)+","); 
  				MasterField.Append("KZ"+","); 
  				if(MasterEntity.KZ!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.KZ)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("ZNMF"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.ZNMF)+","); 
  				MasterField.Append("XMQty"+","); 
  				if(MasterEntity.XMQty!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.XMQty)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("BMKF"+","); 
  				if(MasterEntity.BMKF!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.BMKF)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("JYBZ"+","); 
  				if(MasterEntity.JYBZ!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.JYBZ)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("CY"+","); 
  				if(MasterEntity.CY!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.CY)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("CJZC"+","); 
  				if(MasterEntity.CJZC!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.CJZC)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("CJRC"+","); 
  				if(MasterEntity.CJRC!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.CJRC)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("WX"+","); 
  				if(MasterEntity.WX!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.WX)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("ZCKF"+","); 
  				if(MasterEntity.ZCKF!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.ZCKF)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("RCKF"+","); 
  				if(MasterEntity.RCKF!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.RCKF)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("KF"+","); 
  				if(MasterEntity.KF!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.KF)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("PF"+","); 
  				if(MasterEntity.PF!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.PF)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("FactoryCode"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.FactoryCode)+","); 
  				MasterField.Append("JarNumCount"+","); 
  				if(MasterEntity.JarNumCount!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.JarNumCount)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("YM"+","); 
  				if(MasterEntity.YM!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.YM)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("SM"+","); 
  				if(MasterEntity.SM!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.SM)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("JSUnit"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.JSUnit)+","); 
  				MasterField.Append("PT"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.PT)+","); 
  				MasterField.Append("ZG"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.ZG)+","); 
  				MasterField.Append("GZ"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.GZ)+","); 
  				MasterField.Append("FMZC"+","); 
  				if(MasterEntity.FMZC!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.FMZC)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("FMRC"+","); 
  				if(MasterEntity.FMRC!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.FMRC)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("SectionID"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.SectionID)+","); 
  				MasterField.Append("WHID"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.WHID)+","); 
  				MasterField.Append("MQty"+","); 
  				if(MasterEntity.MQty!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.MQty)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("MWeight"+","); 
  				if(MasterEntity.MWeight!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.MWeight)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("KF20"+","); 
  				if(MasterEntity.KF20!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.KF20)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("KF22"+","); 
  				if(MasterEntity.KF22!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.KF22)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("KF24"+","); 
  				if(MasterEntity.KF24!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.KF24)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("KF25"+","); 
  				if(MasterEntity.KF25!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.KF25)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("InWHFlag"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.InWHFlag)+","); 
  				MasterField.Append("SJQty"+","); 
  				if(MasterEntity.SJQty!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.SJQty)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("JarNo"+","); 
  				if(MasterEntity.JarNo!=0) 
  				{ 
  			 		MasterValue.Append(SysString.ToDBString(MasterEntity.JarNo)+","); 
  				} 
  				else 
  				{ 
  			 		MasterValue.Append("null,"); 
  				} 
  
  				MasterField.Append("GoodsLevel"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.GoodsLevel)+","); 
  				MasterField.Append("PrintItemName"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.PrintItemName)+","); 
  				MasterField.Append("PrintGoodsCode"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.PrintGoodsCode)+","); 
  				MasterField.Append("PrintCD"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.PrintCD)+","); 
  				MasterField.Append("PrintRemark1"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.PrintRemark1)+","); 
  				MasterField.Append("PrintRemark2"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.PrintRemark2)+","); 
  				MasterField.Append("PrintRemark3"+","); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.PrintRemark3)+","); 
  				MasterField.Append("PrintRemark4"+")"); 
  				MasterValue.Append(SysString.ToDBString(MasterEntity.PrintRemark4)+")"); 
 
                
                

                //执行
                int AffectedRows=0;
				if(!this.sqlTransFlag)
				{
					AffectedRows=this.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
				}
				else
				{
					AffectedRows=sqlTrans.ExecuteNonQuery(MasterField.Append(MasterValue.ToString()).ToString());
				}
                return AffectedRows;
            }
            catch(BaseException E)
            {
                throw new BaseException(E.Message,E);
            }
            catch(Exception E)
            {
               throw new BaseException(FrameWorkMessage.GetAlertMessage((int)Message.CommonDBInsert),E);
            }
        }