// データ更新
        // in   : M_Shipmentデータ
        // out  : エラーメッセージ
        public string PutShipment(T_Shipment regShipment)
        {
            using (var db = new SalesManagement_DevContext())
            {
                T_Shipment shipment;
                try
                {
                    shipment = db.T_Shipments.Single(x => x.ShID == regShipment.ShID);
                }
                catch
                {
                    // throw new Exception(Messages.errorNotFoundItem, ex);
                    // throw new Exception(_cm.GetMessage(110), ex);
                    return(_msc.GetMessage(110));
                }

                shipment.ShID         = regShipment.ShID;
                shipment.SoID         = regShipment.SoID;
                shipment.EmID         = regShipment.EmID;
                shipment.ClID         = regShipment.ClID;
                shipment.OrID         = regShipment.OrID;
                shipment.ShFinishDate = regShipment.ShFinishDate;
                shipment.ShFlag       = regShipment.ShFlag;
                shipment.ShStateFlag  = regShipment.ShStateFlag;
                shipment.ShHidden     = regShipment.ShHidden;
                //Timestamp = item.Timestamp,
                //LogData = item.LogData,
                db.Entry(shipment).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            = "Shipment",
                    Command          = "Shi",
                    //Data = ProductLogData(regShipment),
                };
                //StaticCommon.PostOperationLog(operationLog);

                return(string.Empty);
            }
        }
 // ログデータ作成
 // in       regM_Division : ログ対象データ
 // out      string        : ログ文字列
 private string T_ShipmentLogData(T_Shipment regT_Shipment)
 {
     return(regT_Shipment.ShID.ToString() + ", " +
            regT_Shipment.SoID.ToString() + ", " +
            regT_Shipment.EmID.ToString() + ", " +
            regT_Shipment.ClID.ToString() + ", " +
            regT_Shipment.OrID.ToString() + ", " +
            regT_Shipment.ShFinishDate +
            regT_Shipment.ShStateFlag.ToString() + ", " +
            regT_Shipment.ShFlag.ToString() + ", " +
            regT_Shipment.ShHidden);
 }
        //// データ追加
        //// 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_Shipment(T_Shipment regShipment)
        {
            using (var db1 = new SalesManagement_DevContext())
            {
                db1.T_Shipments.Add(regShipment);
                db1.Entry(regShipment).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);
        }