Exemple #1
0
 // ログデータ作成
 // in       regM_Division : ログ対象データ
 // out      string        : ログ文字列
 private string T_WarehousingLogData(T_Warehousing regT_Warehousing)
 {
     return(regT_Warehousing.WaID.ToString() + ", " +
            regT_Warehousing.HaID.ToString() + ", " +
            regT_Warehousing.EmID.ToString() + ", " +
            regT_Warehousing.WaDate.ToString() + ", " +
            regT_Warehousing.WaShelfFlag.ToString() + ", " +
            regT_Warehousing.WaFlag.ToString() + ", " +
            regT_Warehousing.WaHidden);
 }
Exemple #2
0
        // データ更新
        // in   : M_Chumonデータ
        // out  : エラーメッセージ
        public string PutWarehousing(T_Warehousing regWarehousing)
        {
            using (var db = new SalesManagement_DevContext())
            {
                T_Warehousing warehousing;
                try
                {
                    warehousing = db.T_Warehousings.Single(x => x.WaID == regWarehousing.WaID);
                }
                catch
                {
                    // throw new Exception(Messages.errorNotFoundItem, ex);
                    // throw new Exception(_cm.GetMessage(110), ex);
                    return(_msc.GetMessage(110));
                }
                warehousing.WaID        = regWarehousing.WaID;
                warehousing.HaID        = regWarehousing.HaID;
                warehousing.EmID        = regWarehousing.EmID;
                warehousing.WaDate      = regWarehousing.WaDate;
                warehousing.WaShelfFlag = regWarehousing.WaShelfFlag;
                warehousing.WaFlag      = regWarehousing.WaFlag;
                warehousing.WaHidden    = regWarehousing.WaHidden;
                //Timestamp = item.Timestamp,
                //LogData = item.LogData,
                db.Entry(warehousing).State = EntityState.Modified;
                try
                {
                    db.SaveChanges();
                }
                catch
                {
                    // throw new Exception(Messages.errorConflict, ex);
                    // throw new Exception(_cm.GetMessage(100), ex);
                    return(_msc.GetMessage(100));
                }

                // ログ出力
                var operationLog = new OperationLog()
                {
                    EventRaisingTime = DateTime.Now,
                    Operator         = _logonUser,
                    Table            = "Warehousing",
                    Command          = "War",
                };
                //StaticCommon.PostOperationLog(operationLog);

                return(string.Empty);
            }
        }
Exemple #3
0
        //// データ追加
        //// in   : M_Productデータ
        //public string PostM_Product(M_Product regM_Product)
        //{
        //    using (var db1 = new SalesManagement_DevContext())
        //    {
        //        db1.M_Products.Add(regM_Product);
        //        db1.Entry(regM_Product).State = EntityState.Added;

        //        try
        //        {
        //            db1.SaveChanges();
        //        }
        //        catch
        //        {
        //            // throw new Exception(Messages.errorConflict, ex);
        //            // throw new Exception(_cm.GetMessage(100), ex);
        //            // MessageBox.Show(_msc.GetMessage(100));
        //            return _msc.GetMessage(100);
        //        }
        //    }
        //}

        // データ追加
        // in   : M_Itemデータ
        public string PostT_Warehousing(T_Warehousing regWarehousing)
        {
            using (var db1 = new SalesManagement_DevContext())
            {
                db1.T_Warehousings.Add(regWarehousing);
                db1.Entry(regWarehousing).State = EntityState.Added;
                db1.SaveChanges();
            }

            //// ログ出力
            //var operationLog = new OperationLog()
            //{
            //    EventRaisingTime = DateTime.Now,
            //    Operator = _logonUser,
            //    Table = "Product",
            //    Command = "Post",
            //    Data = M_ProductLogData(regProduct),
            //    Comments = string.Empty
            //};
            //StaticCommon.PostOperationLog(operationLog);

            return(string.Empty);
        }