Ejemplo n.º 1
0
        public bool CreateShipment(string PackageId, tblShipment _tblShipment)
        {
            List <DetailPackageOnday> lstResult = new List <DetailPackageOnday>();
            DatabaseClass             objData   = new DatabaseClass();
            QueryString objQuery = new QueryString();

            objQuery.strSPName = "CreateShipment";
            objQuery.AddString("@ShipmentCode", _tblShipment.ShipmentCode);
            objQuery.AddInt("@Destination", _tblShipment.Destination);
            objQuery.AddInt("@WarehouseId", _tblShipment.WarehouseId);
            objQuery.AddDecimal("@TotalWeight", _tblShipment.TotalWeight);
            objQuery.AddString("@PackageId", PackageId);
            string strSqlStore = objQuery.GenSPString();
            Common common      = new Common();

            try
            {
                objData.ExecuteNonQuery(strSqlStore);

                return(true);
            }
            catch (Exception ex)
            {
                common.WriteLog(Environment.CurrentDirectory, "WinAppShipment - getDetailPackageOnday: " + ex.StackTrace);
                lstResult = null;

                return(false);
            }
            finally
            {
                objData.CloseData();
                objData = null;
                common  = null;
            }
        }